public UnSafeTupleList(DataType[] dataTypes, int initialArraySize, int pageSize) { super(initialArraySize); this.dataTypes = dataTypes; this.pageSize = pageSize; this.rowBlocks = Lists.newArrayList(); this.currentRowBlock = new MemoryRowBlock(dataTypes, new FixedSizeLimitSpec(pageSize), true); this.rowBlocks.add(currentRowBlock); }
public UnSafeTupleList(DataType[] dataTypes, int initialArraySize, int pageSize) { super(initialArraySize); this.dataTypes = dataTypes; this.pageSize = pageSize; this.rowBlocks = Lists.newArrayList(); this.currentRowBlock = new MemoryRowBlock(dataTypes, new FixedSizeLimitSpec(pageSize), true); this.rowBlocks.add(currentRowBlock); }
/** * Release and reset */ @Override public void clear() { release(); this.currentRowBlock = new MemoryRowBlock(dataTypes, new FixedSizeLimitSpec(pageSize), true); this.rowBlocks.add(currentRowBlock); } }
/** * Release and reset */ @Override public void clear() { release(); this.currentRowBlock = new MemoryRowBlock(dataTypes, new FixedSizeLimitSpec(pageSize), true); this.rowBlocks.add(currentRowBlock); } }
@Override public void init() throws IOException { initChannel(); if (tupleBuffer == null) { tupleBuffer = new MemoryRowBlock(SchemaUtil.toDataTypes(schema), conf.getInt(READ_BUFFER_SIZE, DEFAULT_BUFFER_SIZE)); } else { tupleBuffer.clear(); } fetchNeeded = true; eos = false; super.init(); }
@Override public void init() throws IOException { initChannel(); if (tupleBuffer == null) { tupleBuffer = new MemoryRowBlock(SchemaUtil.toDataTypes(schema), conf.getInt(READ_BUFFER_SIZE, DEFAULT_BUFFER_SIZE)); } else { tupleBuffer.clear(); } fetchNeeded = true; eos = false; super.init(); }
final SettableFuture<MemoryRowBlock> future = SettableFuture.create(); if (rowBlock == null) { rowBlock = new MemoryRowBlock(SchemaUtil.toDataTypes(scanNode.getOutSchema()));
rowBlock = new MemoryRowBlock(SchemaUtil.toDataTypes(schema), bufferSize, true, meta.getDataFormat());
rowBlock = new MemoryRowBlock(SchemaUtil.toDataTypes(schema), bufferSize, true, meta.getDataFormat());
public static MemoryRowBlock createRowBlock(int rowNum) { long allocateStart = System.currentTimeMillis(); MemoryRowBlock rowBlock = new MemoryRowBlock(SchemaUtil.toDataTypes(schema), StorageUnit.KB * 128); long allocatedEnd = System.currentTimeMillis(); LOG.info(FileUtil.humanReadableByteCount(rowBlock.capacity(), true) + " bytes allocated " + (allocatedEnd - allocateStart) + " msec"); long writeStart = System.currentTimeMillis(); for (int i = 0; i < rowNum; i++) { fillRow(i, rowBlock.getWriter()); } long writeEnd = System.currentTimeMillis(); LOG.info("writing takes " + (writeEnd - writeStart) + " msec"); return rowBlock; }
public boolean addTuple(Tuple tuple) { int prevPos = currentRowBlock.getMemory().writerPosition(); if (currentRowBlock.getWriter().addTuple(tuple)) { UnSafeTuple unSafeTuple = new UnSafeTuple(); unSafeTuple.set(currentRowBlock.getMemory(), prevPos, dataTypes); return super.add(unSafeTuple); } else { this.totalUsedMem += currentRowBlock.usedMem(); this.currentRowBlock = new MemoryRowBlock(dataTypes, new FixedSizeLimitSpec(pageSize), true); this.rowBlocks.add(currentRowBlock); return this.addTuple(tuple); } }
public boolean addTuple(Tuple tuple) { int prevPos = currentRowBlock.getMemory().writerPosition(); if (currentRowBlock.getWriter().addTuple(tuple)) { UnSafeTuple unSafeTuple = new UnSafeTuple(); unSafeTuple.set(currentRowBlock.getMemory(), prevPos, dataTypes); return super.add(unSafeTuple); } else { this.totalUsedMem += currentRowBlock.usedMem(); this.currentRowBlock = new MemoryRowBlock(dataTypes, new FixedSizeLimitSpec(pageSize), true); this.rowBlocks.add(currentRowBlock); return this.addTuple(tuple); } }
MemoryRowBlock rowBlock = partitionMemoryMap.get(partId); if (rowBlock == null) { rowBlock = new MemoryRowBlock(dataTypes, initialBufferSize, true, plan.getStorageType()); partitionMemoryMap.put(partId, rowBlock); totalBufferCapacity += rowBlock.capacity();
final SettableFuture<MemoryRowBlock> future = SettableFuture.create(); if (rowBlock == null) { rowBlock = new MemoryRowBlock(SchemaUtil.toDataTypes(scanNode.getOutSchema()));
} else { if (rowBlock == null) { rowBlock = new MemoryRowBlock(SchemaUtil.toDataTypes(tableDesc.getLogicalSchema()));
} else { if (rowBlock == null) { rowBlock = new MemoryRowBlock(SchemaUtil.toDataTypes(tableDesc.getLogicalSchema()));
Schema schema = PlannerUtil.targetToSchema(targets); SerializedResultSet.Builder serializedResBuilder = SerializedResultSet.newBuilder(); MemoryRowBlock rowBlock = new MemoryRowBlock(SchemaUtil.toDataTypes(schema));
MemoryRowBlock rowBlock = new MemoryRowBlock(SchemaUtil.toDataTypes(schema)); String[] lines = explainStr.split("\n"); try {
MemoryRowBlock rowBlock = new MemoryRowBlock(SchemaUtil.toDataTypes(schema)); String[] lines = explainStr.split("\n"); try {
Schema schema = PlannerUtil.targetToSchema(targets); SerializedResultSet.Builder serializedResBuilder = SerializedResultSet.newBuilder(); MemoryRowBlock rowBlock = new MemoryRowBlock(SchemaUtil.toDataTypes(schema));