Class OrderedBlob

java.lang.Object
org.apache.hadoop.hbase.types.OrderedBytesBase<byte[]>
org.apache.hadoop.hbase.types.OrderedBlob
All Implemented Interfaces:
DataType<byte[]>

@Public public class OrderedBlob extends OrderedBytesBase<byte[]>
  • Field Details

  • Constructor Details

    • OrderedBlob

      public OrderedBlob(Order order)
      Creates a new byte[] with variable length.
      Parameters:
      order - the Order to use
  • Method Details

    • isSkippable

      public boolean isSkippable()
      Description copied from interface: DataType
      Indicates whether this instance is able to skip over it's encoded value. DataTypes that are not skippable can only be used as the right-most field of a Struct.
      Specified by:
      isSkippable in interface DataType<byte[]>
      Overrides:
      isSkippable in class OrderedBytesBase<byte[]>
    • encodedLength

      public int encodedLength(byte[] val)
      Description copied from interface: DataType
      Inform consumers how long the encoded byte[] will be.
      Parameters:
      val - The value to check.
      Returns:
      the number of bytes required to encode val.a
    • encodedClass

      public Class<byte[]> encodedClass()
      Description copied from interface: DataType
      Inform consumers over what type this DataType operates. Useful when working with bare DataType instances.
    • decode

      public byte[] decode(PositionedByteRange src)
      Description copied from interface: DataType
      Read an instance of T from the buffer src.
      Parameters:
      src - the buffer containing the encoded value.
    • encode

      public int encode(PositionedByteRange dst, byte[] val)
      Description copied from interface: DataType
      Write instance val into buffer dst.
      Parameters:
      dst - the buffer containing the encoded value.
      val - the value to encode onto dst.
      Returns:
      number of bytes written.
    • encode

      public int encode(PositionedByteRange dst, byte[] val, int voff, int vlen)
      Write a subset of val to dst.
      Parameters:
      dst - the PositionedByteRange to write to
      val - the value to write to dst
      voff - the offset in dst where to write val to
      vlen - the lenght of val
      Returns:
      the number of bytes written