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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidlongEstimate the amount of memory being used.voidflush()Flush the buffervoidgetPosition(PositionRecorder recorder) Get position from the stream.voidwrite(long value) Write the integer value
-
Constructor Details
-
RunLengthIntegerWriter
-
-
Method Details
-
flush
Description copied from interface:IntegerWriterFlush the buffer- Specified by:
flushin interfaceIntegerWriter- Throws:
IOException
-
write
Description copied from interface:IntegerWriterWrite the integer value- Specified by:
writein interfaceIntegerWriter- Throws:
IOException
-
getPosition
Description copied from interface:IntegerWriterGet position from the stream.- Specified by:
getPositionin interfaceIntegerWriter- Throws:
IOException
-
estimateMemory
public long estimateMemory()Description copied from interface:IntegerWriterEstimate the amount of memory being used.- Specified by:
estimateMemoryin interfaceIntegerWriter- Returns:
- number of bytes
-
changeIv
- Specified by:
changeIvin interfaceIntegerWriter
-