Package org.apache.hadoop.hbase.types
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hbase.example.protobuf.generated.CellMessage.CellRead an instance ofTfrom the buffersrc.intencode(PositionedByteRange dst, org.apache.hadoop.hbase.example.protobuf.generated.CellMessage.Cell val) Write instancevalinto bufferdst.Class<org.apache.hadoop.hbase.example.protobuf.generated.CellMessage.Cell>Inform consumers over what type thisDataTypeoperates.intskip(PositionedByteRange src) Skipsrc's position forward over one encoded value.Methods inherited from class org.apache.hadoop.hbase.types.PBType
encodedLength, getOrder, inputStreamFromByteRange, isNullable, isOrderPreserving, isSkippable, outputStreamFromByteRange
-
Constructor Details
-
PBCell
public PBCell()
-
-
Method Details
-
encodedClass
Description copied from interface:DataTypeInform consumers over what type thisDataTypeoperates. Useful when working with bareDataTypeinstances. -
skip
Description copied from interface:DataTypeSkipsrc'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:DataTypeRead an instance ofTfrom the buffersrc.- 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:DataTypeWrite instancevalinto bufferdst.- Parameters:
dst- the buffer containing the encoded value.val- the value to encode ontodst.- Returns:
- number of bytes written.
-