@Override public long getEstimatedSize() { return INSTANCE_SIZE + unscaledDecimals.sizeOf() + overflows.sizeOf() + numberOfElements * SingleLongDecimalWithOverflowState.SIZE; } }
@Override public long getEstimatedSize() { return INSTANCE_SIZE + unscaledDecimals.sizeOf() + overflows.sizeOf() + numberOfElements * SingleLongDecimalWithOverflowAndLongState.SIZE; } }
@Override public long getEstimatedSize() { return INSTANCE_SIZE + unscaledDecimals.sizeOf() + overflows.sizeOf() + numberOfElements * SingleLongDecimalWithOverflowAndLongState.SIZE; } }
@Override public long getEstimatedSize() { return INSTANCE_SIZE + unscaledDecimals.sizeOf() + overflows.sizeOf() + numberOfElements * SingleLongDecimalWithOverflowState.SIZE; } }
@Override public long getEstimatedSize() { return INSTANCE_SIZE + values.getRetainedSizeInBytes() + counts.sizeOf() + hashPositions.sizeOf(); }
@Override public long getEstimatedSize() { return INSTANCE_SIZE + values.getRetainedSizeInBytes() + counts.sizeOf() + hashPositions.sizeOf(); }
/** * Update memory usage. * * @return true if the reservation is within the limit */ // TODO: update in the interface now that the new memory tracking framework is landed // Essentially we would love to have clean interfaces to support both pushing and pulling memory usage // The following implementation is a hybrid model, where the push model is going to call the pull model causing reentrancy private boolean updateMemoryReservation() { // Operator/driver will be blocked on memory after we call localUserMemoryContext.setBytes(). // If memory is not available, once we return, this operator will be blocked until memory is available. long memorySizeInBytes = groupByHash.map(GroupByHash::getEstimatedSize).orElse(0L) + partitionRowCount.sizeOf(); localUserMemoryContext.setBytes(memorySizeInBytes); // If memory is not available, inform the caller that we cannot proceed for allocation. return operatorContext.isWaitingForMemory().isDone(); }
/** * Update memory usage. * * @return true if the reservation is within the limit */ // TODO: update in the interface now that the new memory tracking framework is landed // Essentially we would love to have clean interfaces to support both pushing and pulling memory usage // The following implementation is a hybrid model, where the push model is going to call the pull model causing reentrancy private boolean updateMemoryReservation() { // Operator/driver will be blocked on memory after we call localUserMemoryContext.setBytes(). // If memory is not available, once we return, this operator will be blocked until memory is available. long memorySizeInBytes = groupByHash.map(GroupByHash::getEstimatedSize).orElse(0L) + partitionRowCount.sizeOf(); localUserMemoryContext.setBytes(memorySizeInBytes); // If memory is not available, inform the caller that we cannot proceed for allocation. return operatorContext.isWaitingForMemory().isDone(); }
@Override public long getEstimatedSize() { return INSTANCE_SIZE + partitionCounts.sizeOf() + counts.sizeOf() + envelopes.sizeOf() + samples.sizeOf() + ENVELOPE_SIZE * (envelopeCount + samplesCount); }
@Override public long getEstimatedSize() { return INSTANCE_SIZE + (sizeOf(channelBuilders.get(0).elements()) * channelBuilders.size()) + completedPagesMemorySize + currentPageBuilder.getRetainedSizeInBytes() + sizeOf(groupAddressByHash) + sizeOf(groupIdsByHash) + groupAddressByGroupId.sizeOf() + sizeOf(rawHashByHashPosition) + preallocatedMemoryInBytes; }
@Override public long getEstimatedSize() { return INSTANCE_SIZE + (sizeOf(channelBuilders.get(0).elements()) * channelBuilders.size()) + completedPagesMemorySize + currentPageBuilder.getRetainedSizeInBytes() + sizeOf(groupAddressByHash) + sizeOf(groupIdsByHash) + groupAddressByGroupId.sizeOf() + sizeOf(rawHashByHashPosition) + preallocatedMemoryInBytes; }