org.apache.hadoop.util.Progress.getProgress()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.1k)|赞(0)|评价(0)|浏览(103)

本文整理了Java中org.apache.hadoop.util.Progress.getProgress()方法的一些代码示例,展示了Progress.getProgress()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Progress.getProgress()方法的具体详情如下:
包路径:org.apache.hadoop.util.Progress
类名称:Progress
方法名:getProgress

Progress.getProgress介绍

[英]Returns progress in this node. get() would give overall progress of the root node(not just given current node).
[中]返回此节点中的进度。get()将给出根节点的总体进度(而不仅仅是给定的当前节点)。

代码示例

代码示例来源:origin: io.hops/hadoop-mapreduce-client-core

public float getProgress() {
 return taskProgress.getProgress();
};

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core

public float getProgress() {
 return taskProgress.getProgress();
};

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

public float getProgress() {
 return taskProgress.getProgress();
};

代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core

public float getProgress() {
 return taskProgress.getProgress();
};

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-core

scheduler.tipFailed(taskId1);
Assert.assertEquals("Progress should be 0.5", 0.5f, progress.getProgress(),
  0.0f);
Assert.assertFalse(scheduler.waitUntilDone(1));
Assert.assertEquals("Progress should be 1.0", 1.0f, progress.getProgress(),
  0.0f);
Assert.assertTrue(scheduler.waitUntilDone(1));

代码示例来源:origin: org.apache.hadoop/hadoop-mapred-test

@Override
 public void setProgress(float progress) {
  super.setProgress(progress);
  float mapTaskProgress = map.getProgress().getProgress();
  LOG.info("Map task progress is " + mapTaskProgress);
  if (recordNum < 3) {
   // only 3 records are there; Ignore validating progress after 3 times
   recordNum++;
  }
  else {
   return;
  }
  // validate map task progress when the map task is in map phase
  assertTrue("Map progress is not the expected value.",
        Math.abs(mapTaskProgress - ((0.667/3)*recordNum)) < 0.001);
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core

public boolean next() throws IOException {
  boolean ret = rawIter.next();
  reporter.setProgress(rawIter.getProgress().getProgress());
  return ret;
 }
};

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

public boolean next() throws IOException {
  boolean ret = rawIter.next();
  reporter.setProgress(rawIter.getProgress().getProgress());
  return ret;
 }
};

代码示例来源:origin: org.apache.tez/tez-mapreduce

public boolean next() throws IOException {
  boolean ret = rawIter.next();
  reporter.setProgress(rawIter.getProgress().getProgress());
  return ret;
 }
};

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core

public void informReduceProgress() {
  reducePhase.set(super.in.getProgress().getProgress()); // update progress
  reporter.progress();
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core

public boolean next() throws IOException {
  boolean ret = rawIter.next();
  reporter.setProgress(rawIter.getProgress().getProgress());
  return ret;
 }
};

代码示例来源:origin: org.apache.hadoop/hadoop-mapred

public boolean next() throws IOException {
  boolean ret = rawIter.next();
  reporter.setProgress(rawIter.getProgress().getProgress());
  return ret;
 }
};

代码示例来源:origin: io.hops/hadoop-mapreduce-client-core

public boolean next() throws IOException {
  boolean ret = rawIter.next();
  reporter.setProgress(rawIter.getProgress().getProgress());
  return ret;
 }
};

代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core

public void informReduceProgress() {
  reducePhase.set(super.in.getProgress().getProgress()); // update progress
  reporter.progress();
 }
}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

public void informReduceProgress() {
  reducePhase.set(super.in.getProgress().getProgress()); // update progress
  reporter.progress();
 }
}

代码示例来源:origin: io.hops/hadoop-mapreduce-client-core

public void informReduceProgress() {
  reducePhase.set(super.in.getProgress().getProgress()); // update progress
  reporter.progress();
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-mapred

public void informReduceProgress() {
  reducePhase.set(super.in.getProgress().getProgress()); // update progress
  reporter.progress();
 }
}

代码示例来源:origin: org.apache.tez/tez-runtime-library

@Override
public float getProgress() throws ProgressFailedException, InterruptedException {
 int totalInputs = getNumPhysicalInputs();
 if (totalInputs != 0) {
  synchronized (this) {
   return ((0.5f) * this.shuffledInputs.getValue() / totalInputs) +
     ((rawIter != null) ?
      ((0.5f) * rawIter.getProgress().getProgress()) : 0.0f);
  }
 } else {
  return 0.0f;
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-common

@Test
 public void testSet(){
  Progress progress = new Progress();
  progress.set(Float.NaN);
  Assert.assertEquals(0, progress.getProgress(), 0.0);

  progress.set(Float.NEGATIVE_INFINITY);
  Assert.assertEquals(0,progress.getProgress(),0.0);

  progress.set(-1);
  Assert.assertEquals(0,progress.getProgress(),0.0);

  progress.set((float) 1.1);
  Assert.assertEquals(1,progress.getProgress(),0.0);

  progress.set(Float.POSITIVE_INFINITY);
  Assert.assertEquals(1,progress.getProgress(),0.0);
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

@Test
 public void testSet(){
  Progress progress = new Progress();
  progress.set(Float.NaN);
  Assert.assertEquals(0, progress.getProgress(), 0.0);

  progress.set(Float.NEGATIVE_INFINITY);
  Assert.assertEquals(0,progress.getProgress(),0.0);

  progress.set(-1);
  Assert.assertEquals(0,progress.getProgress(),0.0);

  progress.set((float) 1.1);
  Assert.assertEquals(1,progress.getProgress(),0.0);

  progress.set(Float.POSITIVE_INFINITY);
  Assert.assertEquals(1,progress.getProgress(),0.0);
 }
}

相关文章