Class UnfilteredSerializer


  • public class UnfilteredSerializer
    extends java.lang.Object
    Serialize/deserialize a single Unfiltered (both on-wire and on-disk).

    The encoded format for an unfiltered is <flags>(<row>|<marker>) where:

    • <flags> is a byte (or two) whose bits are flags used by the rest of the serialization. Each flag is defined/explained below as the "Unfiltered flags" constants. One of those flags is an extension flag, and if present, indicates the presence of a 2ndbyte that contains more flags. If the extension is not set, defaults are assumed for the flags of that 2nd byte.
    • <row> is <clustering><sizes>[<pkliveness>][<deletion>][<columns>]<columns_data> where:
      • <clustering> is the row clustering as serialized by Clustering.Serializer (note that static row are an exception and don't have this).
      • <sizes> are the sizes of the whole unfiltered on disk and of the previous unfiltered. This is only present for sstables and is used to efficiently skip rows (both forward and backward).
      • <pkliveness> is the row primary key liveness infos, and it contains the timestamp, ttl and local deletion time of that info, though some/all of those can be absent based on the flags.
      • deletion is the row deletion. It's presence is determined by the flags and if present, it conists of both the deletion timestamp and local deletion time.
      • <columns> are the columns present in the row encoded by Columns.Serializer.serializeSubset(java.util.Collection<org.apache.cassandra.schema.ColumnMetadata>, org.apache.cassandra.db.Columns, org.apache.cassandra.io.util.DataOutputPlus). It is absent if the row contains all the columns of the SerializationHeader (which is then indicated by a flag).
      • <columns_data> is the data for each of the column present in the row. The encoding of each data depends on whether the data is for a simple or complex column:
        • Simple columns are simply encoded as one <cell>
        • Complex columns are encoded as [<delTime>]<n><cell1>...<celln> where <delTime> is the deletion for this complex column (if flags indicates its presence), <n> is the vint encoded value of n, i.e. <celln>'s 1-based inde and <celli> are the <cell> for this complex column
    • <marker> is <bound><deletion> where <bound> is the marker bound as serialized by ClusteringBoundOrBoundary.Serializer and <deletion> is the marker deletion time.

    The serialization of a <cell> is defined by Cell.Serializer.

    • Constructor Detail

      • UnfilteredSerializer

        public UnfilteredSerializer()