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()
Contiguous bytes composed of legal HDFS filename characters which may start at any index in the
containing array.
|
byte |
getFamilyLength() |
int |
getFamilyOffset() |
byte[] |
getKey()
Do not use unless you have to.
|
int |
getKeyLength() |
int |
getKeyOffset() |
byte[] |
getQualifierArray()
Contiguous raw bytes that may start at any index in the containing array.
|
int |
getQualifierLength() |
private int |
getQualifierLength(int rlength,
int flength) |
int |
getQualifierOffset() |
byte[] |
getRowArray()
Contiguous raw bytes that may start at any index in the containing array.
|
short |
getRowLength() |
int |
getRowOffset() |
byte[] |
getTagsArray()
Contiguous raw bytes representing tags that may start at any index in the containing array.
|
int |
getTagsLength()
This returns the total length of the tag bytes
|
int |
getTagsOffset()
This returns the offset where the tag actually starts.
|
long |
getTimestamp() |
int |
getTimestampOffset() |
byte |
getTypeByte() |
byte[] |
getValueArray()
Contiguous raw bytes that may start at any index in the containing array.
|
int |
getValueLength() |
int |
getValueOffset() |
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, getKeyDataStructureSize, getKeyString, getKeyValueDataStructureSize, getKeyValueDataStructureSize, getKeyValueDataStructureSize, getLength, getOffset, 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, 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()
getKeyOffset in class KeyValuepublic void setKey(byte[] key, int offset, int length)
key - offset - length - public byte[] getKey()
KeyValueKeyValue.getRowArray(), KeyValue.getFamilyArray(), KeyValue.getQualifierArray(), and
KeyValue.getValueArray() if accessing a KeyValue client-side.public byte[] getRowArray()
CellgetRowArray in interface CellgetRowArray in class KeyValuepublic int getRowOffset()
getRowOffset in interface CellgetRowOffset in class KeyValuepublic byte[] getFamilyArray()
CellgetFamilyArray in interface CellgetFamilyArray in class KeyValuepublic byte getFamilyLength()
getFamilyLength in interface CellgetFamilyLength in class KeyValuepublic int getFamilyOffset()
getFamilyOffset in interface CellgetFamilyOffset in class KeyValuepublic byte[] getQualifierArray()
CellgetQualifierArray in interface CellgetQualifierArray in class KeyValuepublic int getQualifierLength()
getQualifierLength in interface CellgetQualifierLength in class KeyValuepublic int getQualifierOffset()
getQualifierOffset in interface CellgetQualifierOffset in class KeyValuepublic int getKeyLength()
getKeyLength in class KeyValuepublic short getRowLength()
getRowLength in interface CellgetRowLength in class KeyValuepublic byte getTypeByte()
getTypeByte in interface CellgetTypeByte in interface ExtendedCellgetTypeByte in class KeyValueprivate int getQualifierLength(int rlength, int flength)
public long getTimestamp()
getTimestamp in interface CellgetTimestamp in class KeyValuepublic int getTimestampOffset()
getTimestampOffset in class KeyValuepublic byte[] getTagsArray()
ExtendedCellgetTagsArray in interface CellgetTagsArray in interface ExtendedCellgetTagsArray in class KeyValuepublic int getTagsOffset()
KeyValuegetTagsOffset in interface CellgetTagsOffset in interface ExtendedCellgetTagsOffset in class KeyValuepublic byte[] getValueArray()
CellgetValueArray in interface CellgetValueArray in class KeyValuepublic int getValueOffset()
getValueOffset in interface CellgetValueOffset in class KeyValuepublic int getValueLength()
getValueLength 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.