public void getByteSegmentRefToCurrent(ByteSegmentRef byteSegmentRef, int length, Position readPos) { byteSegmentRef.reset((readPos.bufferIndex * (long)wbSize) + readPos.offset, length); if (length > 0) { populateValue(byteSegmentRef); } }
public Result() { hasRows = false; byteSegmentRef = new WriteBuffers.ByteSegmentRef(); readPos = new WriteBuffers.Position(); }
public ByteStreamTypedSerDe(Type objectType) throws SerDeException { super(objectType); bos = new ByteStream.Output(); bis = new ByteStream.Input(); }
@Override public void set(Output output) { this.output = output; output.reset(); index = 0; currentLevel = 0; }
public VectorRowBytesContainer(String spillLocalDirs) { output = new Output(); readBuffer = new byte[INPUT_SIZE]; readNextBytes = new byte[MAX_READS][]; readNextOffsets = new int[MAX_READS]; readNextLengths = new int[MAX_READS]; isOpen = false; totalWriteLength = 0; totalReadLength = 0; this.spillLocalDirs = spillLocalDirs; }
@Override public SerDeStats getSerDeStats() { // must be different assert (status != LAST_OPERATION.UNKNOWN); if (status == LAST_OPERATION.SERIALIZE) { stats.setRawDataSize(serializedSize); } else { stats.setRawDataSize(deserializedSize); } return stats; }
@Override public int getNonMatchedBytesLength() { return keyRef.getLength(); } }
public VectorMapJoinFastKeyStore(int writeBuffersSize) { writeBuffers = new WriteBuffers(writeBuffersSize, AbsoluteKeyOffset.maxSize); unsafeReadPos = new WriteBuffers.Position(); }
/** * Take the segment reference from {@link #getValueRefs(byte[], int, List)} * result and makes it self-contained - adds byte array where the value is stored, and * updates the offset from "global" write buffers offset to offset within that array. */ public void populateValue(WriteBuffers.ByteSegmentRef valueRef) { writeBuffers.populateValue(valueRef); }
@Override protected Writable transformFromUTF8(Writable blob) { Text text = (Text)blob; return SerDeUtils.transformTextFromUTF8(text, this.charset); }
public BaseStructObjectInspector(List<String> structFieldNames, List<ObjectInspector> structFieldObjectInspectors, List<String> structFieldComments) { init(structFieldNames, structFieldObjectInspectors, structFieldComments); }
private byte readNextByte(Position readPos) { // This method is inefficient. It's only used when something crosses buffer boundaries. ponderNextBufferToRead(readPos); return readPos.buffer[readPos.offset++]; }
/** * Compares the current readPosition of the buffer with the external byte array. * Does not modify readPoint. */ public boolean isEqual(byte[] left, int leftOffset, Position readPos, int length) { return isEqual(left, leftOffset, readPos.bufferIndex, readPos.offset, length); }
public VectorMapJoinFastKeyStore(WriteBuffers writeBuffers) { // TODO: Check if maximum size compatible with AbsoluteKeyOffset.maxSize. this.writeBuffers = writeBuffers; unsafeReadPos = new WriteBuffers.Position(); }
@Override public long getEstimatedMemorySize() { long size = 0; size += writeBuffers == null ? 0 : writeBuffers.getEstimatedMemorySize(); size += unsafeReadPos == null ? 0 : unsafeReadPos.getEstimatedMemorySize(); return size; } }
@Override public long getEstimatedMemorySize() { long size = 0; size += writeBuffers == null ? 0 : writeBuffers.getEstimatedMemorySize(); return size; } }
public VectorKeySeriesSerializedImpl(T serializeWrite) { super(); this.serializeWrite = serializeWrite; output = new Output(); serializedKeyLengths = new int[VectorizedRowBatch.DEFAULT_SIZE]; }
public HashMapResult() { super(); valueRefWord = -1; hasRows = false; byteSegmentRef = new ByteSegmentRef(); readPos = new Position(); }
public VectorMapJoinHashTableResult() { joinResult = JoinUtil.JoinResult.NOMATCH; spillPartitionId = -1; readPos = new WriteBuffers.Position(); }
public HashMapResult() { super(); refWord = -1; hasRows = false; byteSegmentRef = new ByteSegmentRef(); readPos = new Position(); }