Class BinaryStoreWriterV1

java.lang.Object
com.illumon.iris.binarystore.AbstractBinaryStoreWriter
com.illumon.iris.binarystore.BinaryStoreWriterV1
All Implemented Interfaces:
Entry, Record, Row, TableWriter
Direct Known Subclasses:
BinaryStoreWriter

public class BinaryStoreWriterV1
extends AbstractBinaryStoreWriter
This class implements the writer for a self-descriptive binary table. A table is structured as following: The header contains a sequence of:
  • columnName:zero terminated string
  • columnType:zero terminated string (e.g., String, Byte, Integer, BLOB)
  • fixedTypeSize:int (for string and blob this is zero)
  • typeMetadata:<int size><n bytes>, most types do not require meta-data. The metadata for an Enum is a mapping from the corresponding integer to string name.

The header is followed by row data.

A row is formatted as follows:

  • mask, which is bitmap indicating which columns exist within the row, stored as an array of bytes of size (ncols+7)/8
Each column in the row is stored in the same order as the header.
  • fixed size records are stored using predefined size, The minimum value of integer-like types indicates nullability. For boolean's and enum's -1 indicates nullability.
  • for each variable size record (i.e. Strings and blobs), 2 bytes for entry size followed by the payload
  • enum's are stored as a an integer, The Metadata is used to map the integer to a string representation.