Package org.apache.orc.impl
Class RunLengthIntegerWriter
java.lang.Object
org.apache.orc.impl.RunLengthIntegerWriter
- All Implemented Interfaces:
IntegerWriter
A streamFactory that writes a sequence of integers. A control byte is written before
each run with positive values 0 to 127 meaning 3 to 130 repetitions, each
repetition is offset by a delta. If the control byte is -1 to -128, 1 to 128
literal vint values follow.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
long
Estimate the amount of memory being used.void
flush()
Flush the buffervoid
getPosition
(PositionRecorder recorder) Get position from the stream.void
write
(long value) Write the integer value
-
Constructor Details
-
RunLengthIntegerWriter
-
-
Method Details
-
flush
Description copied from interface:IntegerWriter
Flush the buffer- Specified by:
flush
in interfaceIntegerWriter
- Throws:
IOException
-
write
Description copied from interface:IntegerWriter
Write the integer value- Specified by:
write
in interfaceIntegerWriter
- Throws:
IOException
-
getPosition
Description copied from interface:IntegerWriter
Get position from the stream.- Specified by:
getPosition
in interfaceIntegerWriter
- Throws:
IOException
-
estimateMemory
public long estimateMemory()Description copied from interface:IntegerWriter
Estimate the amount of memory being used.- Specified by:
estimateMemory
in interfaceIntegerWriter
- Returns:
- number of bytes
-
changeIv
- Specified by:
changeIv
in interfaceIntegerWriter
-