Class CellModel
java.lang.Object
org.apache.hadoop.hbase.rest.model.CellModel
- All Implemented Interfaces:
Serializable
,ProtobufMessageHandler
Representation of a cell. A cell is a single value associated a column and optional qualifier,
and either the timestamp when it was stored or the user- provided timestamp if one was explicitly
supplied.
<complexType name="Cell"> <sequence> <element name="value" maxOccurs="1" minOccurs="1"> <simpleType> <restriction base="base64Binary"/> </simpleType> </element> </sequence> <attribute name="column" type="base64Binary" /> <attribute name="timestamp" type="int" /> </complexType>
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprivate byte[]
private static final long
private long
private byte[]
-
Constructor Summary
ConstructorDescriptionDefault constructorCellModel
(byte[] column, byte[] value) ConstructorCellModel
(byte[] column, byte[] qualifier, byte[] value) ConstructorCellModel
(byte[] column, byte[] qualifier, long timestamp, byte[] value) ConstructorCellModel
(byte[] column, long timestamp, byte[] value) ConstructorConstructor from KeyValue -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Returns the protobuf represention of the modelboolean
byte[]
Returns the columngetObjectFromMessage
(byte[] message) Initialize the model from a protobuf representation.long
Returns the timestampbyte[]
getValue()
Returns the valueint
hashCode()
boolean
Returns true if the timestamp property has been specified by the uservoid
setColumn
(byte[] column) void
setTimestamp
(long timestamp) void
setValue
(byte[] value) toString()
-
Field Details
-
serialVersionUID
- See Also:
-
column
-
timestamp
-
value
-
-
Constructor Details
-
CellModel
public CellModel()Default constructor -
CellModel
Constructor -
CellModel
Constructor -
CellModel
Constructor from KeyValue -
CellModel
Constructor -
CellModel
Constructor
-
-
Method Details
-
getColumn
Returns the column -
setColumn
- Parameters:
column
- the column to set
-
hasUserTimestamp
Returns true if the timestamp property has been specified by the user -
getTimestamp
Returns the timestamp -
setTimestamp
- Parameters:
timestamp
- the timestamp to set
-
getValue
Returns the value -
setValue
- Parameters:
value
- the value to set
-
createProtobufOutput
Description copied from interface:ProtobufMessageHandler
Returns the protobuf represention of the model- Specified by:
createProtobufOutput
in interfaceProtobufMessageHandler
-
getObjectFromMessage
Description copied from interface:ProtobufMessageHandler
Initialize the model from a protobuf representation.- Specified by:
getObjectFromMessage
in interfaceProtobufMessageHandler
- Parameters:
message
- the raw bytes of the protobuf message- Returns:
- reference to self for convenience
- Throws:
IOException
-
equals
-
hashCode
-
toString
-