Class PBCell

java.lang.Object
org.apache.hadoop.hbase.types.PBType<org.apache.hadoop.hbase.example.protobuf.generated.CellMessage.Cell>
org.apache.hadoop.hbase.types.PBCell
All Implemented Interfaces:
DataType<org.apache.hadoop.hbase.example.protobuf.generated.CellMessage.Cell>

@Private public class PBCell extends PBType<org.apache.hadoop.hbase.example.protobuf.generated.CellMessage.Cell>
An example for using protobuf objects with DataType API.
  • Constructor Details

  • Method Details

    • encodedClass

      public Class<org.apache.hadoop.hbase.example.protobuf.generated.CellMessage.Cell> encodedClass()
      Description copied from interface: DataType
      Inform consumers over what type this DataType operates. Useful when working with bare DataType instances.
    • skip

      public int skip(PositionedByteRange src)
      Description copied from interface: DataType
      Skip src's position forward over one encoded value.
      Parameters:
      src - the buffer containing the encoded value.
      Returns:
      number of bytes skipped.
    • decode

      public org.apache.hadoop.hbase.example.protobuf.generated.CellMessage.Cell 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, org.apache.hadoop.hbase.example.protobuf.generated.CellMessage.Cell 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.