Class ByteStreamSplitValuesWriter
java.lang.Object
org.apache.parquet.column.values.ValuesWriter
org.apache.parquet.column.values.bytestreamsplit.ByteStreamSplitValuesWriter
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
ByteStreamSplitValuesWriter.DoubleByteStreamSplitValuesWriter,ByteStreamSplitValuesWriter.FixedLenByteArrayByteStreamSplitValuesWriter,ByteStreamSplitValuesWriter.FloatByteStreamSplitValuesWriter,ByteStreamSplitValuesWriter.IntegerByteStreamSplitValuesWriter,ByteStreamSplitValuesWriter.LongByteStreamSplitValuesWriter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final int -
Constructor Summary
ConstructorsConstructorDescriptionByteStreamSplitValuesWriter(int elementSizeInBytes, int initialCapacity, int pageSize, org.apache.parquet.bytes.ByteBufferAllocator allocator) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Called to close the values writer.longlongused to decide if we want to work to the next pageorg.apache.parquet.bytes.BytesInputgetBytes()called after getBytes() and before reset()voidreset()called after getBytes() to reset the current buffer and start writing the next pageprotected voidscatterBytes(byte[] bytes) Methods inherited from class org.apache.parquet.column.values.ValuesWriter
memUsageString, resetDictionary, toDictPageAndClose, writeBoolean, writeByte, writeBytes, writeDouble, writeFloat, writeInteger, writeLong
-
Field Details
-
numStreams
protected final int numStreams -
elementSizeInBytes
protected final int elementSizeInBytes
-
-
Constructor Details
-
ByteStreamSplitValuesWriter
public ByteStreamSplitValuesWriter(int elementSizeInBytes, int initialCapacity, int pageSize, org.apache.parquet.bytes.ByteBufferAllocator allocator)
-
-
Method Details
-
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
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.- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classValuesWriter
-
scatterBytes
protected void scatterBytes(byte[] bytes) -
getAllocatedSize
public long getAllocatedSize()Description copied from class:ValuesWriter- Specified by:
getAllocatedSizein classValuesWriter- Returns:
- the allocated size of the buffer
-