public float getProgress() { return taskProgress.getProgress(); };
public float getProgress() { return taskProgress.getProgress(); };
public float getProgress() { return taskProgress.getProgress(); };
public float getProgress() { return taskProgress.getProgress(); };
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));
@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); } }
public boolean next() throws IOException { boolean ret = rawIter.next(); reporter.setProgress(rawIter.getProgress().getProgress()); return ret; } };
public boolean next() throws IOException { boolean ret = rawIter.next(); reporter.setProgress(rawIter.getProgress().getProgress()); return ret; } };
public boolean next() throws IOException { boolean ret = rawIter.next(); reporter.setProgress(rawIter.getProgress().getProgress()); return ret; } };
public void informReduceProgress() { reducePhase.set(super.in.getProgress().getProgress()); // update progress reporter.progress(); } }
public boolean next() throws IOException { boolean ret = rawIter.next(); reporter.setProgress(rawIter.getProgress().getProgress()); return ret; } };
public boolean next() throws IOException { boolean ret = rawIter.next(); reporter.setProgress(rawIter.getProgress().getProgress()); return ret; } };
public boolean next() throws IOException { boolean ret = rawIter.next(); reporter.setProgress(rawIter.getProgress().getProgress()); return ret; } };
public void informReduceProgress() { reducePhase.set(super.in.getProgress().getProgress()); // update progress reporter.progress(); } }
public void informReduceProgress() { reducePhase.set(super.in.getProgress().getProgress()); // update progress reporter.progress(); } }
public void informReduceProgress() { reducePhase.set(super.in.getProgress().getProgress()); // update progress reporter.progress(); } }
public void informReduceProgress() { reducePhase.set(super.in.getProgress().getProgress()); // update progress reporter.progress(); } }
@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; } }
@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); } }
@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); } }