@Override public void finish() { noMoreSplits(); source.finish(); }
@Override public void finish() { OperationTimer timer = new OperationTimer(statisticsCpuTimerEnabled); statisticsAggregationOperator.finish(); timer.end(statisticsTiming); if (state == State.RUNNING) { state = State.FINISHING; } }
@Override public void finish() { ListenableFuture<?> currentlyBlocked = blocked; OperationTimer timer = new OperationTimer(statisticsCpuTimerEnabled); statisticAggregationOperator.finish(); timer.end(statisticsTiming); ListenableFuture<?> blockedOnAggregation = statisticAggregationOperator.isBlocked(); ListenableFuture<?> blockedOnFinish = NOT_BLOCKED; if (state == State.RUNNING) { state = State.FINISHING; finishFuture = pageSink.finish(); blockedOnFinish = toListenableFuture(finishFuture); updateWrittenBytes(); } this.blocked = allAsList(currentlyBlocked, blockedOnAggregation, blockedOnFinish); }
private static Page getAtMostOnePage(Operator operator, Page sourcePage) { // add our input page if needed if (operator.needsInput()) { operator.addInput(sourcePage); } // try to get the output page Page result = operator.getOutput(); // tell operator to finish operator.finish(); // try to get output until the operator is finished while (!operator.isFinished()) { // operator should never block assertTrue(operator.isBlocked().isDone()); Page output = operator.getOutput(); if (output != null) { assertNull(result); result = output; } } return result; }
operator.finish();
assertTrue(operator.needsInput()); operator.addInput(probeInput.get(0)); operator.finish();
assertTrue(operator.needsInput()); operator.addInput(probeInput.get(0)); operator.finish();
@Override public void finish() { noMoreSplits(); source.finish(); }
private static Page getAtMostOnePage(Operator operator, Page sourcePage) { // add our input page if needed if (operator.needsInput()) { operator.addInput(sourcePage); } // try to get the output page Page result = operator.getOutput(); // tell operator to finish operator.finish(); // try to get output until the operator is finished while (!operator.isFinished()) { // operator should never block assertTrue(operator.isBlocked().isDone()); Page output = operator.getOutput(); if (output != null) { assertNull(result); result = output; } } return result; }
assertTrue(operator.needsInput()); operator.addInput(probeInput.get(0)); operator.finish();