public class TransactionVisibilityFilter
extends org.apache.hadoop.hbase.filter.FilterBase
Scan or Get operation performed.| Constructor and Description |
|---|
TransactionVisibilityFilter(Transaction tx,
Map<byte[],Long> ttlByFamily,
boolean allowEmptyValues,
org.apache.hadoop.hbase.regionserver.ScanType scanType)
Creates a new
Filter for returning data only from visible transactions. |
TransactionVisibilityFilter(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
Filter for returning data only from visible transactions. |
| 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)
Determines the return code of TransactionVisibilityFilter based on sub-filter's return code.
|
boolean |
filterAllRemaining() |
org.apache.hadoop.hbase.filter.Filter.ReturnCode |
filterKeyValue(org.apache.hadoop.hbase.Cell cell) |
boolean |
filterRow() |
void |
filterRowCells(List<org.apache.hadoop.hbase.Cell> kvs) |
boolean |
filterRowKey(byte[] buffer,
int offset,
int length) |
org.apache.hadoop.hbase.Cell |
getNextCellHint(org.apache.hadoop.hbase.Cell currentKV) |
org.apache.hadoop.hbase.KeyValue |
getNextKeyHint(org.apache.hadoop.hbase.KeyValue currentKV) |
boolean |
hasFilterRow() |
boolean |
isFamilyEssential(byte[] name) |
void |
reset() |
org.apache.hadoop.hbase.Cell |
transformCell(org.apache.hadoop.hbase.Cell cell) |
createFilterFromArguments, toByteArray, toString, transformpublic TransactionVisibilityFilter(Transaction tx, Map<byte[],Long> ttlByFamily, boolean allowEmptyValues, org.apache.hadoop.hbase.regionserver.ScanType scanType)
Filter for returning data only from visible transactions.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 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 performedpublic TransactionVisibilityFilter(Transaction tx, Map<byte[],Long> ttlByFamily, boolean allowEmptyValues, org.apache.hadoop.hbase.regionserver.ScanType scanType, @Nullable org.apache.hadoop.hbase.filter.Filter cellFilter)
Filter for returning data only from visible transactions.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 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.public org.apache.hadoop.hbase.filter.Filter.ReturnCode filterKeyValue(org.apache.hadoop.hbase.Cell cell)
throws IOException
filterKeyValue in class org.apache.hadoop.hbase.filter.FilterIOExceptionprotected org.apache.hadoop.hbase.filter.Filter.ReturnCode determineReturnCode(org.apache.hadoop.hbase.filter.Filter.ReturnCode txFilterCode,
org.apache.hadoop.hbase.filter.Filter.ReturnCode subFilterCode)
txFilterCode - return code from TransactionVisibilityFiltersubFilterCode - return code from sub-filterpublic boolean filterRow()
throws IOException
filterRow in class org.apache.hadoop.hbase.filter.FilterBaseIOExceptionpublic org.apache.hadoop.hbase.Cell transformCell(org.apache.hadoop.hbase.Cell cell)
throws IOException
transformCell in class org.apache.hadoop.hbase.filter.FilterBaseIOExceptionpublic void reset()
throws IOException
reset in class org.apache.hadoop.hbase.filter.FilterBaseIOExceptionpublic boolean filterRowKey(byte[] buffer,
int offset,
int length)
throws IOException
filterRowKey in class org.apache.hadoop.hbase.filter.FilterBaseIOExceptionpublic boolean filterAllRemaining()
throws IOException
filterAllRemaining in class org.apache.hadoop.hbase.filter.FilterBaseIOExceptionpublic void filterRowCells(List<org.apache.hadoop.hbase.Cell> kvs) throws IOException
filterRowCells in class org.apache.hadoop.hbase.filter.FilterBaseIOExceptionpublic boolean hasFilterRow()
hasFilterRow in class org.apache.hadoop.hbase.filter.FilterBasepublic org.apache.hadoop.hbase.KeyValue getNextKeyHint(org.apache.hadoop.hbase.KeyValue currentKV)
throws IOException
getNextKeyHint in class org.apache.hadoop.hbase.filter.FilterBaseIOExceptionpublic org.apache.hadoop.hbase.Cell getNextCellHint(org.apache.hadoop.hbase.Cell currentKV)
throws IOException
getNextCellHint in class org.apache.hadoop.hbase.filter.FilterBaseIOExceptionpublic boolean isFamilyEssential(byte[] name)
throws IOException
isFamilyEssential in class org.apache.hadoop.hbase.filter.FilterBaseIOExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.