@InterfaceAudience.Public public final class CellUtil extends Object
Cell
instances. Some methods below are for internal
use only and are marked InterfaceAudience.Private at the method level. Note that all such methods
have been marked deprecated in HBase-2.0 which will be subsequently removed in HBase-3.0Modifier | Constructor and Description |
---|---|
private |
CellUtil()
Private constructor to keep this class from being instantiated.
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
cloneFamily(Cell cell) |
static byte[] |
cloneQualifier(Cell cell) |
static byte[] |
cloneRow(Cell cell)
get individual arrays for tests
|
static byte[] |
cloneTags(Cell cell)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0.
Use
RawCell.cloneTags() |
static byte[] |
cloneValue(Cell cell) |
static int |
compare(CellComparator comparator,
Cell left,
byte[] key,
int offset,
int length)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0
|
static int |
compareColumns(Cell left,
byte[] right,
int rfoffset,
int rflength,
int rqoffset,
int rqlength)
Compares the cell's column (family and qualifier) with the given byte[]
|
static int |
compareFamilies(Cell left,
byte[] right,
int roffset,
int rlength)
Compares the cell's family with the given byte[]
|
static int |
compareQualifiers(Cell left,
byte[] right,
int rOffset,
int rLength)
Compares the cell's qualifier with the given byte[]
|
static int |
copyFamilyTo(Cell cell,
byte[] destination,
int destinationOffset)
Copies the family to the given byte[]
|
static int |
copyFamilyTo(Cell cell,
ByteBuffer destination,
int destinationOffset)
Copies the family to the given bytebuffer
|
static int |
copyQualifierTo(Cell cell,
byte[] destination,
int destinationOffset)
Copies the qualifier to the given byte[]
|
static int |
copyQualifierTo(Cell cell,
ByteBuffer destination,
int destinationOffset)
Copies the qualifier to the given bytebuffer
|
static byte[] |
copyRow(Cell cell)
Copies the row to a new byte[]
|
static int |
copyRowTo(Cell cell,
byte[] destination,
int destinationOffset)
Copies the row to the given byte[]
|
static int |
copyRowTo(Cell cell,
ByteBuffer destination,
int destinationOffset)
Copies the row to the given bytebuffer
|
static int |
copyTagTo(Cell cell,
byte[] destination,
int destinationOffset)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0.
|
static int |
copyTagTo(Cell cell,
ByteBuffer destination,
int destinationOffset)
Deprecated.
As of HBase-2.0. Will be removed in 3.0.
|
static int |
copyValueTo(Cell cell,
byte[] destination,
int destinationOffset)
Copies the value to the given byte[]
|
static int |
copyValueTo(Cell cell,
ByteBuffer destination,
int destinationOffset)
Copies the value to the given bytebuffer
|
static Cell |
createCell(byte[] row)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Use
CellBuilder
instead |
static Cell |
createCell(byte[] row,
byte[] value)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Use
CellBuilder
instead |
static Cell |
createCell(byte[] row,
byte[] family,
byte[] qualifier)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Use
CellBuilder
instead |
static Cell |
createCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
byte type,
byte[] value)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Use
CellBuilder
instead |
static Cell |
createCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
byte type,
byte[] value,
byte[] tags,
long memstoreTS)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Use
ExtendedCellBuilder instead |
static Cell |
createCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
byte type,
byte[] value,
long memstoreTS)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Use
ExtendedCellBuilder instead |
static Cell |
createCell(byte[] row,
byte[] family,
byte[] qualifier,
long timestamp,
KeyValue.Type type,
byte[] value,
byte[] tags)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Use
ExtendedCellBuilder instead |
static Cell |
createCell(byte[] rowArray,
int rowOffset,
int rowLength,
byte[] familyArray,
int familyOffset,
int familyLength,
byte[] qualifierArray,
int qualifierOffset,
int qualifierLength)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Use
CellBuilder
instead |
static Cell |
createCell(Cell cell,
byte[] tags)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static Cell |
createCell(Cell cell,
byte[] value,
byte[] tags)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static Cell |
createCell(Cell cell,
List<Tag> tags)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static CellScanner |
createCellScanner(Cell[] cellArray) |
static CellScanner |
createCellScanner(Iterable<Cell> cellIterable) |
static CellScanner |
createCellScanner(Iterator<Cell> cells) |
static CellScanner |
createCellScanner(List<? extends CellScannable> cellScannerables) |
static CellScanner |
createCellScanner(NavigableMap<byte[],List<Cell>> map)
Flatten the map of cells out under the CellScanner
|
static boolean |
equals(Cell a,
Cell b)
equals
|
static boolean |
equalsIgnoreMvccVersion(Cell a,
Cell b)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0
|
static long |
estimatedHeapSizeOf(Cell cell)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
Use
RawCell.getTags() |
static int |
estimatedSerializedSizeOf(Cell cell)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static int |
estimatedSerializedSizeOfKey(Cell cell)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static ByteRange |
fillFamilyRange(Cell cell,
ByteRange range)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0.
|
static ByteRange |
fillQualifierRange(Cell cell,
ByteRange range)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0.
|
static ByteRange |
fillRowRange(Cell cell,
ByteRange range)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0.
|
static ByteRange |
fillTagRange(Cell cell,
ByteRange range)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0.
|
static ByteRange |
fillValueRange(Cell cell,
ByteRange range)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0.
|
static int |
findCommonPrefixInFlatKey(Cell c1,
Cell c2,
boolean bypassFamilyCheck,
boolean withTsType)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0
|
static String |
getCellKeyAsString(Cell cell) |
static String |
getCellKeyAsString(Cell cell,
Function<Cell,String> rowConverter) |
static byte[] |
getCellKeySerializedAsKeyValueKey(Cell cell)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0
|
static ByteBuffer |
getQualifierBufferShallowCopy(Cell cell)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static byte |
getRowByte(Cell cell,
int index)
Deprecated.
|
private static int |
getSumOfCellElementLengths(Cell cell) |
private static int |
getSumOfCellKeyElementLengths(Cell cell) |
static Tag |
getTag(Cell cell,
byte type)
Deprecated.
As of 2.0.0 and will be removed in HBase-3.0.0
Use
RawCell.getTag(byte) |
static byte[] |
getTagArray(Cell cell)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0
|
static List<Tag> |
getTags(Cell cell)
Deprecated.
As of 2.0.0 and will be removed in 3.0.0
|
static ByteBuffer |
getValueBufferShallowCopy(Cell cell)
Deprecated.
As of HBase-2.0. Will be removed in 3.0.
|
static boolean |
isDelete(byte type)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static boolean |
isDelete(Cell cell) |
static boolean |
isDeleteColumnOrFamily(Cell cell)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static boolean |
isDeleteColumns(Cell cell)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static boolean |
isDeleteColumnVersion(Cell cell)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static boolean |
isDeleteFamily(Cell cell)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static boolean |
isDeleteFamilyVersion(Cell cell)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static boolean |
isDeleteType(Cell cell)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static boolean |
isPut(Cell cell) |
static byte[] |
makeColumn(byte[] family,
byte[] qualifier)
Makes a column in family:qualifier form from separate byte arrays.
|
static boolean |
matchingColumn(Cell left,
byte[] fam,
byte[] qual) |
static boolean |
matchingColumn(Cell left,
byte[] fam,
int foffset,
int flength,
byte[] qual,
int qoffset,
int qlength)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static boolean |
matchingColumn(Cell left,
Cell right) |
static boolean |
matchingColumnFamilyAndQualifierPrefix(Cell left,
byte[] fam,
byte[] qual) |
static boolean |
matchingFamily(Cell left,
byte[] buf) |
static boolean |
matchingFamily(Cell left,
byte[] buf,
int offset,
int length)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static boolean |
matchingFamily(Cell left,
Cell right) |
static boolean |
matchingQualifier(Cell left,
byte[] buf)
Finds if the qualifier part of the cell and the KV serialized byte[] are equal
|
static boolean |
matchingQualifier(Cell left,
byte[] buf,
int offset,
int length)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0.
|
static boolean |
matchingQualifier(Cell left,
Cell right) |
static boolean |
matchingRow(Cell left,
byte[] buf)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Instead use
matchingRows(Cell, byte[]) |
static boolean |
matchingRow(Cell left,
byte[] buf,
int offset,
int length)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Instead use
matchingRows(Cell, Cell) |
static boolean |
matchingRow(Cell left,
Cell right)
Deprecated.
As of release 2.0.0, this will be removed in HBase 3.0.0. Instead use
matchingRows(Cell, Cell) |
static boolean |
matchingRowColumn(Cell left,
Cell right)
Compares the row and column of two keyvalues for equality
|
static boolean |
matchingRowColumnBytes(Cell left,
Cell right) |
static boolean |
matchingRows(Cell left,
byte[] buf) |
static boolean |
matchingRows(Cell left,
Cell right)
Compares the row of two keyvalues for equality
|
static boolean |
matchingTimestamp(Cell a,
Cell b) |
static boolean |
matchingType(Cell a,
Cell b)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0
|
static boolean |
matchingValue(Cell left,
byte[] buf) |
static boolean |
matchingValue(Cell left,
Cell right) |
static boolean |
overlappingKeys(byte[] start1,
byte[] end1,
byte[] start2,
byte[] end2)
Deprecated.
As of 2.0.0 and will be removed in 3.0.0
|
static byte[][] |
parseColumn(byte[] c)
Splits a column in
family:qualifier form into separate byte arrays. |
static void |
setSequenceId(Cell cell,
long seqId)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0
|
static void |
setTimestamp(Cell cell,
byte[] ts,
int tsOffset)
Deprecated.
As of HBase-2.0. Will be a LimitedPrivate API in HBase-3.0.
|
static void |
setTimestamp(Cell cell,
long ts)
Deprecated.
As of HBase-2.0. Will be a LimitedPrivate API in HBase-3.0.
|
static Iterator<Tag> |
tagsIterator(byte[] tags,
int offset,
int length)
Deprecated.
As of 2.0.0 and will be removed in 3.0.0 Instead use
PrivateCellUtil.tagsIterator(Cell) |
static String |
toString(Cell cell,
boolean verbose)
Returns a string representation of the cell
|
static boolean |
updateLatestStamp(Cell cell,
byte[] ts,
int tsOffset)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0
|
static boolean |
updateLatestStamp(Cell cell,
long ts)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0
|
static void |
writeFlatKey(Cell cell,
DataOutputStream out)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0
|
static void |
writeRowKeyExcludingCommon(Cell cell,
short rLen,
int commonPrefix,
DataOutputStream out)
Deprecated.
As of HBase-2.0. Will be removed in HBase-3.0
|
static void |
writeRowSkippingBytes(DataOutputStream out,
Cell cell,
short rlength,
int commonPrefix)
Deprecated.
As of 2.0. Will be removed in hbase-3.0
|
private CellUtil()
@Deprecated public static ByteRange fillRowRange(Cell cell, ByteRange range)
@Deprecated public static ByteRange fillFamilyRange(Cell cell, ByteRange range)
@Deprecated public static ByteRange fillQualifierRange(Cell cell, ByteRange range)
@Deprecated public static ByteRange fillValueRange(Cell cell, ByteRange range)
@Deprecated public static ByteRange fillTagRange(Cell cell, ByteRange range)
public static byte[] cloneFamily(Cell cell)
public static byte[] cloneQualifier(Cell cell)
public static byte[] cloneValue(Cell cell)
@Deprecated public static byte[] cloneTags(Cell cell)
RawCell.cloneTags()
@Deprecated public static byte[] getTagArray(Cell cell)
Tag.getValueArray()
with
appropriate Tag.getValueOffset()
and Tag.getValueLength()
instead to save on
allocations.cell
- public static byte[] makeColumn(byte[] family, byte[] qualifier)
Not recommended for usage as this is old-style API.
family
- qualifier
- public static byte[][] parseColumn(byte[] c)
family:qualifier
form into separate byte arrays. An empty qualifier
(ie, fam:
) is parsed as { fam, EMPTY_BYTE_ARRAY }
while no delimiter (ie,
fam
) is parsed as an array of one element, { fam }
.
Don't forget, HBase DOES support empty qualifiers. (see HBASE-9549)
Not recommend to be used as this is old-style API.
c
- The column.public static int copyRowTo(Cell cell, byte[] destination, int destinationOffset)
cell
- the cell whose row has to be copieddestination
- the destination byte[] to which the row has to be copieddestinationOffset
- the offset in the destination byte[]public static int copyRowTo(Cell cell, ByteBuffer destination, int destinationOffset)
cell
- cell the cell whose row has to be copieddestination
- the destination bytebuffer to which the row has to be copieddestinationOffset
- the offset in the destination byte[]public static byte[] copyRow(Cell cell)
cell
- the cell from which row has to copiedpublic static int copyFamilyTo(Cell cell, byte[] destination, int destinationOffset)
cell
- the cell whose family has to be copieddestination
- the destination byte[] to which the family has to be copieddestinationOffset
- the offset in the destination byte[]public static int copyFamilyTo(Cell cell, ByteBuffer destination, int destinationOffset)
cell
- the cell whose family has to be copieddestination
- the destination bytebuffer to which the family has to be copieddestinationOffset
- the offset in the destination bytebufferpublic static int copyQualifierTo(Cell cell, byte[] destination, int destinationOffset)
cell
- the cell whose qualifier has to be copieddestination
- the destination byte[] to which the qualifier has to be copieddestinationOffset
- the offset in the destination byte[]public static int copyQualifierTo(Cell cell, ByteBuffer destination, int destinationOffset)
cell
- the cell whose qualifier has to be copieddestination
- the destination bytebuffer to which the qualifier has to be copieddestinationOffset
- the offset in the destination bytebufferpublic static int copyValueTo(Cell cell, byte[] destination, int destinationOffset)
cell
- the cell whose value has to be copieddestination
- the destination byte[] to which the value has to be copieddestinationOffset
- the offset in the destination byte[]public static int copyValueTo(Cell cell, ByteBuffer destination, int destinationOffset)
cell
- the cell whose value has to be copieddestination
- the destination bytebuffer to which the value has to be copieddestinationOffset
- the offset in the destination bytebuffer@Deprecated public static int copyTagTo(Cell cell, byte[] destination, int destinationOffset)
cell
- destination
- destinationOffset
- @Deprecated public static int copyTagTo(Cell cell, ByteBuffer destination, int destinationOffset)
cell
- destination
- destinationOffset
- @InterfaceAudience.Private @Deprecated public static byte getRowByte(Cell cell, int index)
@Deprecated public static ByteBuffer getValueBufferShallowCopy(Cell cell)
@Deprecated public static ByteBuffer getQualifierBufferShallowCopy(Cell cell)
cell
- @Deprecated public static Cell createCell(byte[] row, byte[] family, byte[] qualifier, long timestamp, byte type, byte[] value)
CellBuilder
instead@Deprecated public static Cell createCell(byte[] rowArray, int rowOffset, int rowLength, byte[] familyArray, int familyOffset, int familyLength, byte[] qualifierArray, int qualifierOffset, int qualifierLength)
CellBuilder
instead@InterfaceAudience.Private @Deprecated public static Cell createCell(byte[] row, byte[] family, byte[] qualifier, long timestamp, byte type, byte[] value, long memstoreTS)
ExtendedCellBuilder
instead@InterfaceAudience.Private @Deprecated public static Cell createCell(byte[] row, byte[] family, byte[] qualifier, long timestamp, byte type, byte[] value, byte[] tags, long memstoreTS)
ExtendedCellBuilder
instead@InterfaceAudience.Private @Deprecated public static Cell createCell(byte[] row, byte[] family, byte[] qualifier, long timestamp, KeyValue.Type type, byte[] value, byte[] tags)
ExtendedCellBuilder
instead@Deprecated public static Cell createCell(byte[] row)
CellBuilder
insteadrow
- @Deprecated public static Cell createCell(byte[] row, byte[] value)
CellBuilder
insteadrow
- value
- @Deprecated public static Cell createCell(byte[] row, byte[] family, byte[] qualifier)
CellBuilder
insteadrow
- family
- qualifier
- @Deprecated public static Cell createCell(Cell cell, List<Tag> tags)
@Deprecated public static Cell createCell(Cell cell, byte[] tags)
@Deprecated public static Cell createCell(Cell cell, byte[] value, byte[] tags)
public static CellScanner createCellScanner(List<? extends CellScannable> cellScannerables)
cellScannerables
- cellIterables
public static CellScanner createCellScanner(Iterable<Cell> cellIterable)
cellIterable
- cellIterable
public static CellScanner createCellScanner(Iterator<Cell> cells)
cells
- cellIterable
or null if cells
is
nullpublic static CellScanner createCellScanner(Cell[] cellArray)
cellArray
- cellArray
public static CellScanner createCellScanner(NavigableMap<byte[],List<Cell>> map)
map
- Map of Cell Lists; for example, the map of families to Cells that is used inside
Put, etc., keeping Cells organized by family.cellIterable
@Deprecated public static boolean matchingRow(Cell left, Cell right)
matchingRows(Cell, Cell)
left
- right
- left
and right
Cells match@Deprecated public static boolean matchingRow(Cell left, byte[] buf)
matchingRows(Cell, byte[])
public static boolean matchingRows(Cell left, byte[] buf)
@Deprecated public static boolean matchingRow(Cell left, byte[] buf, int offset, int length)
matchingRows(Cell, Cell)
public static boolean matchingFamily(Cell left, Cell right)
public static boolean matchingFamily(Cell left, byte[] buf)
@Deprecated public static boolean matchingFamily(Cell left, byte[] buf, int offset, int length)
public static boolean matchingQualifier(Cell left, Cell right)
public static boolean matchingQualifier(Cell left, byte[] buf)
left
- buf
- the serialized keyvalue format byte[]@Deprecated public static boolean matchingQualifier(Cell left, byte[] buf, int offset, int length)
left
- buf
- the serialized keyvalue format byte[]offset
- the offset of the qualifier in the byte[]length
- the length of the qualifier in the byte[]public static boolean matchingColumn(Cell left, byte[] fam, byte[] qual)
public static boolean matchingColumnFamilyAndQualifierPrefix(Cell left, byte[] fam, byte[] qual)
qual
@Deprecated public static boolean matchingColumn(Cell left, byte[] fam, int foffset, int flength, byte[] qual, int qoffset, int qlength)
public static boolean matchingColumn(Cell left, Cell right)
public static boolean matchingValue(Cell left, Cell right)
public static boolean matchingValue(Cell left, byte[] buf)
public static boolean isDelete(Cell cell)
KeyValue.Type.Delete
or a {KeyValue.Type#DeleteFamily}
or a KeyValue.Type.DeleteColumn
KeyValue type.@Deprecated public static boolean isDelete(byte type)
KeyValue.Type.Delete
or a {KeyValue.Type#DeleteFamily}
or a KeyValue.Type.DeleteColumn
KeyValue type.@Deprecated public static boolean isDeleteType(Cell cell)
KeyValue.Type.Delete
type.@Deprecated public static boolean isDeleteFamily(Cell cell)
@Deprecated public static boolean isDeleteFamilyVersion(Cell cell)
@Deprecated public static boolean isDeleteColumns(Cell cell)
@Deprecated public static boolean isDeleteColumnVersion(Cell cell)
@Deprecated public static boolean isDeleteColumnOrFamily(Cell cell)
@Deprecated public static int estimatedSerializedSizeOf(Cell cell)
cell
- cell
size in bytes plus an extra SIZEOF_INT indicating the
actual cell length.private static int getSumOfCellElementLengths(Cell cell)
cell
- private static int getSumOfCellKeyElementLengths(Cell cell)
cell
- @Deprecated public static int estimatedSerializedSizeOfKey(Cell cell)
cell
- the cell for which the key size has to be calculated.@Deprecated public static long estimatedHeapSizeOf(Cell cell)
RawCell.getTags()
HeapSize
we call HeapSize.heapSize()
so cell can give a correct value. In other
cases we just consider the bytes occupied by the cell components ie. row, CF, qualifier,
timestamp, type, value and tags.cell
- @Deprecated public static Iterator<Tag> tagsIterator(byte[] tags, int offset, int length)
PrivateCellUtil.tagsIterator(Cell)
tags
- offset
- length
- @Deprecated public static List<Tag> getTags(Cell cell)
cell
- The Cell@Deprecated public static Tag getTag(Cell cell, byte type)
RawCell.getTag(byte)
cell
- The Celltype
- Type of the Tag to retrieve@Deprecated public static boolean overlappingKeys(byte[] start1, byte[] end1, byte[] start2, byte[] end2)
@Deprecated public static void setSequenceId(Cell cell, long seqId) throws IOException
cell
- seqId
- IOException
- when the passed cell is not of type ExtendedCell
@Deprecated public static void setTimestamp(Cell cell, long ts) throws IOException
cell
- ts
- IOException
- when the passed cell is not of type ExtendedCell
@Deprecated public static void setTimestamp(Cell cell, byte[] ts, int tsOffset) throws IOException
cell
- ts
- buffer containing the timestamp valuetsOffset
- offset to the new timestampIOException
- when the passed cell is not of type ExtendedCell
@Deprecated public static boolean updateLatestStamp(Cell cell, long ts) throws IOException
HConstants.LATEST_TIMESTAMP
.cell
- ts
- IOException
- when the passed cell is not of type ExtendedCell
@Deprecated public static boolean updateLatestStamp(Cell cell, byte[] ts, int tsOffset) throws IOException
HConstants.LATEST_TIMESTAMP
.cell
- ts
- buffer containing the timestamp valuetsOffset
- offset to the new timestampIOException
- when the passed cell is not of type ExtendedCell
@Deprecated public static void writeFlatKey(Cell cell, DataOutputStream out) throws IOException
cell
- out
- IOException
@Deprecated public static void writeRowSkippingBytes(DataOutputStream out, Cell cell, short rlength, int commonPrefix) throws IOException
out
- The dataoutputstream to which the data has to be writtencell
- The cell whose contents has to be writtenrlength
- the row lengthIOException
public static String getCellKeyAsString(Cell cell)
cell
- cell
as a String.public static String getCellKeyAsString(Cell cell, Function<Cell,String> rowConverter)
cell
- the cell to convertrowConverter
- used to convert the row of the cell to a stringcell
as a String.@Deprecated public static byte[] getCellKeySerializedAsKeyValueKey(Cell cell)
cell
- cell
@Deprecated public static void writeRowKeyExcludingCommon(Cell cell, short rLen, int commonPrefix, DataOutputStream out) throws IOException
cell
- rLen
- commonPrefix
- out
- IOException
@Deprecated public static int findCommonPrefixInFlatKey(Cell c1, Cell c2, boolean bypassFamilyCheck, boolean withTsType)
KeyValue
. The key format is <2 bytes rk len><rk><1 byte cf
len><cf><qualifier><8 bytes timestamp><1 byte type>c1
- the cellc2
- the cellbypassFamilyCheck
- when true assume the family bytes same in both cells. Pass it as true
when dealing with Cells in same CF so as to avoid some checkswithTsType
- when true check timestamp and type bytes also.public static String toString(Cell cell, boolean verbose)
@Deprecated public static boolean equalsIgnoreMvccVersion(Cell a, Cell b)
public static boolean matchingTimestamp(Cell a, Cell b)
@Deprecated public static boolean matchingType(Cell a, Cell b)
public static boolean matchingRows(Cell left, Cell right)
left
- right
- public static boolean matchingRowColumn(Cell left, Cell right)
left
- right
- public static boolean matchingRowColumnBytes(Cell left, Cell right)
public static final int compareQualifiers(Cell left, byte[] right, int rOffset, int rLength)
left
- the cell for which the qualifier has to be comparedright
- the byte[] having the qualifierrOffset
- the offset of the qualifierrLength
- the length of the qualifier@Deprecated public static final int compare(CellComparator comparator, Cell left, byte[] key, int offset, int length)
comparator
- the cell comparatorleft
- the cell to be comparedkey
- the serialized key part of a KeyValueoffset
- the offset in the key byte[]length
- the length of the key byte[]public static final int compareFamilies(Cell left, byte[] right, int roffset, int rlength)
left
- the cell for which the family has to be comparedright
- the byte[] having the familyroffset
- the offset of the familyrlength
- the length of the familypublic static final int compareColumns(Cell left, byte[] right, int rfoffset, int rflength, int rqoffset, int rqlength)
left
- the cell for which the column has to be comparedright
- the byte[] having the columnrfoffset
- the offset of the familyrflength
- the length of the familyrqoffset
- the offset of the qualifierrqlength
- the length of the qualifierCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.