Class PBCell

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

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

  • Method Details

    • encodedClass

      public Class<org.apache.hadoop.hbase.protobuf.generated.CellProtos.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.protobuf.generated.CellProtos.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.protobuf.generated.CellProtos.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.