public class IncrementHandlerState extends Object
IncrementHandler coprocessor
implementations. This common implementation cannot go into a shared base class, as each coprocessor needs
to derive from the HBase version's BaseRegionObserver class, in order to avoid being broken by
API changes.| Modifier and Type | Field and Description |
|---|---|
static int |
BATCH_UNLIMITED |
static int |
DELTA_FULL_LENGTH |
static byte[] |
DELTA_MAGIC_PREFIX |
static org.apache.commons.logging.Log |
LOG |
static long |
MAX_TS_PER_MS |
static String |
PROPERTY_TRANSACTIONAL
Property set for
HColumnDescriptor to indicate if increment is transactional. |
protected Map<byte[],Long> |
ttlByFamily |
protected Set<byte[]> |
txnlFamilies |
| Constructor and Description |
|---|
IncrementHandlerState(Configuration conf,
org.apache.hadoop.hbase.HTableDescriptor hTableDescriptor,
HTableNameConverter hTableNameConverter) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsTransactionalFamily(Set<byte[]> familyNames) |
long |
getCompactionBound(byte[] columnFamily)
Returns the upper bound beyond which we can compact any increment deltas into a new sum.
|
long |
getFamilyTTL(byte[] familyName)
Returns the time-to-live (in milliseconds) for the given column family, transformed into the same precision
used in assigning unique timestamps.
|
long |
getOldestVisibleTimestamp(byte[] familyName)
Returns the oldest timestamp that will be visible for a given column family, after the column family's
configured time-to-live is applied.
|
protected com.google.common.base.Supplier<co.cask.tephra.coprocessor.TransactionStateCache> |
getTransactionStateCacheSupplier(org.apache.hadoop.hbase.HTableDescriptor htd,
Configuration conf) |
long |
getUniqueTimestamp()
Returns a unique timestamp for the current operation.
|
void |
initFamily(byte[] familyName,
Map<byte[],byte[]> familyValues) |
void |
setTimestampOracle(TimestampOracle timeOracle) |
public static final String PROPERTY_TRANSACTIONAL
HColumnDescriptor to indicate if increment is transactional. Default: "true", i.e.
transactional.public static final long MAX_TS_PER_MS
public static final byte[] DELTA_MAGIC_PREFIX
public static final int DELTA_FULL_LENGTH
public static final int BATCH_UNLIMITED
public static final org.apache.commons.logging.Log LOG
protected final Set<byte[]> txnlFamilies
public IncrementHandlerState(Configuration conf, org.apache.hadoop.hbase.HTableDescriptor hTableDescriptor, HTableNameConverter hTableNameConverter)
public void setTimestampOracle(TimestampOracle timeOracle)
protected com.google.common.base.Supplier<co.cask.tephra.coprocessor.TransactionStateCache> getTransactionStateCacheSupplier(org.apache.hadoop.hbase.HTableDescriptor htd, Configuration conf)
public void initFamily(byte[] familyName,
Map<byte[],byte[]> familyValues)
public boolean containsTransactionalFamily(Set<byte[]> familyNames)
public long getUniqueTimestamp()
public long getCompactionBound(byte[] columnFamily)
columnFamily - the column family namepublic long getFamilyTTL(byte[] familyName)
familyName - the column family namepublic long getOldestVisibleTimestamp(byte[] familyName)
familyName - the name of the column familyCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.