@Override public long getRetainedSizeInBytes() { return retainedSizeInBytes + values.getRetainedSizeInBytes(); }
@Override public long getEstimatedSize() { return INSTANCE_SIZE + keyBlockBuilder.getRetainedSizeInBytes() + valueBlockBuilder.getRetainedSizeInBytes(); }
@Override public long getRetainedSizeInBytes() { return INSTANCE_SIZE + blockBuilder.getRetainedSizeInBytes(); }
@Override public long getRetainedSizeInBytes() { long size = INSTANCE_SIZE; for (BlockBuilder fieldBlockBuilder : fieldBlockBuilders) { size += fieldBlockBuilder.getRetainedSizeInBytes(); } return size; }
@Override public long getRetainedSizeInBytes() { return INSTANCE_SIZE + keyBlockBuilder.getRetainedSizeInBytes() + valueBlockBuilder.getRetainedSizeInBytes(); }
public long getRetainedSizeInBytes() { // We use a foreach loop instead of streams // as it has much better performance. long retainedSizeInBytes = 0; for (BlockBuilder blockBuilder : blockBuilders) { retainedSizeInBytes += blockBuilder.getRetainedSizeInBytes(); } return retainedSizeInBytes; }
@Override public long getEstimatedSize() { long estimatedSize = INSTANCE_SIZE; if (blockBuilder != null) { estimatedSize += blockBuilder.getRetainedSizeInBytes(); } return estimatedSize; }
@Override public void retainedBytesForEachPart(BiConsumer<Object, Long> consumer) { consumer.accept(keyBlockBuilder, keyBlockBuilder.getRetainedSizeInBytes()); consumer.accept(valueBlockBuilder, valueBlockBuilder.getRetainedSizeInBytes()); consumer.accept(this, (long) INSTANCE_SIZE); }
@Override public void retainedBytesForEachPart(BiConsumer<Object, Long> consumer) { for (BlockBuilder fieldBlockBuilder : fieldBlockBuilders) { consumer.accept(fieldBlockBuilder, fieldBlockBuilder.getRetainedSizeInBytes()); } consumer.accept(this, (long) INSTANCE_SIZE); }
@Override public void retainedBytesForEachPart(BiConsumer<Object, Long> consumer) { consumer.accept(blockBuilder, blockBuilder.getRetainedSizeInBytes()); consumer.accept(this, (long) INSTANCE_SIZE); }
public long estimatedInMemorySize() { long size = INSTANCE_SIZE; size += keyBlockBuilder.getRetainedSizeInBytes(); size += valueBlockBuilder.getRetainedSizeInBytes(); size += sizeOf(keyPositionByHash); return size; }
public long getEstimatedSize() { return INSTANCE_SIZE + heapBlockBuilder.getRetainedSizeInBytes() + sizeOf(heapIndex); }
public long getRetainedSizeInBytes() { return INSTANCE_SIZE + elementBlock.getRetainedSizeInBytes() + blockPositionByHash.sizeOf(); }
@Override public void retainedBytesForEachPart(BiConsumer<Object, Long> consumer) { consumer.accept(keyBlockBuilder, keyBlockBuilder.getRetainedSizeInBytes()); consumer.accept(valueBlockBuilder, valueBlockBuilder.getRetainedSizeInBytes()); consumer.accept(offsets, sizeOf(offsets)); consumer.accept(mapIsNull, sizeOf(mapIsNull)); consumer.accept(hashTables, sizeOf(hashTables)); consumer.accept(this, (long) INSTANCE_SIZE); }
@Override public void retainedBytesForEachPart(BiConsumer<Object, Long> consumer) { for (int i = 0; i < numFields; i++) { consumer.accept(fieldBlockBuilders[i], fieldBlockBuilders[i].getRetainedSizeInBytes()); } consumer.accept(fieldBlockOffsets, sizeOf(fieldBlockOffsets)); consumer.accept(rowIsNull, sizeOf(rowIsNull)); consumer.accept(this, (long) INSTANCE_SIZE); }
@Override public void retainedBytesForEachPart(BiConsumer<Object, Long> consumer) { consumer.accept(values, values.getRetainedSizeInBytes()); consumer.accept(offsets, sizeOf(offsets)); consumer.accept(valueIsNull, sizeOf(valueIsNull)); consumer.accept(this, (long) INSTANCE_SIZE); }
@Override public long getRetainedSizeInBytes() { long size = INSTANCE_SIZE + keyBlockBuilder.getRetainedSizeInBytes() + valueBlockBuilder.getRetainedSizeInBytes() + sizeOf(offsets) + sizeOf(mapIsNull) + sizeOf(hashTables); if (blockBuilderStatus != null) { size += BlockBuilderStatus.INSTANCE_SIZE; } return size; }
@Override public long getRetainedSizeInBytes() { long size = INSTANCE_SIZE + sizeOf(fieldBlockOffsets) + sizeOf(rowIsNull); for (int i = 0; i < numFields; i++) { size += fieldBlockBuilders[i].getRetainedSizeInBytes(); } if (blockBuilderStatus != null) { size += BlockBuilderStatus.INSTANCE_SIZE; } return size; }
@Override public long getEstimatedSize() { return INSTANCE_SIZE + values.getRetainedSizeInBytes() + counts.sizeOf() + hashPositions.sizeOf(); }
private static Page createOneMegaBytePage() { BlockBuilder blockBuilder = BIGINT.createFixedSizeBlockBuilder(POSITIONS_PER_PAGE); while (blockBuilder.getRetainedSizeInBytes() < 1024 * 1024) { BIGINT.writeLong(blockBuilder, 42L); } return new Page(0, blockBuilder.build()); } }