Package org.apache.hadoop.hbase.types
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.hbase.protobuf.generated.CellProtos.Cell
Read an instance ofT
from the buffersrc
.int
encode
(PositionedByteRange dst, org.apache.hadoop.hbase.protobuf.generated.CellProtos.Cell val) Write instanceval
into bufferdst
.Class<org.apache.hadoop.hbase.protobuf.generated.CellProtos.Cell>
Inform consumers over what type thisDataType
operates.int
skip
(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:DataType
Inform consumers over what type thisDataType
operates. Useful when working with bareDataType
instances. -
skip
Description copied from interface:DataType
Skipsrc
's position forward over one encoded value.- Parameters:
src
- the buffer containing the encoded value.- Returns:
- number of bytes skipped.
-
decode
Description copied from interface:DataType
Read an instance ofT
from the buffersrc
.- 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 instanceval
into bufferdst
.- Parameters:
dst
- the buffer containing the encoded value.val
- the value to encode ontodst
.- Returns:
- number of bytes written.
-