public class SnapshotFilterImpl extends Object implements SnapshotFilter
| Modifier and Type | Class and Description |
|---|---|
class |
SnapshotFilterImpl.TransactionalClientScanner |
| Constructor and Description |
|---|
SnapshotFilterImpl(org.apache.omid.committable.CommitTable.Client commitTableClient) |
SnapshotFilterImpl(TableAccessWrapper tableAccessWrapper) |
SnapshotFilterImpl(TableAccessWrapper tableAccessWrapper,
org.apache.omid.committable.CommitTable.Client commitTableClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
List<org.apache.hadoop.hbase.Cell> |
filterCellsForSnapshot(List<org.apache.hadoop.hbase.Cell> rawCells,
HBaseTransaction transaction,
int versionsToRequest,
Map<String,Long> familyDeletionCache,
Map<String,byte[]> attributeMap)
Filters the raw results returned from HBase and returns only those belonging to the current snapshot, as defined
by the transaction object.
|
org.apache.hadoop.hbase.client.Result |
get(org.apache.hadoop.hbase.client.Get get,
HBaseTransaction transaction) |
org.apache.hadoop.hbase.client.ResultScanner |
getScanner(org.apache.hadoop.hbase.client.Scan scan,
HBaseTransaction transaction) |
TableAccessWrapper |
getTableAccessWrapper() |
org.apache.phoenix.thirdparty.com.google.common.base.Optional<Long> |
getTSIfInSnapshot(org.apache.hadoop.hbase.Cell kv,
HBaseTransaction transaction,
Map<Long,Long> commitCache) |
org.apache.phoenix.thirdparty.com.google.common.base.Optional<Long> |
getTSIfInTransaction(org.apache.hadoop.hbase.Cell kv,
HBaseTransaction transaction) |
boolean |
isCommitted(HBaseCellId hBaseCellId,
long epoch,
boolean isLowLatency) |
org.apache.omid.committable.CommitTable.CommitTimestamp |
locateCellCommitTimestamp(long cellStartTimestamp,
long epoch,
CommitTimestampLocator locator,
boolean isLowLatency)
This function returns the commit timestamp for a particular cell if the transaction was already committed in
the system.
|
org.apache.phoenix.thirdparty.com.google.common.base.Optional<org.apache.omid.committable.CommitTable.CommitTimestamp> |
readCommitTimestampFromShadowCell(long cellStartTimestamp,
CommitTimestampLocator locator)
Check if the transaction commit data is in the shadow cell
|
org.apache.phoenix.thirdparty.com.google.common.base.Optional<Long> |
tryToLocateCellCommitTimestamp(long epoch,
org.apache.hadoop.hbase.Cell cell,
Map<Long,Long> commitCache,
boolean isLowLatency) |
public SnapshotFilterImpl(TableAccessWrapper tableAccessWrapper, org.apache.omid.committable.CommitTable.Client commitTableClient) throws IOException
IOExceptionpublic SnapshotFilterImpl(TableAccessWrapper tableAccessWrapper) throws IOException
IOExceptionpublic SnapshotFilterImpl(org.apache.omid.committable.CommitTable.Client commitTableClient) throws IOException
IOExceptionpublic TableAccessWrapper getTableAccessWrapper()
public org.apache.phoenix.thirdparty.com.google.common.base.Optional<org.apache.omid.committable.CommitTable.CommitTimestamp> readCommitTimestampFromShadowCell(long cellStartTimestamp, CommitTimestampLocator locator) throws IOException
cellStartTimestamp - the transaction start timestamp
locator
the timestamp locatorIOExceptionpublic org.apache.omid.committable.CommitTable.CommitTimestamp locateCellCommitTimestamp(long cellStartTimestamp, long epoch, CommitTimestampLocator locator, boolean isLowLatency) throws IOException
cellStartTimestamp - start timestamp of the cell to locate the commit timestamp for.epoch - the epoch of the TSO server the current tso client is working with.locator - a locator to find the commit timestamp in the system.IOException - in case of any I/O issuespublic org.apache.phoenix.thirdparty.com.google.common.base.Optional<Long> tryToLocateCellCommitTimestamp(long epoch, org.apache.hadoop.hbase.Cell cell, Map<Long,Long> commitCache, boolean isLowLatency) throws IOException
IOExceptionpublic org.apache.phoenix.thirdparty.com.google.common.base.Optional<Long> getTSIfInTransaction(org.apache.hadoop.hbase.Cell kv, HBaseTransaction transaction)
public org.apache.phoenix.thirdparty.com.google.common.base.Optional<Long> getTSIfInSnapshot(org.apache.hadoop.hbase.Cell kv, HBaseTransaction transaction, Map<Long,Long> commitCache) throws IOException
IOExceptionpublic List<org.apache.hadoop.hbase.Cell> filterCellsForSnapshot(List<org.apache.hadoop.hbase.Cell> rawCells, HBaseTransaction transaction, int versionsToRequest, Map<String,Long> familyDeletionCache, Map<String,byte[]> attributeMap) throws IOException
rawCells - Raw cells that we are going to filtertransaction - Defines the current snapshotversionsToRequest - Number of versions requested from hbasefamilyDeletionCache - Accumulates the family deletion markers to identify cells that deleted with a higher versionIOExceptionpublic org.apache.hadoop.hbase.client.Result get(org.apache.hadoop.hbase.client.Get get,
HBaseTransaction transaction)
throws IOException
get in interface SnapshotFilterIOExceptionpublic org.apache.hadoop.hbase.client.ResultScanner getScanner(org.apache.hadoop.hbase.client.Scan scan,
HBaseTransaction transaction)
throws IOException
getScanner in interface SnapshotFilterIOExceptionpublic boolean isCommitted(HBaseCellId hBaseCellId, long epoch, boolean isLowLatency) throws TransactionException
TransactionExceptionpublic void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2011–2023 Apache Software Foundation. All rights reserved.