Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16729

Define the behavior of (default) empty FilterList

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • None
    • None
    • Incompatible change
    • Empty filter list will behave as when there is no filter added. This change is a behavioral change for those who rely on Empty filter list.

    Description

      Current empty FilterList filters all data, because the FilterList#isFamilyEssential always returns false which causes the null cell retrieved by RegionScannerImpl.storeHeap.

      It seems to me that empty FilterList should do nothing, because the following code is common.

      private static Filter makeFilter() {
        FilterList filterList = new FilterList ();
        for (some conditions) {
          // add some filters. Or nothing to add.
        }
        return filterList;
      }
      

      If we keep the current logic which filters all data, we should add enough comments to explain it. Or add the FilterList#size() or FilterList#empty() for preventing filtering all data.

      Any comments? Thanks.

      Attachments

        1. HBASE-16729.v3.patch
          13 kB
          Chia-Ping Tsai
        2. HBASE-16729.v2.patch
          14 kB
          Chia-Ping Tsai
        3. HBASE-16729.v1.patch
          13 kB
          Chia-Ping Tsai
        4. HBASE-16729.v0.patch
          9 kB
          Chia-Ping Tsai

        Issue Links

          Activity

            People

              chia7712 Chia-Ping Tsai
              chia7712 Chia-Ping Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: