Class DeltaLengthByteArrayValuesWriter
- java.lang.Object
-
- org.apache.parquet.column.values.ValuesWriter
-
- org.apache.parquet.column.values.deltalengthbytearray.DeltaLengthByteArrayValuesWriter
-
public class DeltaLengthByteArrayValuesWriter extends ValuesWriter
Write lengths of byte-arrays using delta encoding, followed by concatenated byte-arraysdelta-length-byte-array : length* byte-array*
-
-
Constructor Summary
Constructors Constructor Description DeltaLengthByteArrayValuesWriter(int initialSize, int pageSize, org.apache.parquet.bytes.ByteBufferAllocator allocator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Called to close the values writer.longgetAllocatedSize()longgetBufferedSize()used to decide if we want to work to the next pageorg.apache.parquet.bytes.BytesInputgetBytes()EncodinggetEncoding()called after getBytes() and before reset()StringmemUsageString(String prefix)voidreset()called after getBytes() to reset the current buffer and start writing the next pagevoidwriteBytes(Binary v)-
Methods inherited from class org.apache.parquet.column.values.ValuesWriter
resetDictionary, toDictPageAndClose, writeBoolean, writeByte, writeDouble, writeFloat, writeInteger, writeLong
-
-
-
-
Method Detail
-
writeBytes
public void writeBytes(Binary v)
- Overrides:
writeBytesin classValuesWriter- Parameters:
v- the value to encode
-
getBufferedSize
public long getBufferedSize()
Description copied from class:ValuesWriterused to decide if we want to work to the next page- Specified by:
getBufferedSizein classValuesWriter- Returns:
- the size of the currently buffered data (in bytes)
-
getBytes
public org.apache.parquet.bytes.BytesInput getBytes()
- Specified by:
getBytesin classValuesWriter- Returns:
- the bytes buffered so far to write to the current page
-
getEncoding
public Encoding getEncoding()
Description copied from class:ValuesWritercalled after getBytes() and before reset()- Specified by:
getEncodingin classValuesWriter- Returns:
- the encoding that was used to encode the bytes
-
reset
public void reset()
Description copied from class:ValuesWritercalled after getBytes() to reset the current buffer and start writing the next page- Specified by:
resetin classValuesWriter
-
close
public void close()
Description copied from class:ValuesWriterCalled to close the values writer. Any output stream is closed and can no longer be used. All resources are released.- Overrides:
closein classValuesWriter
-
getAllocatedSize
public long getAllocatedSize()
Description copied from class:ValuesWriter- Specified by:
getAllocatedSizein classValuesWriter- Returns:
- the allocated size of the buffer
-
memUsageString
public String memUsageString(String prefix)
- Specified by:
memUsageStringin classValuesWriter
-
-