@InterfaceAudience.Private public class CellModel extends Object implements ProtobufMessageHandler, Serializable
<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>
| Constructor and Description |
|---|
CellModel()
Default constructor
|
CellModel(byte[] column,
byte[] value)
Constructor
|
CellModel(byte[] column,
byte[] qualifier,
byte[] value)
Constructor
|
CellModel(byte[] column,
byte[] qualifier,
long timestamp,
byte[] value)
Constructor
|
CellModel(byte[] column,
long timestamp,
byte[] value)
Constructor
|
CellModel(KeyValue kv)
Constructor from KeyValue
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
createProtobufOutput() |
byte[] |
getColumn() |
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation.
|
long |
getTimestamp() |
byte[] |
getValue() |
boolean |
hasUserTimestamp() |
void |
setColumn(byte[] column) |
void |
setTimestamp(long timestamp) |
void |
setValue(byte[] value) |
public CellModel()
public CellModel(byte[] column,
byte[] value)
column - value - public CellModel(byte[] column,
byte[] qualifier,
byte[] value)
column - qualifier - value - public CellModel(KeyValue kv)
kv - public CellModel(byte[] column,
long timestamp,
byte[] value)
column - timestamp - value - public CellModel(byte[] column,
byte[] qualifier,
long timestamp,
byte[] value)
column - qualifier - timestamp - value - public byte[] getColumn()
public void setColumn(byte[] column)
column - the column to setpublic boolean hasUserTimestamp()
public long getTimestamp()
public void setTimestamp(long timestamp)
timestamp - the timestamp to setpublic byte[] getValue()
public void setValue(byte[] value)
value - the value to setpublic byte[] createProtobufOutput()
createProtobufOutput in interface ProtobufMessageHandlerpublic ProtobufMessageHandler getObjectFromMessage(byte[] message) throws IOException
ProtobufMessageHandlergetObjectFromMessage in interface ProtobufMessageHandlermessage - the raw bytes of the protobuf messageIOExceptionCopyright © 2014 The Apache Software Foundation. All rights reserved.