@Override public void addInput(Page page) { requireNonNull(page, "page is null"); checkState(!finished, "operator finished"); page = pagePreprocessor.apply(page); pageConsumer.accept(page); operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount()); }
@Override public void addInput(Page page) { operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount()); }
@Override public void addInput(Page page) { requireNonNull(page, "page is null"); page = pagePreprocessor.apply(page); sink.addPage(page); operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount()); }
@Override public void addInput(Page page) { requireNonNull(page, "page is null"); if (page.getPositionCount() == 0) { return; } page = pagePreprocessor.apply(page); List<SerializedPage> serializedPages = splitPage(page, DEFAULT_MAX_PAGE_SIZE_IN_BYTES).stream() .map(serde::serialize) .collect(toImmutableList()); outputBuffer.enqueue(serializedPages); operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount()); }
@Override public void addInput(Page page) { requireNonNull(page, "page is null"); checkState(blocked == NOT_BLOCKED, "output is already blocked"); ListenableFuture<?> future = pageBuffer.add(page); if (!future.isDone()) { this.blocked = future; } operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount()); }
@Override public void addInput(Page page) { requireNonNull(page, "page is null"); checkState(!isFinished(), "Operator is already finished"); if (!indexSnapshotBuilder.tryAddPage(page)) { finish(); return; } operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount()); }
@Override public void finish() { if (finished) { return; } ChannelSet channelSet = channelSetBuilder.build(); setSupplier.setChannelSet(channelSet); operatorContext.recordOutput(channelSet.getEstimatedSizeInBytes(), channelSet.size()); finished = true; }
@Override public void addInput(Page page) { requireNonNull(page, "page is null"); if (page.getPositionCount() == 0) { return; } page = pagePreprocessor.apply(page); partitionFunction.partitionPage(page); operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount()); // We use getSizeInBytes() here instead of getRetainedSizeInBytes() for an approximation of // the amount of memory used by the pageBuilders, because calculating the retained // size can be expensive especially for complex types. long partitionsSizeInBytes = partitionFunction.getSizeInBytes(); // We also add partitionsInitialRetainedSize as an approximation of the object overhead of the partitions. systemMemoryContext.setBytes(partitionsSizeInBytes + partitionsInitialRetainedSize); }
@Override public void addInput(Page page) { requireNonNull(page, "page is null"); checkState(!isFinished(), "Operator is already finished"); index.addPage(page); if (!localUserMemoryContext.trySetBytes((index.getEstimatedSize().toBytes()))) { index.compact(); localUserMemoryContext.setBytes(index.getEstimatedSize().toBytes()); } operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount()); }
@Override public void addInput(Page page) { requireNonNull(page, "page is null"); checkState(!isFinished(), "Operator is already finished"); if (page.getPositionCount() == 0) { return; } nestedLoopJoinPagesBuilder.addPage(page); if (!localUserMemoryContext.trySetBytes(nestedLoopJoinPagesBuilder.getEstimatedSize().toBytes())) { nestedLoopJoinPagesBuilder.compact(); localUserMemoryContext.setBytes(nestedLoopJoinPagesBuilder.getEstimatedSize().toBytes()); } operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount()); }
private void updateIndex(Page page) { index.addPage(page); if (spillEnabled) { localRevocableMemoryContext.setBytes(index.getEstimatedSize().toBytes()); } else { if (!localUserMemoryContext.trySetBytes(index.getEstimatedSize().toBytes())) { index.compact(); localUserMemoryContext.setBytes(index.getEstimatedSize().toBytes()); } } operatorContext.recordOutput(page.getSizeInBytes(), page.getPositionCount()); }