/** * Current position * * @return The position */ public int position() { return rowBlock.getMemory().writerPosition(); }
/** * Current memory address of the buffer * * @return The memory address */ public long address() { return rowBlock.getMemory().address(); }
/** * Current memory address of the buffer * * @return The memory address */ public long address() { return rowBlock.getMemory().address(); }
/** * Current position * * @return The position */ public int position() { return rowBlock.getMemory().writerPosition(); }
public int position() { return rowBlock.getMemory().writerPosition(); }
public void ensureSize(int size) { rowBlock.getMemory().ensureSize(size); }
public CompactRowBlockWriter(RowBlock rowBlock) { this.dataTypes = rowBlock.getDataTypes(); this.rowBlock = rowBlock; // compute the number of bytes, representing the null flags nullFlags = new BitArray(dataTypes.length); headerSize = RECORD_FIELD_SIZE + SizeOf.SIZE_OF_SHORT + nullFlags.bytesLength(); if (!rowBlock.getMemory().hasAddress()) { throw new TajoInternalError(rowBlock.getMemory().getClass().getSimpleName() + " does not support to direct memory access"); } }
public CompactRowBlockWriter(RowBlock rowBlock) { this.dataTypes = rowBlock.getDataTypes(); this.rowBlock = rowBlock; // compute the number of bytes, representing the null flags nullFlags = new BitArray(dataTypes.length); headerSize = RECORD_FIELD_SIZE + SizeOf.SIZE_OF_SHORT + nullFlags.bytesLength(); if (!rowBlock.getMemory().hasAddress()) { throw new TajoInternalError(rowBlock.getMemory().getClass().getSimpleName() + " does not support to direct memory access"); } }
public boolean next(RowBlock rowblock) throws IOException { long reamin = reader == null ? 0 : reader.remainForRead(); boolean ret = rowblock.copyFromChannel(channel); reader = rowblock.getReader(); filePosition += rowblock.getMemory().writerPosition() - reamin; return ret; }
public boolean next(RowBlock rowblock) throws IOException { long reamin = reader == null ? 0 : reader.remainForRead(); boolean ret = rowblock.copyFromChannel(channel); reader = rowblock.getReader(); filePosition += rowblock.getMemory().writerPosition() - reamin; return ret; }