Database Reference
In-Depth Information
Some other useful comparison ilters are stated as follows:
DependentColumnFilter : This ilter adds the intercolumn timestamp,
matching pattern and cells with a correspondingly timestamped entry in
the target column, which will be part of the results. This ilter only works
with the get() operations and is not compatible with the batch feature
of the scan() operations as this ilter needs to cover all the columns of
any row.
QualifierFilter : This ilter works based on a speciic column qualiier
and only includes the rows where the column qualiier passes the criteria.
Custom ilters
These types of ilters can be further categorized into two as follows:
Wrapper ilters : These ilters typically extend or change the behavior of
an existing ilter to achieve more ine-grained control over the results.
The HBase API provides the following wrapper ilters:
° SkipFilter : This filters an entire row if any of the cell checks do not
pass. For example, filter out the entire row if any of its column values
is zero. For example, refer to the following code:
scan.setFilter(new SkipFilter(new ValueFilter ( CompareOp.
NOT_EQUAL, new BinaryComparator( Bytes.toBytes(0))));
° WhileMatchFilter : This filter returns true from
filterAllRemaining() as soon as the wrapped filter, such as
RowFilter or ValueFilter , matches true to the specified value
and also stops the scan() operation.
Pure custom ilters : The HBase API covers most of the ilter cases, but there
might be the need to use a case-speciic iltration of records. To address
this, the API also provides the provision to write pure custom ilters. These
new ilters can be written either by implementing the ilter interface or by
extending the FilterBase abstract class, which also implements the ilter
interface and provides the default implementation. Each method provided
in the ilter interface is used to retrieve rows during the scan() operation.
 
Search WWH ::




Custom Search