private static LongArrayList addresses() { LongArrayList addresses = new LongArrayList(); for (int i = 0; i < TEST_PAGE.getPositionCount(); ++i) { addresses.add(encodeSyntheticAddress(0, i)); } return addresses; } }
int pageIndex = channelBuilders.get(0).size() - 1; int pagePosition = currentPageBuilder.getPositionCount() - 1; long address = encodeSyntheticAddress(pageIndex, pagePosition);
public void addPage(Page page) { // ignore empty pages if (page.getPositionCount() == 0) { return; } positionCount += page.getPositionCount(); int pageIndex = (channels.length > 0) ? channels[0].size() : 0; for (int i = 0; i < channels.length; i++) { Block block = page.getBlock(i); if (eagerCompact) { block = block.copyRegion(0, block.getPositionCount()); } channels[i].add(block); pagesMemorySize += block.getRetainedSizeInBytes(); } for (int position = 0; position < page.getPositionCount(); position++) { long sliceAddress = encodeSyntheticAddress(pageIndex, position); valueAddresses.add(sliceAddress); } estimatedSize = calculateEstimatedSize(); }
int pageIndex = channelBuilders.get(0).size() - 1; int pagePosition = currentPageBuilder.getPositionCount() - 1; long address = encodeSyntheticAddress(pageIndex, pagePosition);
/** * Add positions in page with the specified partitionId. * NOTE: this method does not track memory used in the page, since * only part of the page will be used. */ public void addPage(Page page, int partitionId, Block partitionIds) { // ignore empty pages if (page.getPositionCount() == 0) { return; } int pageIndex = (channels.length > 0) ? channels[0].size() : 0; for (int i = 0; i < channels.length; i++) { Block block = page.getBlock(i); channels[i].add(block); } for (int position = 0; position < page.getPositionCount(); position++) { if (partitionId == BIGINT.getLong(partitionIds, position)) { long sliceAddress = encodeSyntheticAddress(pageIndex, position); valueAddresses.add(sliceAddress); positionCount++; } } estimatedSize = calculateEstimatedSize(); }
public void addPage(Page page) { // ignore empty pages if (page.getPositionCount() == 0) { return; } positionCount += page.getPositionCount(); int pageIndex = (channels.length > 0) ? channels[0].size() : 0; for (int i = 0; i < channels.length; i++) { Block block = page.getBlock(i); channels[i].add(block); pagesMemorySize += block.getRetainedSizeInBytes(); } for (int position = 0; position < page.getPositionCount(); position++) { long sliceAddress = encodeSyntheticAddress(pageIndex, position); valueAddresses.add(sliceAddress); } estimatedSize = calculateEstimatedSize(); }
Block block = channel.get(blockIndex); for (int positionIndex = 0; positionIndex < block.getPositionCount(); positionIndex++) { addresses.add(encodeSyntheticAddress(blockIndex, positionIndex));