@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(Cell cell)
Constructor from KeyValue
|
Modifier and Type | Method and Description |
---|---|
byte[] |
createProtobufOutput() |
boolean |
equals(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) |
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(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 ProtobufMessageHandler
public ProtobufMessageHandler getObjectFromMessage(byte[] message) throws IOException
ProtobufMessageHandler
getObjectFromMessage
in interface ProtobufMessageHandler
message
- the raw bytes of the protobuf messageIOException
Copyright © 2007–2019 Cloudera. All rights reserved.