Package com.illumon.iris.binarystore
Class BinaryRowV2
java.lang.Object
com.illumon.iris.binarystore.BinaryRowV2
- All Implemented Interfaces:
Row
This class implements row writing for the V2 binary log format.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
class
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBinaryRowV2
(BinaryStoreWriterV2 writer, String[] columnNames, SupportedType[] columnTypes, Object[] typeMetadata) -
Method Summary
Modifier and TypeMethodDescriptionFor rows that are to be used with file managers that allow dynamic column partition selection, retrieve the column partition value.Gets a setter for a column.Populate the internal data buffer with column values.void
reset()
Reset the internal buffer.void
setColumnPartitionValue
(String columnPartitionValue) For rows that are to be used with file managers that allow dynamic column partition selection, set the column partition value.void
void
writeRow()
Writes out a new row (values set using setters).void
Prepare our internal buffer to write, without doing the actual write yet.void
Write a row to the underlying stream and reset the internal buffer.
-
Field Details
-
writer
-
dataBuffer
-
-
Constructor Details
-
BinaryRowV2
public BinaryRowV2(BinaryStoreWriterV2 writer, String[] columnNames, SupportedType[] columnTypes, Object[] typeMetadata)
-
-
Method Details
-
getSetter
Description copied from interface:Row
Gets a setter for a column. -
populateBuffer
Populate the internal data buffer with column values. This assumes that all appropriate row setters have been called.- Returns:
- the data buffer just populated
- Throws:
IOException
-
writeRow
Description copied from interface:Row
Writes out a new row (values set using setters).- Specified by:
writeRow
in interfaceRow
- Throws:
IOException
- problem writing the row
-
writeRowFirstHalf
Prepare our internal buffer to write, without doing the actual write yet. Separating writeRow in first half and second half is useful for client code that needs to execution the second half on a different thread.- Throws:
IOException
- if an error occurred during internal buffer setup.
-
writeRowSecondHalf
Write a row to the underlying stream and reset the internal buffer.writeRowFirstHalf()
must have been previously * called.- Throws:
IOException
- if an error occurred during internal buffer setup.
-
reset
public void reset()Reset the internal buffer. Note that unless the buffer has been populated and written, the data is lost. -
setFlags
-
setColumnPartitionValue
Description copied from interface:Row
For rows that are to be used with file managers that allow dynamic column partition selection, set the column partition value.- Specified by:
setColumnPartitionValue
in interfaceRow
- Parameters:
columnPartitionValue
- the column partition value
-
getColumnPartitionValue
Description copied from interface:Row
For rows that are to be used with file managers that allow dynamic column partition selection, retrieve the column partition value.- Specified by:
getColumnPartitionValue
in interfaceRow
- Returns:
- the previously-set column partition value
-
getFlagSetter
-