@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>
| Modifier and Type | Field and Description |
|---|---|
static int |
MAGIC_LENGTH |
BUFFER_SIZE| Constructor and Description |
|---|
CellModel()
Default constructor
|
CellModel(byte[] column,
byte[] value)
Constructor
|
CellModel(byte[] column,
byte[] qualifier,
byte[] value)
Constructor
|
CellModel(byte[] family,
byte[] qualifier,
long timestamp,
byte[] value)
Constructor
|
CellModel(byte[] column,
long timestamp,
byte[] value)
Constructor
|
CellModel(Cell cell)
Constructor from KeyValue This avoids copying the value from the cell, and tries to optimize
generating the column value.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
byte[] |
getColumn()
Returns the column
|
ProtobufMessageHandler |
getObjectFromMessage(org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream cis) |
long |
getTimestamp()
Returns the timestamp
|
byte[] |
getValue()
Returns the value
|
byte[] |
getValueArray()
Returns the backing array for value (may be the same as value)
|
int |
getValueLength() |
int |
getValueOffset() |
int |
hashCode() |
boolean |
hasUserTimestamp()
Returns true if the timestamp property has been specified by the user
|
static byte[] |
makeColumn(byte[] family,
int familyOffset,
int familyLength,
byte[] qualifier,
int qualifierOffset,
int qualifierLength)
Makes a column in family:qualifier form from separate byte arrays with offset and length.
|
org.apache.hbase.thirdparty.com.google.protobuf.Message |
messageFromObject()
Convert to model to a protobuf Message object
|
void |
setColumn(byte[] column) |
void |
setTimestamp(long timestamp) |
void |
setValue(byte[] value) |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcreateProtobufOutput, getObjectFromMessage, getObjectFromMessage, writeProtobufOutputpublic static final int MAGIC_LENGTH
public CellModel()
public CellModel(byte[] column,
byte[] value)
public CellModel(byte[] column,
byte[] qualifier,
byte[] value)
public CellModel(Cell cell)
public CellModel(byte[] column,
long timestamp,
byte[] value)
public CellModel(byte[] family,
byte[] qualifier,
long timestamp,
byte[] 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 byte[] getValueArray()
public void setValue(byte[] value)
value - the value to setpublic int getValueOffset()
public int getValueLength()
public org.apache.hbase.thirdparty.com.google.protobuf.Message messageFromObject()
ProtobufMessageHandlermessageFromObject in interface ProtobufMessageHandlerpublic ProtobufMessageHandler getObjectFromMessage(org.apache.hbase.thirdparty.com.google.protobuf.CodedInputStream cis) throws IOException
getObjectFromMessage in interface ProtobufMessageHandlerIOExceptionpublic static byte[] makeColumn(byte[] family,
int familyOffset,
int familyLength,
byte[] qualifier,
int qualifierOffset,
int qualifierLength)
Not recommended for usage as this is old-style API.
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.