public static class KeyValue.KeyOnlyKeyValue extends KeyValue
KeyValue.KeyOnlyKeyValue, KeyValue.KVComparator, KeyValue.MetaComparator, KeyValue.SamePrefixComparator<T>, KeyValue.Type| Modifier and Type | Field and Description |
|---|---|
private short |
rowLen |
bytes, COLUMN_FAMILY_DELIM_ARRAY, COLUMN_FAMILY_DELIMITER, COMPARATOR, FAMILY_LENGTH_SIZE, FIXED_OVERHEAD, KEY_INFRASTRUCTURE_SIZE, KEY_LENGTH_SIZE, KEYVALUE_INFRASTRUCTURE_SIZE, KEYVALUE_WITH_TAGS_INFRASTRUCTURE_SIZE, length, LOWESTKEY, META_COMPARATOR, offset, ROW_KEY_OFFSET, ROW_LENGTH_SIZE, ROW_OFFSET, TAGS_LENGTH_SIZE, TIMESTAMP_SIZE, TIMESTAMP_TYPE_SIZE, TYPE_SIZECELL_NOT_BASED_ON_CHUNKMAX_TAGS_LENGTH| Constructor and Description |
|---|
KeyOnlyKeyValue() |
KeyOnlyKeyValue(byte[] b) |
KeyOnlyKeyValue(byte[] b,
int offset,
int length) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
boolean |
equals(Object other)
Needed doing 'contains' on List.
|
byte[] |
getFamilyArray()
Returns the backing array of the entire KeyValue (all KeyValue fields are in a single array)
|
byte |
getFamilyLength()
Returns Family length
|
(package private) int |
getFamilyLengthPosition(int rowLength) |
int |
getFamilyOffset()
Returns Family offset
|
byte[] |
getKey()
Do not use unless you have to.
|
int |
getKeyLength()
Returns Length of key portion.
|
int |
getKeyOffset()
Returns Key offset in backing buffer..
|
byte[] |
getQualifierArray()
Returns the backing array of the entire KeyValue (all KeyValue fields are in a single array)
|
int |
getQualifierLength()
Returns Qualifier length
|
private int |
getQualifierLength(int rlength,
int flength) |
int |
getQualifierOffset()
Returns Qualifier offset
|
byte[] |
getRowArray()
Returns the backing array of the entire KeyValue (all KeyValue fields are in a single array)
|
short |
getRowLength()
Returns Row length
|
int |
getRowOffset()
Returns Row offset
|
byte[] |
getTagsArray()
Returns the backing array of the entire KeyValue (all KeyValue fields are in a single array)
|
int |
getTagsLength()
Return the total length of the tag bytes
|
int |
getTagsOffset()
Return the offset where the tag data starts.
|
long |
getTimestamp()
Return the timestamp.
|
int |
getTimestampOffset()
Returns Timestamp offset
|
byte |
getTypeByte()
Returns KeyValue.TYPE byte representation
|
(package private) byte |
getTypeByte(int keyLength)
Return the KeyValue.TYPE byte representation
|
byte[] |
getValueArray()
Returns the backing array of the entire KeyValue (all KeyValue fields are in a single array)
|
int |
getValueLength()
Returns Value length
|
int |
getValueOffset()
Returns the value offset
|
int |
hashCode()
In line with
KeyValue.equals(Object), only uses the key portion, not the value. |
long |
heapSize()
HeapSize implementation
We do not count the bytes in the rowCache because it should be empty for a KeyValue in the
MemStore.
|
void |
set(KeyValue.KeyOnlyKeyValue keyOnlyKeyValue) |
void |
setKey(byte[] key,
int offset,
int length)
A setter that helps to avoid object creation every time and whenever there is a need to
create new KeyOnlyKeyValue.
|
String |
toString() |
int |
write(OutputStream out,
boolean withTags)
Write this cell to an OutputStream in a
KeyValue format. |
checkParameters, clone, create, create, createKeyOnly, deepClone, getBuffer, getDelimiter, getDelimiterInReverse, getFamilyLength, getFamilyOffset, getKeyDataStructureSize, getKeyString, getKeyValueDataStructureSize, getKeyValueDataStructureSize, getKeyValueDataStructureSize, getLength, getOffset, getQualifierLength, getQualifierOffset, getSequenceId, getSerializedSize, getSerializedSize, getTimestamp, humanReadableTimestamp, isLatestTimestamp, keyToString, keyToString, oswrite, setSequenceId, setTimestamp, setTimestamp, shallowCopy, toStringMap, updateLatestStamp, write, write, writeByteArrayfinalize, getClass, notify, notifyAll, wait, wait, waitgetChunkIdcheckForTagsLength, cloneTags, createCell, getTag, getTagsprivate short rowLen
public KeyOnlyKeyValue()
public KeyOnlyKeyValue(byte[] b)
public KeyOnlyKeyValue(byte[] b, int offset, int length)
public void set(KeyValue.KeyOnlyKeyValue keyOnlyKeyValue)
public void clear()
public int getKeyOffset()
KeyValuegetKeyOffset in class KeyValuepublic void setKey(byte[] key, int offset, int length)
key - Key to setoffset - Offset of the Keylength - length of the Keypublic byte[] getKey()
KeyValueKeyValue.getRowArray(), KeyValue.getFamilyArray(), KeyValue.getQualifierArray(), and
KeyValue.getValueArray() if accessing a KeyValue client-side.public byte[] getRowArray()
KeyValuegetRowArray in interface CellgetRowArray in class KeyValuepublic int getRowOffset()
KeyValuegetRowOffset in interface CellgetRowOffset in class KeyValuepublic byte[] getFamilyArray()
KeyValuegetFamilyArray in interface CellgetFamilyArray in class KeyValuepublic byte getFamilyLength()
KeyValuegetFamilyLength in interface CellgetFamilyLength in class KeyValueint getFamilyLengthPosition(int rowLength)
getFamilyLengthPosition in class KeyValuepublic int getFamilyOffset()
KeyValuegetFamilyOffset in interface CellgetFamilyOffset in class KeyValuepublic byte[] getQualifierArray()
KeyValuegetQualifierArray in interface CellgetQualifierArray in class KeyValuepublic int getQualifierLength()
KeyValuegetQualifierLength in interface CellgetQualifierLength in class KeyValuepublic int getQualifierOffset()
KeyValuegetQualifierOffset in interface CellgetQualifierOffset in class KeyValuepublic int getKeyLength()
KeyValuegetKeyLength in class KeyValuepublic short getRowLength()
KeyValuegetRowLength in interface CellgetRowLength in class KeyValuepublic byte getTypeByte()
KeyValuegetTypeByte in interface CellgetTypeByte in interface ExtendedCellgetTypeByte in class KeyValuebyte getTypeByte(int keyLength)
KeyValuegetTypeByte in class KeyValueprivate int getQualifierLength(int rlength, int flength)
public long getTimestamp()
KeyValuegetTimestamp in interface CellgetTimestamp in class KeyValuepublic int getTimestampOffset()
KeyValuegetTimestampOffset in class KeyValuepublic byte[] getTagsArray()
KeyValuegetTagsArray in interface CellgetTagsArray in interface ExtendedCellgetTagsArray in class KeyValuepublic int getTagsOffset()
KeyValuegetTagsOffset in interface CellgetTagsOffset in interface ExtendedCellgetTagsOffset in class KeyValuepublic byte[] getValueArray()
KeyValuegetValueArray in interface CellgetValueArray in class KeyValuepublic int getValueOffset()
KeyValuegetValueOffset in interface CellgetValueOffset in class KeyValuepublic int getValueLength()
KeyValuegetValueLength in interface CellgetValueLength in class KeyValuepublic int getTagsLength()
KeyValuegetTagsLength in interface CellgetTagsLength in interface ExtendedCellgetTagsLength in class KeyValuepublic int hashCode()
KeyValueKeyValue.equals(Object), only uses the key portion, not the value.public boolean equals(Object other)
KeyValuepublic long heapSize()
KeyValuepublic int write(OutputStream out, boolean withTags) throws IOException
ExtendedCellKeyValue format. <4 bytes keylength> <4 bytes valuelength> <2 bytes rowlength>
<row> <1 byte columnfamilylength> <columnfamily> <columnqualifier>
<8 bytes timestamp> <1 byte keytype> <value> <2 bytes tagslength>
<tags>write in interface ExtendedCellwrite in class KeyValueout - Stream to which cell has to be writtenwithTags - Whether to write tags.IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.