Class NoTagsKeyValue

java.lang.Object
org.apache.hadoop.hbase.KeyValue
org.apache.hadoop.hbase.NoTagsKeyValue
All Implemented Interfaces:
Cloneable, Cell, ExtendedCell, HeapSize, RawCell

@Private public class NoTagsKeyValue extends KeyValue
An extension of the KeyValue where the tags length is always 0
  • Constructor Details

    • NoTagsKeyValue

      public NoTagsKeyValue(byte[] bytes, int offset, int length)
  • Method Details

    • getTagsLength

      public int getTagsLength()
      Description copied from class: KeyValue
      Return the total length of the tag bytes
      Specified by:
      getTagsLength in interface RawCell
      Overrides:
      getTagsLength in class KeyValue
      Returns:
      the total length of the tags in the Cell.
    • write

      public int write(OutputStream out, boolean withTags) throws IOException
      Description copied from interface: ExtendedCell
      Write this cell to an OutputStream in a KeyValue format.
      KeyValue format
      <4 bytes keylength> <4 bytes valuelength> <2 bytes rowlength> <row> <1 byte columnfamilylength> <columnfamily> <columnqualifier> <8 bytes timestamp> <1 byte keytype> <value> <2 bytes tagslength> <tags>
      Specified by:
      write in interface ExtendedCell
      Overrides:
      write in class KeyValue
      Parameters:
      out - Stream to which cell has to be written
      withTags - Whether to write tags.
      Returns:
      how many bytes are written.
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize(boolean withTags)
      Description copied from interface: ExtendedCell
      KeyValue format

      <4 bytes keylength> <4 bytes valuelength> <2 bytes rowlength> <row> <1 byte columnfamilylength> <columnfamily> <columnqualifier> <8 bytes timestamp> <1 byte keytype> <value> <2 bytes tagslength> <tags>

      Specified by:
      getSerializedSize in interface ExtendedCell
      Overrides:
      getSerializedSize in class KeyValue
      Parameters:
      withTags - Whether to write tags.
      Returns:
      Bytes count required to serialize this Cell in a KeyValue format.
    • deepClone

      Description copied from interface: ExtendedCell
      Does a deep copy of the contents to a new memory area and returns it as a new cell.
      Specified by:
      deepClone in interface ExtendedCell
      Overrides:
      deepClone in class KeyValue
      Returns:
      The deep cloned cell