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()
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, writeByteArray
finalize, getClass, notify, notifyAll, wait, wait, wait
getChunkId
checkForTagsLength, cloneTags, createCell, 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()
KeyValue
getKeyOffset
in class KeyValue
public void setKey(byte[] key, int offset, int length)
key
- Key to setoffset
- Offset of the Keylength
- length of the Keypublic byte[] getKey()
KeyValue
KeyValue.getRowArray()
, KeyValue.getFamilyArray()
, KeyValue.getQualifierArray()
, and
KeyValue.getValueArray()
if accessing a KeyValue client-side.public byte[] getRowArray()
KeyValue
getRowArray
in interface Cell
getRowArray
in class KeyValue
public int getRowOffset()
KeyValue
getRowOffset
in interface Cell
getRowOffset
in class KeyValue
public byte[] getFamilyArray()
KeyValue
getFamilyArray
in interface Cell
getFamilyArray
in class KeyValue
public byte getFamilyLength()
KeyValue
getFamilyLength
in interface Cell
getFamilyLength
in class KeyValue
int getFamilyLengthPosition(int rowLength)
getFamilyLengthPosition
in class KeyValue
public int getFamilyOffset()
KeyValue
getFamilyOffset
in interface Cell
getFamilyOffset
in class KeyValue
public byte[] getQualifierArray()
KeyValue
getQualifierArray
in interface Cell
getQualifierArray
in class KeyValue
public int getQualifierLength()
KeyValue
getQualifierLength
in interface Cell
getQualifierLength
in class KeyValue
public int getQualifierOffset()
KeyValue
getQualifierOffset
in interface Cell
getQualifierOffset
in class KeyValue
public int getKeyLength()
KeyValue
getKeyLength
in class KeyValue
public short getRowLength()
KeyValue
getRowLength
in interface Cell
getRowLength
in class KeyValue
public byte getTypeByte()
KeyValue
getTypeByte
in interface Cell
getTypeByte
in interface ExtendedCell
getTypeByte
in class KeyValue
byte getTypeByte(int keyLength)
KeyValue
getTypeByte
in class KeyValue
private int getQualifierLength(int rlength, int flength)
public long getTimestamp()
KeyValue
getTimestamp
in interface Cell
getTimestamp
in class KeyValue
public int getTimestampOffset()
KeyValue
getTimestampOffset
in class KeyValue
public byte[] getTagsArray()
KeyValue
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()
KeyValue
getValueArray
in interface Cell
getValueArray
in class KeyValue
public int getValueOffset()
KeyValue
getValueOffset
in interface Cell
getValueOffset
in class KeyValue
public int getValueLength()
KeyValue
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–2020 The Apache Software Foundation. All rights reserved.