コード例 #1
0
 @Override
 public void addInput(Page page) {
   checkNotNull(page, "page is null");
   checkState(!finished, "Already finished");
   inMemoryExchange.addPage(page);
   operatorContext.recordGeneratedOutput(page.getDataSize(), page.getPositionCount());
 }
コード例 #2
0
ファイル: SetBuilderOperator.java プロジェクト: hengly/presto
  @Override
  public void finish() {
    if (finished) {
      return;
    }

    ChannelSet channelSet = channelSetBuilder.build();
    setSupplier.setChannelSet(channelSet);
    operatorContext.recordGeneratedOutput(channelSet.getEstimatedSize(), channelSet.size());
    finished = true;
  }
コード例 #3
0
  @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());
  }