Package com.illumon.iris.binarystore
Class BinaryRow
java.lang.Object
com.illumon.iris.binarystore.BinaryRow
- All Implemented Interfaces:
Row
public class BinaryRow extends Object implements Row
This class implements the writer for a self-descriptive binary format table. A table is structured as following: - header:(columnName:zero terminated string,columnType:zero terminated string,fixedTypeSize:int,typeMetadata:<int size><n bytes>)* - list of rows
A row is formated as follows: - rowSize 4 bytes - an entry for each fixed size record, of the predefined size - for each variable size record, 2 bytes for entry size followed by the payload-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
BinaryRow.BinaryStoreRowSetter<T>
-
Field Summary
Fields Modifier and Type Field Description protected ByteBuffer
dataBuffer
protected BinaryRow.BinaryStoreRowSetter[]
rowSetters
protected Map<String,BinaryRow.BinaryStoreRowSetter>
setters
protected BinaryStoreWriterV1
writer
-
Constructor Summary
Constructors Constructor Description BinaryRow(BinaryStoreWriterV1 writer, String[] columnNames, SupportedType[] columnTypes, Object[] typeMetadata, Map<String,Object> constantValues)
-
Method Summary
Modifier and Type Method Description protected BinaryRow.BinaryStoreRowSetter
getRowSetter(SupportedType columnType, Object metadata, byte[] mask, int i)
RowSetter
getSetter(String name)
Gets a setter for a column.void
setFlags(Row.Flags flags)
long
size()
Number of rows written out.protected void
writeData(ByteBuffer dataBuffer)
void
writeRow()
Writes out a new row (values set using setters).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.binarystore.Row
getColumnPartitionValue, getSetter, setColumnPartitionValue
-
Field Details
-
Constructor Details
-
BinaryRow
public BinaryRow(BinaryStoreWriterV1 writer, String[] columnNames, SupportedType[] columnTypes, Object[] typeMetadata, Map<String,Object> constantValues)
-
-
Method Details
-
getRowSetter
protected BinaryRow.BinaryStoreRowSetter getRowSetter(SupportedType columnType, Object metadata, byte[] mask, int i) -
getSetter
Description copied from interface:Row
Gets a setter for a column. -
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
-
writeData
- Throws:
IOException
-
size
public long size()Description copied from interface:Row
Number of rows written out. -
setFlags
-