Package org.apache.hadoop.hbase
Class PrivateCellUtil
java.lang.Object
org.apache.hadoop.hbase.PrivateCellUtil
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
These cells are used in reseeks/seeks to improve the read performance.private static class
These cells are used in reseeks/seeks to improve the read performance.private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
private static class
(package private) static class
(package private) static class
This can be used when a Cell has to change with addition/removal of one or more tags.(package private) static class
(package private) static class
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprivate
Private constructor to keep this class from being instantiated. -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
cloneTags
(ExtendedCell cell) static Cell.Type
code2Type
(byte code) static final int
compare
(CellComparator comparator, ExtendedCell left, byte[] key, int offset, int length) Used when a cell needs to be compared with a key byte[] such as cases of finding the index from the index block, bloom keys from the bloom blocks This byte[] is expected to be serialized in the KeyValue serialization format If the KeyValue (Cell's) serialization format changes this method cannot be used.static int
compareFamily
(Cell cell, ByteArrayComparable comparator) Compare cell's column family against given comparatorstatic final int
compareKeyBasedOnColHint
(CellComparator comparator, ExtendedCell nextIndexedCell, ExtendedCell currentCell, int foff, int flen, byte[] colHint, int coff, int clen, long ts, byte type) Used to compare two cells based on the column hint provided.static final int
compareKeyIgnoresMvcc
(CellComparator comparator, Cell left, Cell right) Compares only the key portion of a cell.static int
compareQualifier
(Cell cell, ByteArrayComparable comparator) Compare cell's qualifier against given comparatorstatic int
compareRow
(Cell cell, ByteArrayComparable comparator) Compare cell's row against given comparatorstatic int
compareValue
(Cell cell, ByteArrayComparable comparator) Compare cell's value against given comparator(package private) static final int
compareWithoutRow
(CellComparator comparator, ExtendedCell left, byte[] right, int roffset, int rlength, short rowlength) Compare columnFamily, qualifier, timestamp, and key type (everything except the row).static void
compressFamily
(OutputStream out, Cell cell, Dictionary dict) static void
compressQualifier
(OutputStream out, Cell cell, Dictionary dict) static void
compressRow
(OutputStream out, Cell cell, Dictionary dict) static void
compressTags
(OutputStream out, ExtendedCell cell, TagCompressionContext tagCompressionContext) Compresses the tags to the given outputstream using the TagcompressionContextstatic int
copyTagsTo
(ExtendedCell cell, byte[] destination, int destinationOffset) Copies the tags info into the tag portion of the cellstatic int
copyTagsTo
(ExtendedCell cell, ByteBuffer destination, int destinationOffset) Copies the tags info into the tag portion of the cellstatic ExtendedCell
createCell
(ExtendedCell cell, byte[] tags) Returns A new cell which is having the extra tags also added to it.static ExtendedCell
createCell
(ExtendedCell cell, byte[] value, byte[] tags) static ExtendedCell
createCell
(ExtendedCell cell, List<Tag> tags) Returns A new cell which is having the extra tags also added to it.static ExtendedCellScanner
createExtendedCellScanner
(Iterable<ExtendedCell> cellIterable) Returns ExtendedCellScanner interface overcellIterable
static ExtendedCellScanner
Returns ExtendedCellScanner interface overcellIterable
or null ifcells
is nullstatic ExtendedCellScanner
createExtendedCellScanner
(List<? extends ExtendedCellScannable> cellScannerables) Returns ExtendedCellScanner interface overcellIterables
static ExtendedCellScanner
createExtendedCellScanner
(NavigableMap<byte[], List<ExtendedCell>> map) Flatten the map of cells out under the ExtendedCellScannerstatic ExtendedCellScanner
createExtendedCellScanner
(ExtendedCell[] cellArray) Returns CellScanner interface overcellArray
static ExtendedCell
createFirstDeleteFamilyCellOnRow
(byte[] row, byte[] fam) Create a Delete Family Cell for the specified row and family that would be smaller than all other possible Delete Family KeyValues that have the same row and family.static ExtendedCell
createFirstOnNextRow
(Cell cell) static ExtendedCell
createFirstOnRow
(byte[] row) static ExtendedCell
createFirstOnRow
(byte[] row, byte[] family, byte[] col) static ExtendedCell
createFirstOnRow
(byte[] row, int roffset, short rlength) static ExtendedCell
createFirstOnRow
(byte[] row, int roffset, short rlength, byte[] family, int foffset, byte flength, byte[] col, int coffset, int clength) static ExtendedCell
createFirstOnRow
(Cell cell) Create a Cell that is smaller than all other possible Cells for the given Cell's row.static ExtendedCell
createFirstOnRowCol
(Cell cell) static ExtendedCell
createFirstOnRowCol
(Cell cell, byte[] qArray, int qoffest, int qlength) Create a Cell that is smaller than all other possible Cells for the given Cell's rk:cf and passed qualifier.static ExtendedCell
createFirstOnRowColTS
(Cell cell, long ts) Creates the first cell with the row/family/qualifier of this cell and the given timestamp.static ExtendedCell
createFirstOnRowFamily
(Cell cell, byte[] fArray, int foff, int flen) static ExtendedCell
createLastOnRow
(byte[] row) static ExtendedCell
createLastOnRow
(Cell cell) Create a Cell that is larger than all other possible Cells for the given Cell's row.static ExtendedCell
createLastOnRowCol
(Cell cell) Create a Cell that is larger than all other possible Cells for the given Cell's rk:cf:q.static ExtendedCell
Return a new cell is located following input cell.(package private) static ExtendedCell
createNextOnRowCol
(ExtendedCell cell, long ts, byte type) static ExtendedCell
ensureExtendedCell
(Cell cell) In fact, in HBase, allCell
s areExtendedCell
s.static boolean
equals
(ExtendedCell a, ExtendedCell b) static boolean
special case for Cell.equalsstatic int
Estimate based on keyvalue's serialization format in the RPC layer.static int
Calculates the serialized key size.static ByteRange
fillFamilyRange
(Cell cell, ByteRange range) static ByteRange
fillQualifierRange
(Cell cell, ByteRange range) static ByteRange
fillRowRange
(Cell cell, ByteRange range) ByteRangestatic ByteRange
fillTagRange
(ExtendedCell cell, ByteRange range) static ByteRange
fillValueRange
(Cell cell, ByteRange range) static int
findCommonPrefixInFlatKey
(ExtendedCell c1, ExtendedCell c2, boolean bypassFamilyCheck, boolean withTsType) Find length of common prefix in keys of the cells, considering key as byte[] if serialized inKeyValue
.static byte[]
This method exists just to encapsulate how we serialize keys.static byte
getQualifierByte
(Cell cell, int index) static int
getRowAsInt
(Cell cell) Converts the rowkey bytes of the given cell into an int valuestatic byte
getRowByte
(Cell cell, int index) miscstatic long
getTag
(ExtendedCell cell, byte type) Retrieve Cell's first tag, matching the passed in typegetTags
(ExtendedCell cell) Return tags in the given Cell as a Liststatic byte
getTypeByte
(Cell c) static BigDecimal
getValueAsBigDecimal
(Cell cell) Converts the value bytes of the given cell into a BigDecimalstatic double
getValueAsDouble
(Cell cell) Converts the value bytes of the given cell into a double valuestatic int
getValueAsInt
(Cell cell) Converts the value bytes of the given cell into a int valuestatic long
getValueAsLong
(Cell cell) Converts the value bytes of the given cell into a long valuestatic ByteBuffer
static byte[]
increaseLastNonMaxByte
(byte[] bytes) static boolean
isDelete
(byte type) Return true if a delete type, aKeyValue.Type.Delete
or a {KeyValue.Type#DeleteFamily} or aKeyValue.Type.DeleteColumn
KeyValue type.static boolean
Returns True if this cell is a delete family or column type.static boolean
isDeleteColumns
(ExtendedCell cell) static boolean
static boolean
isDeleteFamily
(ExtendedCell cell) static boolean
static boolean
isDeleteType
(ExtendedCell cell) Returns True if this cell is aKeyValue.Type.Delete
type.static boolean
matchingColumn
(Cell left, byte[] fam, int foffset, int flength, byte[] qual, int qoffset, int qlength) static boolean
matchingFamily
(Cell left, byte[] buf, int offset, int length) static boolean
matchingQualifier
(Cell left, byte[] buf, int offset, int length) Finds if the qualifier part of the cell and the KV serialized byte[] are equalstatic boolean
matchingRows
(Cell left, byte[] buf, int offset, int length) static boolean
matchingTags
(ExtendedCell left, ExtendedCell right) static boolean
matchingTags
(ExtendedCell left, ExtendedCell right, int llength, int rlength) static boolean
static boolean
matchingValue
(Cell left, Cell right, int lvlength, int rvlength) static boolean
overlappingKeys
(byte[] start1, byte[] end1, byte[] start2, byte[] end2) Returns true if the first range start1...end1 overlaps with the second range start2...end2, assuming the byte arrays represent row keysstatic boolean
qualifierStartsWith
(Cell left, byte[] startsWith) Finds if the start of the qualifier part of the Cell matchesbuf
static void
setSequenceId
(Cell cell, long seqId) Sets the given seqId to the cell.static void
setTimestamp
(Cell cell, byte[] ts) Sets the given timestamp to the cell.static void
setTimestamp
(Cell cell, long ts) Sets the given timestamp to the cell.tagsIterator
(ByteBuffer tags, int offset, int length) tagsIterator
(ExtendedCell cell) Utility method to iterate through the tags in the given cell.static Cell.Type
toType
(byte type) static KeyValue.Type
toTypeByte
(Cell.Type type) static boolean
updateLatestStamp
(Cell cell, byte[] ts) Sets the given timestamp to the cell iff current timestamp isHConstants.LATEST_TIMESTAMP
.static boolean
updateLatestStamp
(ExtendedCell cell, long ts) Sets the given timestamp to the cell iff current timestamp isHConstants.LATEST_TIMESTAMP
.static void
writeFamily
(OutputStream out, Cell cell, byte flength) Writes the family from the given cell to the output streamstatic void
writeFlatKey
(ExtendedCell cell, DataOutput out) Writes the Cell's key part as it would have serialized in a KeyValue.static int
writeFlatKey
(ExtendedCell cell, OutputStream out) static void
writeQualifier
(OutputStream out, Cell cell, int qlength) Writes the qualifier from the given cell to the output streamstatic void
writeQualifierSkippingBytes
(DataOutputStream out, Cell cell, int qlength, int commonPrefix) Writes the qualifier from the given cell to the output stream excluding the common prefixstatic void
writeRow
(OutputStream out, Cell cell, short rlength) Writes the row from the given cell to the output streamstatic void
writeRowKeyExcludingCommon
(Cell cell, short rLen, int commonPrefix, DataOutputStream out) Write rowkey excluding the common part.static void
writeRowSkippingBytes
(DataOutputStream out, Cell cell, short rlength, int commonPrefix) Writes the row from the given cell to the output stream excluding the common prefixstatic void
writeTags
(OutputStream out, ExtendedCell cell, int tagsLength) Writes the tag from the given cell to the output streamstatic void
writeValue
(OutputStream out, ExtendedCell cell, int vlength) Writes the value from the given cell to the output stream
-
Field Details
-
CELL_TYPE_CODE_ARRAY
-
-
Constructor Details
-
PrivateCellUtil
private PrivateCellUtil()Private constructor to keep this class from being instantiated.
-
-
Method Details
-
fillRowRange
ByteRange -
fillFamilyRange
-
fillQualifierRange
-
fillValueRange
-
fillTagRange
-
getRowByte
misc -
getQualifierByte
-
getValueBufferShallowCopy
-
createCell
Returns A new cell which is having the extra tags also added to it. -
createCell
Returns A new cell which is having the extra tags also added to it. -
createCell
-
matchingRows
-
matchingFamily
-
matchingQualifier
Finds if the qualifier part of the cell and the KV serialized byte[] are equal- Parameters:
left
- the cell with which we need to match the qualifierbuf
- the serialized keyvalue format byte[]offset
- the offset of the qualifier in the byte[]length
- the length of the qualifier in the byte[]- Returns:
- true if the qualifier matches, false otherwise
-
qualifierStartsWith
Finds if the start of the qualifier part of the Cell matchesbuf
- Parameters:
left
- the cell with which we need to match the qualifierstartsWith
- the serialized keyvalue format byte[]- Returns:
- true if the qualifier have same staring characters, false otherwise
-
matchingColumn
public static boolean matchingColumn(Cell left, byte[] fam, int foffset, int flength, byte[] qual, int qoffset, int qlength) -
matchingValue
-
matchingType
-
matchingTags
-
matchingTags
-
isDelete
Return true if a delete type, aKeyValue.Type.Delete
or a {KeyValue.Type#DeleteFamily} or aKeyValue.Type.DeleteColumn
KeyValue type. -
isDeleteType
Returns True if this cell is aKeyValue.Type.Delete
type. -
isDeleteFamily
-
isDeleteFamilyVersion
-
isDeleteColumns
-
isDeleteColumnVersion
-
isDeleteColumnOrFamily
Returns True if this cell is a delete family or column type. -
cloneTags
-
copyTagsTo
Copies the tags info into the tag portion of the cell -
copyTagsTo
Copies the tags info into the tag portion of the cell -
getTags
Return tags in the given Cell as a List- Parameters:
cell
- The Cell- Returns:
- Tags in the given Cell as a List
-
getTag
Retrieve Cell's first tag, matching the passed in type- Parameters:
cell
- The Celltype
- Type of the Tag to retrieve- Returns:
- Optional, empty if there is no tag of the passed in tag type
-
tagsIterator
Utility method to iterate through the tags in the given cell.- Parameters:
cell
- The Cell over which tags iterator is needed.- Returns:
- iterator for the tags
-
tagsIterator
-
overlappingKeys
Returns true if the first range start1...end1 overlaps with the second range start2...end2, assuming the byte arrays represent row keys -
writeRowKeyExcludingCommon
public static void writeRowKeyExcludingCommon(Cell cell, short rLen, int commonPrefix, DataOutputStream out) throws IOException Write rowkey excluding the common part.- Throws:
IOException
-
writeRowSkippingBytes
public static void writeRowSkippingBytes(DataOutputStream out, Cell cell, short rlength, int commonPrefix) throws IOException Writes the row from the given cell to the output stream excluding the common prefix- Parameters:
out
- The dataoutputstream to which the data has to be writtencell
- The cell whose contents has to be writtenrlength
- the row length- Throws:
IOException
-
findCommonPrefixInFlatKey
public static int findCommonPrefixInFlatKey(ExtendedCell c1, ExtendedCell c2, boolean bypassFamilyCheck, boolean withTsType) Find length of common prefix in keys of the cells, considering key as byte[] if serialized inKeyValue
. The key format is <2 bytes rk len><rk><1 byte cf len><cf><qualifier><8 bytes timestamp><1 byte type>- Parameters:
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.- Returns:
- length of common prefix
-
compareKeyBasedOnColHint
public static final int compareKeyBasedOnColHint(CellComparator comparator, ExtendedCell nextIndexedCell, ExtendedCell currentCell, int foff, int flen, byte[] colHint, int coff, int clen, long ts, byte type) Used to compare two cells based on the column hint provided. This is specifically used when we need to optimize the seeks based on the next indexed key. This is an advanced usage API specifically needed for some optimizations.- Parameters:
nextIndexedCell
- the next indexed cellcurrentCell
- the cell to be comparedfoff
- the family offset of the currentCellflen
- the family length of the currentCellcolHint
- the column hint provided - could be nullcoff
- the offset of the column hint if provided, if not offset of the currentCell's qualifierclen
- the length of the column hint if provided, if not length of the currentCell's qualifierts
- the timestamp to be seekedtype
- the type to be seeked- Returns:
- an int based on the given column hint TODO : To be moved out of here because this is a special API used in scan optimization.
-
compareKeyIgnoresMvcc
Compares only the key portion of a cell. It does not include the sequence id/mvcc of the cell- Returns:
- an int greater than 0 if left > than right lesser than 0 if left < than right equal to 0 if left is equal to right
-
compareRow
Compare cell's row against given comparator- Parameters:
cell
- the cell to use for comparisoncomparator
- theCellComparator
to use for comparison- Returns:
- result comparing cell's row
-
compareFamily
Compare cell's column family against given comparator- Parameters:
cell
- the cell to use for comparisoncomparator
- theCellComparator
to use for comparison- Returns:
- result comparing cell's column family
-
compareQualifier
Compare cell's qualifier against given comparator- Parameters:
cell
- the cell to use for comparisoncomparator
- theCellComparator
to use for comparison- Returns:
- result comparing cell's qualifier
-
toType
-
toTypeByte
-
compareValue
Compare cell's value against given comparator- Parameters:
cell
- the cell to use for comparisoncomparator
- theCellComparator
to use for comparison- Returns:
- result comparing cell's value
-
writeFlatKey
Writes the Cell's key part as it would have serialized in a KeyValue. The format is <2 bytes rk len><rk><1 byte cf len><cf><qualifier><8 bytes timestamp><1 byte type>- Throws:
IOException
-
writeFlatKey
- Throws:
IOException
-
setSequenceId
Sets the given seqId to the cell. Marked as audience Private as of 1.2.0. Setting a Cell sequenceid is an internal implementation detail not for general public use.- Throws:
IOException
- when the passed cell is not of typeExtendedCell
-
setTimestamp
Sets the given timestamp to the cell.- Throws:
IOException
- when the passed cell is not of typeExtendedCell
-
setTimestamp
Sets the given timestamp to the cell.- Throws:
IOException
- when the passed cell is not of typeExtendedCell
-
updateLatestStamp
Sets the given timestamp to the cell iff current timestamp isHConstants.LATEST_TIMESTAMP
.- Returns:
- True if cell timestamp is modified.
- Throws:
IOException
- when the passed cell is not of typeExtendedCell
-
updateLatestStamp
Sets the given timestamp to the cell iff current timestamp isHConstants.LATEST_TIMESTAMP
.- Returns:
- True if cell timestamp is modified.
- Throws:
IOException
- when the passed cell is not of typeExtendedCell
-
writeRow
Writes the row from the given cell to the output stream- Parameters:
out
- The outputstream to which the data has to be writtencell
- The cell whose contents has to be writtenrlength
- the row length- Throws:
IOException
-
writeFamily
Writes the family from the given cell to the output stream- Parameters:
out
- The outputstream to which the data has to be writtencell
- The cell whose contents has to be writtenflength
- the family length- Throws:
IOException
-
writeQualifier
Writes the qualifier from the given cell to the output stream- Parameters:
out
- The outputstream to which the data has to be writtencell
- The cell whose contents has to be writtenqlength
- the qualifier length- Throws:
IOException
-
writeQualifierSkippingBytes
public static void writeQualifierSkippingBytes(DataOutputStream out, Cell cell, int qlength, int commonPrefix) throws IOException Writes the qualifier from the given cell to the output stream excluding the common prefix- Parameters:
out
- The dataoutputstream to which the data has to be writtencell
- The cell whose contents has to be writtenqlength
- the qualifier length- Throws:
IOException
-
writeValue
Writes the value from the given cell to the output stream- Parameters:
out
- The outputstream to which the data has to be writtencell
- The cell whose contents has to be writtenvlength
- the value length- Throws:
IOException
-
writeTags
public static void writeTags(OutputStream out, ExtendedCell cell, int tagsLength) throws IOException Writes the tag from the given cell to the output stream- Parameters:
out
- The outputstream to which the data has to be writtencell
- The cell whose contents has to be writtentagsLength
- the tag length- Throws:
IOException
-
equalsIgnoreMvccVersion
special case for Cell.equals -
getRowAsInt
Converts the rowkey bytes of the given cell into an int value- Returns:
- rowkey as int
-
getValueAsLong
Converts the value bytes of the given cell into a long value- Returns:
- value as long
-
getValueAsInt
Converts the value bytes of the given cell into a int value- Returns:
- value as int
-
getValueAsDouble
Converts the value bytes of the given cell into a double value- Returns:
- value as double
-
getValueAsBigDecimal
Converts the value bytes of the given cell into a BigDecimal- Returns:
- value as BigDecimal
-
compressTags
public static void compressTags(OutputStream out, ExtendedCell cell, TagCompressionContext tagCompressionContext) throws IOException Compresses the tags to the given outputstream using the TagcompressionContext- Parameters:
out
- the outputstream to which the compression should happencell
- the cell which has tagstagCompressionContext
- the TagCompressionContext- Throws:
IOException
- can throw IOException if the compression encounters issue
-
compressRow
- Throws:
IOException
-
compressFamily
- Throws:
IOException
-
compressQualifier
public static void compressQualifier(OutputStream out, Cell cell, Dictionary dict) throws IOException - Throws:
IOException
-
compare
public static final int compare(CellComparator comparator, ExtendedCell left, byte[] key, int offset, int length) Used when a cell needs to be compared with a key byte[] such as cases of finding the index from the index block, bloom keys from the bloom blocks This byte[] is expected to be serialized in the KeyValue serialization format If the KeyValue (Cell's) serialization format changes this method cannot be used.- Parameters:
comparator
- theCellComparator
to use for comparisonleft
- 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[]- Returns:
- an int greater than 0 if left is greater than right lesser than 0 if left is lesser than right equal to 0 if left is equal to right
-
compareWithoutRow
static final int compareWithoutRow(CellComparator comparator, ExtendedCell left, byte[] right, int roffset, int rlength, short rowlength) Compare columnFamily, qualifier, timestamp, and key type (everything except the row). This method is used both in the normal comparator and the "same-prefix" comparator. Note that we are assuming that row portions of both KVs have already been parsed and found identical, and we don't validate that assumption here.- Parameters:
comparator
- theCellComparator
to use for comparisonleft
- the cell to be comparedright
- the serialized key part of a key-valueroffset
- the offset in the key byte[]rlength
- the length of the key byte[]rowlength
- the row length- Returns:
- greater than 0 if left cell is bigger, less than 0 if right cell is bigger, 0 if both cells are equal
-
createNextOnRowCol
Return a new cell is located following input cell. If both of type and timestamp are minimum, the input cell will be returned directly. -
createNextOnRowCol
-
estimatedSerializedSizeOf
Estimate based on keyvalue's serialization format in the RPC layer. Note that there is an extra SIZEOF_INT added to the size here that indicates the actual length of the cell for cases where cell's are serialized in a contiguous format (For eg in RPCs).- Returns:
- Estimate of the
cell
size in bytes plus an extra SIZEOF_INT indicating the actual cell length.
-
estimatedSerializedSizeOfKey
Calculates the serialized key size. We always serialize in the KeyValue's serialization format.- Parameters:
cell
- the cell for which the key size has to be calculated.- Returns:
- the key size
-
getCellKeySerializedAsKeyValueKey
This method exists just to encapsulate how we serialize keys. To be replaced by a factory that we query to figure what the Cell implementation is and then, what serialization engine to use and further, how to serialize the key for inclusion in hfile index. TODO.- Returns:
- The key portion of the Cell serialized in the old-school KeyValue way or null if passed
a null
cell
-
createFirstOnRow
Create a Cell that is smaller than all other possible Cells for the given Cell's row.- Returns:
- First possible Cell on passed Cell's row.
-
createFirstOnRow
-
createFirstOnRow
-
createFirstOnRow
public static ExtendedCell createFirstOnRow(byte[] row, int roffset, short rlength, byte[] family, int foffset, byte flength, byte[] col, int coffset, int clength) -
createFirstOnRow
-
createFirstOnRowFamily
-
createFirstOnRowCol
-
createFirstOnNextRow
-
createFirstOnRowCol
Create a Cell that is smaller than all other possible Cells for the given Cell's rk:cf and passed qualifier.- Returns:
- Last possible Cell on passed Cell's rk:cf and passed qualifier.
-
createFirstOnRowColTS
Creates the first cell with the row/family/qualifier of this cell and the given timestamp. Uses the "maximum" type that guarantees that the new cell is the lowest possible for this combination of row, family, qualifier, and timestamp. This cell's own timestamp is ignored.- Parameters:
cell
- - cell
-
createLastOnRow
Create a Cell that is larger than all other possible Cells for the given Cell's row.- Returns:
- Last possible Cell on passed Cell's row.
-
createLastOnRow
-
createLastOnRowCol
Create a Cell that is larger than all other possible Cells for the given Cell's rk:cf:q. Used in creating "fake keys" for the multi-column Bloom filter optimization to skip the row/column we already know is not in the file.- Returns:
- Last possible Cell on passed Cell's rk:cf:q.
-
createFirstDeleteFamilyCellOnRow
Create a Delete Family Cell for the specified row and family that would be smaller than all other possible Delete Family KeyValues that have the same row and family. Used for seeking.- Parameters:
row
- - row key (arbitrary byte array)fam
- - family name- Returns:
- First Delete Family possible key on passed
row
.
-
ensureExtendedCell
In fact, in HBase, allCell
s areExtendedCell
s. We do not expect users to implement their ownCell
types, except some special projects like Phoenix, where they just useKeyValue
andExtendedCell
directly.- Returns:
- the original
cell
which has already been cast to anExtendedCell
. - Throws:
IllegalArgumentException
- if the givencell
is not anExtendedCell
.
-
equals
-
createExtendedCellScanner
public static ExtendedCellScanner createExtendedCellScanner(List<? extends ExtendedCellScannable> cellScannerables) Returns ExtendedCellScanner interface overcellIterables
-
createExtendedCellScanner
Returns CellScanner interface overcellArray
-
createExtendedCellScanner
Returns ExtendedCellScanner interface overcellIterable
-
createExtendedCellScanner
Returns ExtendedCellScanner interface overcellIterable
or null ifcells
is null -
code2Type
-
getTypeByte
-
getSequenceId
-
increaseLastNonMaxByte
-