Package | Description |
---|---|
org.apache.hadoop.hbase | |
org.apache.hadoop.hbase.codec | |
org.apache.hadoop.hbase.io | |
org.apache.hadoop.hbase.io.encoding | |
org.apache.hadoop.hbase.util |
Modifier and Type | Class and Description |
---|---|
class |
KeyValue
An HBase Key/Value.
|
static class |
KeyValue.KeyOnlyKeyValue
A simple form of KeyValue that creates a keyvalue with only the key part of the byte[]
Mainly used in places where we need to compare two cells.
|
class |
NoTagsKeyValue
An extension of the KeyValue where the tags length is always 0
|
Modifier and Type | Field and Description |
---|---|
static Cell |
HConstants.NO_NEXT_INDEXED_KEY
The byte array represents for NO_NEXT_INDEXED_KEY;
The actual value is irrelevant because this is always compared by reference.
|
Modifier and Type | Method and Description |
---|---|
static Cell |
CellUtil.createCell(byte[] row)
Create a Cell with specific row.
|
static Cell |
CellUtil.createCell(byte[] row,
byte[] value)
Create a Cell with specific row and value.
|
static Cell |
CellUtil.createCell(byte[] row,
byte[] family,
byte[] qualifier)
Create a Cell with specific row.
|
static Cell |
CellUtil.createCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
byte type,
byte[] value) |
static Cell |
CellUtil.createCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
byte type,
byte[] value,
byte[] tags,
long memstoreTS) |
static Cell |
CellUtil.createCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
byte type,
byte[] value,
long memstoreTS) |
static Cell |
CellUtil.createCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
KeyValue.Type type,
byte[] value,
byte[] tags) |
static Cell |
CellUtil.createCell(byte[] rowArray,
int rowOffset,
int rowLength,
byte[] familyArray,
int familyOffset,
int familyLength,
byte[] qualifierArray,
int qualifierOffset,
int qualifierLength) |
Cell |
CellScanner.current() |
static Cell |
CellComparator.getMidpoint(KeyValue.KVComparator comparator,
Cell left,
Cell right)
Try to return a Cell that falls between
left and right but that is
shorter; i.e. |
Modifier and Type | Method and Description |
---|---|
static int |
KeyValueUtil.appendKeyTo(Cell cell,
byte[] output,
int offset) |
static int |
KeyValueUtil.appendToByteArray(Cell cell,
byte[] output,
int offset)
copy key and value
|
static boolean |
CellComparator.areKeyLengthsEqual(Cell a,
Cell b)
lengths
|
static boolean |
CellComparator.areRowLengthsEqual(Cell a,
Cell b) |
static KeyValue |
KeyValue.cloneAndAddTags(Cell c,
List<Tag> newTags)
Create a new KeyValue by copying existing cell and adding new tags
|
static byte[] |
CellUtil.cloneFamily(Cell cell) |
static byte[] |
CellUtil.cloneQualifier(Cell cell) |
static byte[] |
CellUtil.cloneRow(Cell cell)
get individual arrays for tests
|
static byte[] |
CellUtil.cloneValue(Cell cell) |
int |
KeyValue.MetaComparator.compare(Cell left,
Cell right)
Compare key portion of a
KeyValue for keys in hbase:meta
table. |
int |
KeyValue.KVComparator.compare(Cell left,
Cell right)
Compares the Key of a cell -- with fields being more significant in this order:
rowkey, colfam/qual, timestamp, type, mvcc
|
int |
KeyValue.RawBytesComparator.compare(Cell left,
Cell right) |
int |
CellComparator.compare(Cell a,
Cell b) |
int |
CellComparator.RowComparator.compare(Cell a,
Cell b) |
static int |
CellComparator.compare(Cell a,
Cell b,
boolean ignoreSequenceid)
Compare cells.
|
static int |
CellComparator.compareColumns(Cell left,
Cell right) |
static int |
CellComparator.compareCommonFamilyPrefix(Cell left,
Cell right,
int familyCommonPrefix) |
static int |
CellComparator.compareCommonQualifierPrefix(Cell left,
Cell right,
int qualCommonPrefix) |
static int |
CellComparator.compareCommonRowPrefix(Cell left,
Cell right,
int rowCommonPrefix) |
static int |
CellComparator.compareFamilies(Cell left,
Cell right) |
int |
CellComparator.compareFlatKey(Cell left,
Cell right) |
int |
KeyValue.KVComparator.compareKey(Cell cell,
byte[] row,
int roff,
int rlen,
byte[] fam,
int foff,
int flen,
byte[] col,
int coff,
int clen,
long ts,
byte type) |
int |
KeyValue.MetaComparator.compareOnlyKeyPortion(Cell left,
Cell right) |
int |
KeyValue.KVComparator.compareOnlyKeyPortion(Cell left,
Cell right) |
int |
KeyValue.RawBytesComparator.compareOnlyKeyPortion(Cell left,
Cell right) |
static int |
CellComparator.compareQualifiers(Cell left,
Cell right) |
protected int |
KeyValue.MetaComparator.compareRowKey(Cell l,
Cell r)
Override the row key comparison to parse and compare the meta row key parts.
|
protected int |
KeyValue.KVComparator.compareRowKey(Cell left,
Cell right)
Compares the only the user specified portion of a Key.
|
int |
KeyValue.KVComparator.compareRows(Cell left,
Cell right) |
static int |
CellComparator.compareRows(Cell left,
Cell right)
Do not use comparing rows from hbase:meta.
|
int |
KeyValue.KVComparator.compareTimestamps(Cell left,
Cell right) |
static int |
CellComparator.compareTimestamps(Cell left,
Cell right) |
static int |
CellComparator.compareWithoutRow(Cell leftCell,
Cell rightCell) |
static int |
CellUtil.copyFamilyTo(Cell cell,
byte[] destination,
int destinationOffset) |
static ByteBuffer |
KeyValueUtil.copyKeyToNewByteBuffer(Cell cell)
The position will be set to the beginning of the new ByteBuffer
|
static int |
CellUtil.copyQualifierTo(Cell cell,
byte[] destination,
int destinationOffset) |
static int |
CellUtil.copyRowTo(Cell cell,
byte[] destination,
int destinationOffset)
copyTo
|
static int |
CellUtil.copyTagTo(Cell cell,
byte[] destination,
int destinationOffset)
Copies the tags info into the tag portion of the cell
|
static byte[] |
KeyValueUtil.copyToNewByteArray(Cell cell) |
static ByteBuffer |
KeyValueUtil.copyToNewByteBuffer(Cell cell)
The position will be set to the beginning of the new ByteBuffer
|
static KeyValue |
KeyValueUtil.copyToNewKeyValue(Cell cell)
copy key only
|
static int |
CellUtil.copyValueTo(Cell cell,
byte[] destination,
int destinationOffset) |
static CellScanner |
CellUtil.createCellScanner(Cell[] cellArray) |
static KeyValue |
KeyValueUtil.createFirstKeyInIncrementedRow(Cell in)
Increment the row bytes and clear the other fields
|
static KeyValue |
KeyValueUtil.createFirstKeyInNextRow(Cell in)
Append single byte 0x00 to the end of the input row key
|
static KeyValue |
KeyValueUtil.createFirstOnRowColTS(Cell kv,
long ts)
Creates the first KV with the row/family/qualifier of this KV and the given
timestamp.
|
static KeyValue |
KeyValueUtil.createLastOnRow(Cell kv)
Creates a keyValue for the specified keyvalue larger than or equal to all other possible
KeyValues that have the same row, family, qualifer.
|
static KeyValue |
KeyValueUtil.createLastOnRowCol(Cell kv)
Similar to
KeyValueUtil.createLastOnRow(byte[], int, int, byte[], int, int, byte[], int, int)
but creates the last key on the row/column of this KV (the value part of
the returned KV is always empty). |
static KeyValue |
KeyValueUtil.ensureKeyValue(Cell cell)
Deprecated.
without any replacement.
|
static boolean |
CellComparator.equals(Cell a,
Cell b)
equals
|
static boolean |
CellComparator.equalsFamily(Cell a,
Cell b) |
static boolean |
CellComparator.equalsIgnoreMvccVersion(Cell a,
Cell b)
special case for KeyValue.equals
|
static boolean |
CellComparator.equalsQualifier(Cell a,
Cell b) |
static boolean |
CellComparator.equalsRow(Cell a,
Cell b) |
static boolean |
CellComparator.equalsTimestamp(Cell a,
Cell b) |
static boolean |
CellComparator.equalsType(Cell a,
Cell b) |
static long |
CellUtil.estimatedHeapSizeOf(Cell cell)
This is an estimate of the heap space occupied by a cell.
|
static long |
CellUtil.estimatedHeapSizeOfWithoutTags(Cell cell)
Deprecated.
|
static int |
CellUtil.estimatedSerializedSizeOf(Cell cell) |
static int |
CellUtil.estimatedSerializedSizeOfKey(Cell cell) |
static int |
CellUtil.estimatedSizeOf(Cell cell)
Deprecated.
please use estimatedSerializedSizeOf(Cell)
|
static ByteRange |
CellUtil.fillFamilyRange(Cell cell,
ByteRange range) |
static ByteRange |
CellUtil.fillQualifierRange(Cell cell,
ByteRange range) |
static ByteRange |
CellUtil.fillRowRange(Cell cell,
ByteRange range)
ByteRange
|
static ByteRange |
CellUtil.fillTagRange(Cell cell,
ByteRange range) |
static ByteRange |
CellUtil.fillValueRange(Cell cell,
ByteRange range) |
static int |
CellComparator.findCommonPrefixInFamilyPart(Cell left,
Cell right,
int familyCommonPrefix) |
static int |
CellUtil.findCommonPrefixInFlatKey(Cell c1,
Cell c2,
boolean bypassFamilyCheck,
boolean withTsType)
Find length of common prefix in keys of the cells, considering key as byte[] if serialized in
KeyValue . |
static int |
CellComparator.findCommonPrefixInQualifierPart(Cell left,
Cell right,
int qualifierCommonPrefix) |
static int |
CellComparator.findCommonPrefixInRowPart(Cell left,
Cell right,
int rowCommonPrefix) |
static String |
CellUtil.getCellKeyAsString(Cell cell) |
static byte[] |
CellUtil.getCellKeySerializedAsKeyValueKey(Cell cell)
This method exists just to encapsulate how we serialize keys.
|
static Cell |
CellComparator.getMidpoint(KeyValue.KVComparator comparator,
Cell left,
Cell right)
Try to return a Cell that falls between
left and right but that is
shorter; i.e. |
static ByteBuffer |
CellUtil.getQualifierBufferShallowCopy(Cell cell) |
static byte |
CellUtil.getRowByte(Cell cell,
int index)
misc
|
static byte[] |
CellUtil.getTagArray(Cell cell)
Returns tag value in a new byte array.
|
static ByteBuffer |
CellUtil.getValueBufferShallowCopy(Cell cell) |
static int |
CellComparator.hashCode(Cell cell)
Returns a hash code that is always the same for two Cells having a matching equals(..) result.
|
static int |
CellComparator.hashCodeIgnoreMvcc(Cell cell)
Returns a hash code that is always the same for two Cells having a matching
equals(..) result.
|
static boolean |
CellUtil.isDelete(Cell cell) |
static boolean |
CellUtil.isDeleteColumnOrFamily(Cell cell) |
static boolean |
CellUtil.isDeleteColumns(Cell cell) |
static boolean |
CellUtil.isDeleteColumnVersion(Cell cell) |
static boolean |
CellUtil.isDeleteFamily(Cell cell) |
static boolean |
CellUtil.isDeleteFamilyVersion(Cell cell) |
static boolean |
CellUtil.isDeleteType(Cell cell) |
static int |
KeyValueUtil.keyLength(Cell cell)
Returns number of bytes this cell's key part would have been used if serialized as in
KeyValue . |
static int |
KeyValueUtil.length(Cell cell)
Returns number of bytes this cell would have been used if serialized as in
KeyValue |
static boolean |
CellUtil.matchingColumn(Cell left,
byte[] fam,
byte[] qual) |
static boolean |
CellUtil.matchingColumn(Cell left,
byte[] fam,
int foffset,
int flength,
byte[] qual,
int qoffset,
int qlength) |
static boolean |
CellUtil.matchingColumn(Cell left,
Cell right) |
static boolean |
CellUtil.matchingFamily(Cell left,
byte[] buf) |
static boolean |
CellUtil.matchingFamily(Cell left,
byte[] buf,
int offset,
int length) |
static boolean |
CellUtil.matchingFamily(Cell left,
Cell right) |
static boolean |
CellUtil.matchingQualifier(Cell left,
byte[] buf) |
static boolean |
CellUtil.matchingQualifier(Cell left,
byte[] buf,
int offset,
int length) |
static boolean |
CellUtil.matchingQualifier(Cell left,
Cell right) |
static boolean |
CellUtil.matchingRow(Cell left,
byte[] buf) |
static boolean |
CellUtil.matchingRow(Cell left,
byte[] buf,
int offset,
int length) |
static boolean |
CellUtil.matchingRow(Cell left,
Cell right) |
boolean |
KeyValue.KVComparator.matchingRowColumn(Cell left,
Cell right)
Compares the row and column of two keyvalues for equality
|
boolean |
KeyValue.KVComparator.matchingRows(Cell left,
Cell right)
Compares the row of two keyvalues for equality
|
static boolean |
CellUtil.matchingValue(Cell left,
byte[] buf) |
static boolean |
CellUtil.matchingValue(Cell left,
Cell right) |
static void |
KeyValueUtil.oswrite(Cell cell,
OutputStream out,
boolean withTags) |
static void |
CellUtil.setSequenceId(Cell cell,
long seqId)
Sets the given seqId to the cell.
|
static void |
CellUtil.setTimestamp(Cell cell,
byte[] ts,
int tsOffset)
Sets the given timestamp to the cell.
|
static void |
CellUtil.setTimestamp(Cell cell,
long ts)
Sets the given timestamp to the cell.
|
static String |
CellUtil.toString(Cell cell,
boolean verbose)
Returns a string representation of the cell
|
static boolean |
CellUtil.updateLatestStamp(Cell cell,
byte[] ts,
int tsOffset)
Sets the given timestamp to the cell iff current timestamp is
HConstants.LATEST_TIMESTAMP . |
static boolean |
CellUtil.updateLatestStamp(Cell cell,
long ts)
Sets the given timestamp to the cell iff current timestamp is
HConstants.LATEST_TIMESTAMP . |
static void |
CellUtil.writeFlatKey(Cell cell,
DataOutputStream out)
Writes the Cell's key part as it would have serialized in a KeyValue.
|
static void |
CellUtil.writeRowKeyExcludingCommon(Cell cell,
short rLen,
int commonPrefix,
DataOutputStream out)
Write rowkey excluding the common part.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
KeyValueTestUtil.containsIgnoreMvccVersion(Collection<? extends Cell> kvCollection1,
Collection<? extends Cell> kvCollection2)
Checks whether KeyValues from kvCollection2 are contained in kvCollection1.
|
static boolean |
KeyValueTestUtil.containsIgnoreMvccVersion(Collection<? extends Cell> kvCollection1,
Collection<? extends Cell> kvCollection2)
Checks whether KeyValues from kvCollection2 are contained in kvCollection1.
|
static CellScanner |
CellUtil.createCellScanner(Iterable<Cell> cellIterable) |
static CellScanner |
CellUtil.createCellScanner(Iterator<Cell> cells) |
static CellScanner |
CellUtil.createCellScanner(NavigableMap<byte[],List<Cell>> map)
Flatten the map of cells out under the CellScanner
|
static List<KeyValue> |
KeyValueUtil.ensureKeyValues(List<Cell> cells)
Deprecated.
|
Constructor and Description |
---|
KeyValue(Cell c) |
Modifier and Type | Method and Description |
---|---|
Cell |
BaseDecoder.current() |
protected Cell |
KeyValueCodecWithTags.KeyValueDecoder.parseCell() |
protected Cell |
KeyValueCodec.KeyValueDecoder.parseCell() |
protected abstract Cell |
BaseDecoder.parseCell() |
Modifier and Type | Method and Description |
---|---|
void |
KeyValueCodecWithTags.KeyValueEncoder.write(Cell cell) |
void |
KeyValueCodec.KeyValueEncoder.write(Cell cell) |
abstract void |
BaseEncoder.write(Cell cell) |
Modifier and Type | Method and Description |
---|---|
void |
CellOutputStream.write(Cell cell)
Implementation must copy the entire state of the Cell.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
BufferedDataBlockEncoder.SeekerState |
protected static class |
DiffKeyDeltaEncoder.DiffSeekerState |
protected static class |
FastDiffDeltaEncoder.FastDiffSeekerState |
Modifier and Type | Field and Description |
---|---|
protected Cell |
EncodingState.prevCell
The previous Cell the encoder encoded.
|
Modifier and Type | Method and Description |
---|---|
Cell |
DataBlockEncoder.EncodedSeeker.getKeyValue() |
Modifier and Type | Method and Description |
---|---|
Iterator<Cell> |
EncodedDataBlock.getIterator(int headerSize)
Provides access to compressed value.
|
Modifier and Type | Method and Description |
---|---|
int |
DataBlockEncoder.EncodedSeeker.compareKey(KeyValue.KVComparator comparator,
Cell key) |
int |
DataBlockEncoder.encode(Cell cell,
HFileBlockEncodingContext encodingCtx,
DataOutputStream out)
Encodes a KeyValue.
|
int |
PrefixKeyDeltaEncoder.internalEncode(Cell cell,
HFileBlockDefaultEncodingContext encodingContext,
DataOutputStream out) |
int |
FastDiffDeltaEncoder.internalEncode(Cell cell,
HFileBlockDefaultEncodingContext encodingContext,
DataOutputStream out) |
int |
DiffKeyDeltaEncoder.internalEncode(Cell cell,
HFileBlockDefaultEncodingContext encodingContext,
DataOutputStream out) |
int |
CopyKeyDataBlockEncoder.internalEncode(Cell cell,
HFileBlockDefaultEncodingContext encodingContext,
DataOutputStream out) |
int |
DataBlockEncoder.EncodedSeeker.seekToKeyInBlock(Cell key,
boolean seekBefore)
Moves the seeker position within the current block to:
the last key that that is less than or equal to the given key if
seekBefore is false
the last key that is strictly less than the given key if
seekBefore is true. |
Modifier and Type | Method and Description |
---|---|
static int |
Bytes.binarySearch(byte[][] arr,
Cell key,
org.apache.hadoop.io.RawComparator<Cell> comparator)
Binary search for keys in indexes.
|
Modifier and Type | Method and Description |
---|---|
static int |
Bytes.binarySearch(byte[][] arr,
Cell key,
org.apache.hadoop.io.RawComparator<Cell> comparator)
Binary search for keys in indexes.
|
Copyright © 2007-2015 The Apache Software Foundation. All Rights Reserved.