public class CellModel extends java.lang.Object implements ProtobufMessageHandler, java.io.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(org.apache.hadoop.hbase.Cell cell)
Constructor from KeyValue
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
createProtobufOutput() |
boolean |
equals(java.lang.Object obj) |
byte[] |
getColumn() |
ProtobufMessageHandler |
getObjectFromMessage(byte[] message)
Initialize the model from a protobuf representation.
|
long |
getTimestamp() |
byte[] |
getValue() |
int |
hashCode() |
boolean |
hasUserTimestamp() |
void |
setColumn(byte[] column) |
void |
setTimestamp(long timestamp) |
void |
setValue(byte[] value) |
java.lang.String |
toString() |
public CellModel()
public CellModel(byte[] column,
byte[] value)
column - value - public CellModel(byte[] column,
byte[] qualifier,
byte[] value)
column - qualifier - value - public CellModel(org.apache.hadoop.hbase.Cell cell)
cell - 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 java.io.IOException
ProtobufMessageHandlergetObjectFromMessage in interface ProtobufMessageHandlermessage - the raw bytes of the protobuf messagejava.io.IOExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object