Implementing filters
We apply column families, column qualifiers, timestamps, or ranges with the get()
and scan()
operations for limiting the data retrieved. Designing a row key to match the access patterns in every case is not possible, as at times we only need a subset of the data retrieved. Filters provide such a level of fine-grained access, that is, filtering the dataset based on some regular expression. The HBase API provides a filter interface and an abstract class, FilterBase
, under the org.apache.hadoop.hbase.filter
package, which is further extended by many classes such as CompareFilter
, PageFilter
, SkipFilter
, TimeStampsFilter
, and so on, to provide additional functionalities. The following method defined in the Scan
class is used to ...
Get HBase Essentials now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.