public class IncrementTxFilter
extends org.apache.tephra.hbase.coprocessor.TransactionVisibilityFilter
TransactionVisibilityFilter's default behavior is to give only latest valid version for the transactional
cell to its sub-filters. However the IncrementFilter need to see all previous valid versions for readless
increments, since increments are stored as just the different versions of the same cell. This Filter
extends the TransactionVisibilityFilter and overrides the
TransactionVisibilityFilter.determineReturnCode(org.apache.hadoop.hbase.filter.Filter.ReturnCode, org.apache.hadoop.hbase.filter.Filter.ReturnCode) method to achieve this.org.apache.hadoop.hbase.filter.Filter.ReturnCodereversed| Constructor and Description |
|---|
IncrementTxFilter(org.apache.tephra.Transaction tx,
Map<byte[],Long> ttlByFamily,
boolean allowEmptyValues,
org.apache.hadoop.hbase.regionserver.ScanType scanType,
org.apache.hadoop.hbase.filter.Filter cellFilter)
Creates a new instance of the
Filter. |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.hadoop.hbase.filter.Filter.ReturnCode |
determineReturnCode(org.apache.hadoop.hbase.filter.Filter.ReturnCode txFilterCode,
org.apache.hadoop.hbase.filter.Filter.ReturnCode subFilterCode) |
filterAllRemaining, filterKeyValue, filterRow, filterRowCells, filterRowKey, getNextCellHint, getNextKeyHint, hasFilterRow, isFamilyEssential, reset, toByteArray, transformCellcreateFilterFromArguments, filterRow, toString, transformisReversed, parseFrom, setReversedpublic IncrementTxFilter(org.apache.tephra.Transaction tx,
Map<byte[],Long> ttlByFamily,
boolean allowEmptyValues,
org.apache.hadoop.hbase.regionserver.ScanType scanType,
org.apache.hadoop.hbase.filter.Filter cellFilter)
Filter.tx - the current transaction to apply. Only data visible to this transaction will be returnedttlByFamily - map of time-to-live (TTL) (in milliseconds) by column family nameallowEmptyValues - 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 outscanType - the type of scan operation being performedcellFilter - if non-null, this filter will be applied to all cells visible to the current transaction, by
calling Filter.filterKeyValue(org.apache.hadoop.hbase.Cell). If null, then
Filter.ReturnCode#INCLUDE_AND_NEXT_COL will be returned instead.protected org.apache.hadoop.hbase.filter.Filter.ReturnCode determineReturnCode(org.apache.hadoop.hbase.filter.Filter.ReturnCode txFilterCode, org.apache.hadoop.hbase.filter.Filter.ReturnCode subFilterCode)
determineReturnCode in class org.apache.tephra.hbase.coprocessor.TransactionVisibilityFilterCopyright © 2016 Cask Data, Inc. Licensed under the Apache License, Version 2.0.