Class DevNullValuesWriter
java.lang.Object
org.apache.parquet.column.values.ValuesWriter
org.apache.parquet.column.values.bitpacking.DevNullValuesWriter
- All Implemented Interfaces:
AutoCloseable
This is a special writer that doesn't write anything. The idea being that
some columns will always be the same value, and this will capture that. An
example is the set of repetition levels for a schema with no repeated fields.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonglongused to decide if we want to work to the next pageorg.apache.parquet.bytes.BytesInputgetBytes()called after getBytes() and before reset()memUsageString(String prefix) voidreset()called after getBytes() to reset the current buffer and start writing the next pagevoidwriteBoolean(boolean v) voidwriteByte(int value) voidwriteBytes(Binary v) voidwriteDouble(double v) voidwriteFloat(float v) voidwriteInteger(int v) voidwriteLong(long v) Methods inherited from class org.apache.parquet.column.values.ValuesWriter
close, resetDictionary, toDictPageAndClose
-
Constructor Details
-
DevNullValuesWriter
public DevNullValuesWriter()
-
-
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)
-
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
-
writeInteger
public void writeInteger(int v) - Overrides:
writeIntegerin classValuesWriter- Parameters:
v- the value to encode
-
writeByte
public void writeByte(int value) - Overrides:
writeBytein classValuesWriter- Parameters:
value- the value to encode
-
writeBoolean
public void writeBoolean(boolean v) - Overrides:
writeBooleanin classValuesWriter- Parameters:
v- the value to encode
-
writeBytes
- Overrides:
writeBytesin classValuesWriter- Parameters:
v- the value to encode
-
writeLong
public void writeLong(long v) - Overrides:
writeLongin classValuesWriter- Parameters:
v- the value to encode
-
writeDouble
public void writeDouble(double v) - Overrides:
writeDoublein classValuesWriter- Parameters:
v- the value to encode
-
writeFloat
public void writeFloat(float v) - Overrides:
writeFloatin classValuesWriter- Parameters:
v- the value to encode
-
getBytes
public org.apache.parquet.bytes.BytesInput getBytes()- Specified by:
getBytesin classValuesWriter- Returns:
- the bytes buffered so far to write to the current page
-
getAllocatedSize
public long getAllocatedSize()Description copied from class:ValuesWriter- Specified by:
getAllocatedSizein classValuesWriter- Returns:
- the allocated size of the buffer
-
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
-
memUsageString
- Specified by:
memUsageStringin classValuesWriter
-