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 classclass -
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.voidreset()Reset the internal buffer.voidsetColumnPartitionValue(String columnPartitionValue) For rows that are to be used with file managers that allow dynamic column partition selection, set the column partition value.voidvoidwriteRow()Writes out a new row (values set using setters).voidPrepare our internal buffer to write, without doing the actual write yet.voidWrite 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:RowGets 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:RowWrites out a new row (values set using setters).- Specified by:
writeRowin 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:RowFor rows that are to be used with file managers that allow dynamic column partition selection, set the column partition value.- Specified by:
setColumnPartitionValuein interfaceRow- Parameters:
columnPartitionValue- the column partition value
-
getColumnPartitionValue
Description copied from interface:RowFor rows that are to be used with file managers that allow dynamic column partition selection, retrieve the column partition value.- Specified by:
getColumnPartitionValuein interfaceRow- Returns:
- the previously-set column partition value
-
getFlagSetter
-