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_SIZE
CELL_NOT_BASED_ON_CHUNK
MAX_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, getTimestamp, humanReadableTimestamp, isLatestTimestamp, keyToString, keyToString, oswrite, setSequenceId, setTimestamp, setTimestamp, shallowCopy, toStringMap, updateLatestStamp, write, write, writeByteArray
finalize, getClass, notify, notifyAll, wait, wait, wait
getChunkId, getSerializedSize
checkForTagsLength, cloneTags, getTag, getTags
private 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 KeyValue
public void setKey(byte[] key, int offset, int length)
key
- offset
- length
- public byte[] getKey()
KeyValue
KeyValue.getRowArray()
, KeyValue.getFamilyArray()
, KeyValue.getQualifierArray()
, and
KeyValue.getValueArray()
if accessing a KeyValue client-side.public byte[] getRowArray()
Cell
getRowArray
in interface Cell
getRowArray
in class KeyValue
public int getRowOffset()
getRowOffset
in interface Cell
getRowOffset
in class KeyValue
public byte[] getFamilyArray()
Cell
getFamilyArray
in interface Cell
getFamilyArray
in class KeyValue
public byte getFamilyLength()
getFamilyLength
in interface Cell
getFamilyLength
in class KeyValue
public int getFamilyOffset()
getFamilyOffset
in interface Cell
getFamilyOffset
in class KeyValue
public byte[] getQualifierArray()
Cell
getQualifierArray
in interface Cell
getQualifierArray
in class KeyValue
public int getQualifierLength()
getQualifierLength
in interface Cell
getQualifierLength
in class KeyValue
public int getQualifierOffset()
getQualifierOffset
in interface Cell
getQualifierOffset
in class KeyValue
public int getKeyLength()
getKeyLength
in class KeyValue
public short getRowLength()
getRowLength
in interface Cell
getRowLength
in class KeyValue
public byte getTypeByte()
getTypeByte
in interface Cell
getTypeByte
in interface ExtendedCell
getTypeByte
in class KeyValue
private int getQualifierLength(int rlength, int flength)
public long getTimestamp()
getTimestamp
in interface Cell
getTimestamp
in class KeyValue
public int getTimestampOffset()
getTimestampOffset
in class KeyValue
public byte[] getTagsArray()
ExtendedCell
getTagsArray
in interface Cell
getTagsArray
in interface ExtendedCell
getTagsArray
in class KeyValue
public int getTagsOffset()
KeyValue
getTagsOffset
in interface Cell
getTagsOffset
in interface ExtendedCell
getTagsOffset
in class KeyValue
public byte[] getValueArray()
Cell
getValueArray
in interface Cell
getValueArray
in class KeyValue
public int getValueOffset()
getValueOffset
in interface Cell
getValueOffset
in class KeyValue
public int getValueLength()
getValueLength
in interface Cell
getValueLength
in class KeyValue
public int getTagsLength()
KeyValue
getTagsLength
in interface Cell
getTagsLength
in interface ExtendedCell
getTagsLength
in class KeyValue
public int hashCode()
KeyValue
KeyValue.equals(Object)
, only uses the key portion, not the value.public boolean equals(Object other)
KeyValue
public long heapSize()
KeyValue
public int write(OutputStream out, boolean withTags) throws IOException
ExtendedCell
KeyValue
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 ExtendedCell
write
in class KeyValue
out
- Stream to which cell has to be writtenwithTags
- Whether to write tags.IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.