co.cask.tephra.hbase94.coprocessor
Class TransactionVisibilityFilter
java.lang.Object
org.apache.hadoop.hbase.filter.FilterBase
co.cask.tephra.hbase94.coprocessor.TransactionVisibilityFilter
- All Implemented Interfaces:
- org.apache.hadoop.hbase.filter.Filter, org.apache.hadoop.io.Writable
public class TransactionVisibilityFilter
- extends org.apache.hadoop.hbase.filter.FilterBase
Applies filtering of data based on transactional visibility (HBase 0.94 specific version).
Note: this is intended for server-side use only, as additional properties need to be set on
any Scan or Get operation performed.
| Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.filter.Filter |
org.apache.hadoop.hbase.filter.Filter.ReturnCode |
| Methods inherited from class org.apache.hadoop.hbase.filter.FilterBase |
createFilterFromArguments, filterAllRemaining, filterRow, filterRow, filterRowKey, getNextKeyHint, hasFilterRow, isFamilyEssential, isFamilyEssential, reset, toString, transform |
TransactionVisibilityFilter
public TransactionVisibilityFilter(Transaction tx,
Map<byte[],Long> ttlByFamily,
boolean allowEmptyValues)
- Creates a new
Filter for returning data only from visible transactions.
- Parameters:
tx - The current transaction to apply. Only data visible to this transaction will be returned.ttlByFamily - Map of time-to-live (TTL) (in milliseconds) by column family name.allowEmptyValues - If true cells with empty byte[] values will be returned, if false
these will be interpreted as "delete" markers and the column will be filtered out.
TransactionVisibilityFilter
public TransactionVisibilityFilter(Transaction tx,
Map<byte[],Long> ttlByFamily,
boolean allowEmptyValues,
@Nullable
org.apache.hadoop.hbase.filter.Filter cellFilter)
- Creates a new
Filter for returning data only from visible transactions.
- Parameters:
tx - The current transaction to apply. Only data visible to this transaction will be returned.ttlByFamily - Map of time-to-live (TTL) (in milliseconds) by column family name.allowEmptyValues - If true cells with empty byte[] values will be returned, if false
these will be interpreted as "delete" markers and the column will be filtered out.cellFilter - If non-null, this filter will be applied to all cells visible to the current transaction, by
calling Filter.filterKeyValue(org.apache.hadoop.hbase.KeyValue). If null, then
Filter.ReturnCode#INCLUDE_AND_NEXT_COL will be returned instead.
filterKeyValue
public org.apache.hadoop.hbase.filter.Filter.ReturnCode filterKeyValue(org.apache.hadoop.hbase.KeyValue kv)
- Specified by:
filterKeyValue in interface org.apache.hadoop.hbase.filter.Filter- Overrides:
filterKeyValue in class org.apache.hadoop.hbase.filter.FilterBase
write
public void write(DataOutput dataOutput)
throws IOException
- Throws:
IOException
readFields
public void readFields(DataInput dataInput)
throws IOException
- Throws:
IOException
Copyright © 2014. All Rights Reserved.