@Override public void addInput(Page page) { checkNotNull(page, "page is null"); checkState(!finished, "Already finished"); inMemoryExchange.addPage(page); operatorContext.recordGeneratedOutput(page.getDataSize(), page.getPositionCount()); }
@Override public void finish() { if (finished) { return; } ChannelSet channelSet = channelSetBuilder.build(); setSupplier.setChannelSet(channelSet); operatorContext.recordGeneratedOutput(channelSet.getEstimatedSize(), channelSet.size()); finished = true; }
@Override public void addInput(Page page) { requireNonNull(page, "page is null"); checkState(isBlocked().isDone(), "output is already blocked"); if (page.getPositionCount() == 0) { return; } page = pagePreprocessor.apply(page); blocked = partitionFunction.partitionPage(page); operatorContext.recordGeneratedOutput(page.getSizeInBytes(), page.getPositionCount()); }