public final class CellUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENT_GET_ATTRIBUTE |
static byte[] |
FAMILY_DELETE_QUALIFIER |
static String |
LL_ATTRIBUTE |
static String |
TRANSACTION_ATTRIBUTE |
| Constructor and Description |
|---|
CellUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
addShadowCellSuffixPrefix(byte[] qualifier)
Builds a new qualifier composed of the HBase qualifier passed + the shadow cell suffix.
|
static byte[] |
addShadowCellSuffixPrefix(byte[] qualifierArray,
int qualOffset,
int qualLength)
Builds a new qualifier composed of the HBase qualifier passed + the shadow cell suffix.
|
static org.apache.hadoop.hbase.Cell |
buildShadowCellFromCell(org.apache.hadoop.hbase.Cell cell,
byte[] shadowCellValue)
Returns a new shadow cell created from a particular cell.
|
static boolean |
hasCell(byte[] row,
byte[] family,
byte[] qualifier,
long version,
org.apache.omid.transaction.CellUtils.CellGetter cellGetter)
Returns true if the particular cell passed exists in the datastore.
|
static boolean |
hasShadowCell(byte[] row,
byte[] family,
byte[] qualifier,
long version,
org.apache.omid.transaction.CellUtils.CellGetter cellGetter)
Returns true if the particular cell passed has a corresponding shadow cell in the datastore
|
static boolean |
isFamilyDeleteCell(org.apache.hadoop.hbase.Cell cell)
Returns whether a cell contains a qualifier that is a delete cell
column qualifier or not.
|
static boolean |
isShadowCell(org.apache.hadoop.hbase.Cell cell)
Returns whether a cell contains a qualifier that is a shadow cell
column qualifier or not.
|
static boolean |
isTombstone(org.apache.hadoop.hbase.Cell cell)
Returns if a cell is marked as a tombstone.
|
static SortedMap<org.apache.hadoop.hbase.Cell,org.apache.phoenix.thirdparty.com.google.common.base.Optional<org.apache.hadoop.hbase.Cell>> |
mapCellsToShadowCells(List<org.apache.hadoop.hbase.Cell> cells)
Analyzes a list of cells, associating the corresponding shadow cell if present.
|
static boolean |
matchingQualifier(org.apache.hadoop.hbase.Cell left,
byte[] qualArray,
int qualOffset,
int qualLen)
Complement to matchingQualifier() methods in HBase's CellUtil.class
|
static int |
qualifierLengthFromShadowCellQualifier(byte[] qualifier,
int qualOffset,
int qualLength)
Returns the qualifier length removing the shadow cell suffix and prefix.
|
static int |
qualifierOffsetFromShadowCellQualifier(byte[] qualifier,
int qualOffset,
int qualLength)
Returns the qualifier length removing the shadow cell suffix and prefix.
|
static byte[] |
removeShadowCellSuffixPrefix(byte[] qualifier,
int qualOffset,
int qualLength)
Builds a new qualifier removing the shadow cell suffix from the
passed HBase qualifier.
|
static void |
validateCell(org.apache.hadoop.hbase.Cell cell,
long startTimestamp)
Check that the cell passed meets the requirements for a valid cell identifier with Omid.
|
public static final byte[] FAMILY_DELETE_QUALIFIER
public static final String TRANSACTION_ATTRIBUTE
public static final String CLIENT_GET_ATTRIBUTE
public static final String LL_ATTRIBUTE
public static boolean hasCell(byte[] row,
byte[] family,
byte[] qualifier,
long version,
org.apache.omid.transaction.CellUtils.CellGetter cellGetter)
throws IOException
row - rowfamily - column familyqualifier - columnn nameversion - versioncellGetter - an instance of CellGetterIOExceptionpublic static boolean hasShadowCell(byte[] row,
byte[] family,
byte[] qualifier,
long version,
org.apache.omid.transaction.CellUtils.CellGetter cellGetter)
throws IOException
row - rowfamily - column familyqualifier - columnn nameversion - versioncellGetter - an instance of CellGetterIOExceptionpublic static byte[] addShadowCellSuffixPrefix(byte[] qualifierArray,
int qualOffset,
int qualLength)
qualifierArray - the qualifier to be suffixedqualOffset - the offset where the qualifier startsqualLength - the qualifier lengthpublic static byte[] addShadowCellSuffixPrefix(byte[] qualifier)
qualifier - the qualifier to be suffixedpublic static byte[] removeShadowCellSuffixPrefix(byte[] qualifier,
int qualOffset,
int qualLength)
qualifier - the qualifier to remove the suffix fromqualOffset - the offset where the qualifier startsqualLength - the qualifier lengthpublic static int qualifierLengthFromShadowCellQualifier(byte[] qualifier,
int qualOffset,
int qualLength)
qualifier - the qualifier to remove the suffix fromqualOffset - the offset where the qualifier startsqualLength - the qualifier lengthpublic static int qualifierOffsetFromShadowCellQualifier(byte[] qualifier,
int qualOffset,
int qualLength)
qualifier - the qualifier to remove the suffix fromqualOffset - the offset where the qualifier startsqualLength - the qualifier lengthpublic static boolean matchingQualifier(org.apache.hadoop.hbase.Cell left,
byte[] qualArray,
int qualOffset,
int qualLen)
left - the cell to compare the qualifierqualArray - the explicit qualifier array passedqualOffset - the explicit qualifier offset passedqualLen - the explicit qualifier length passedpublic static void validateCell(org.apache.hadoop.hbase.Cell cell,
long startTimestamp)
public static boolean isFamilyDeleteCell(org.apache.hadoop.hbase.Cell cell)
cell - the cell to check if contains the delete cell qualifierpublic static boolean isShadowCell(org.apache.hadoop.hbase.Cell cell)
cell - the cell to check if contains the shadow cell qualifierpublic static boolean isTombstone(org.apache.hadoop.hbase.Cell cell)
cell - the cell to checkpublic static org.apache.hadoop.hbase.Cell buildShadowCellFromCell(org.apache.hadoop.hbase.Cell cell,
byte[] shadowCellValue)
cell - the cell to reconstruct the shadow cell from.shadowCellValue - the value for the new shadow cell createdpublic static SortedMap<org.apache.hadoop.hbase.Cell,org.apache.phoenix.thirdparty.com.google.common.base.Optional<org.apache.hadoop.hbase.Cell>> mapCellsToShadowCells(List<org.apache.hadoop.hbase.Cell> cells)
cells - the list of cells to classifyCopyright © 2011–2020 Apache Software Foundation. All rights reserved.