Search code examples
hbasenosql

Multiple FilterLists in HBase


Is it possible to have multiple FilterLists while performing a scan in HBase ? If yes, how ? By multiple FilterLists I do not mean multiple Filters.


Solution

  • Because FilterList is itself a Filter, you can build a FilterList that contains other FilterList instances. To quote the docs:

    Since you can use Filter Lists as children of Filter Lists, you can create a hierarchy of filters to be evaluated.

    This allows combining FilterList instances for complex and/or logic:

    FilterList combineFilterLists(FilterList list1, FilterList list2) {
      return new FilterList(list1, list2)
    }