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

Deprecated the PageFilter because it's not a global page filter but only region level page filter.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      In HBASE-21332, one user complain about the PageFilter. Say have a table with 5 regions: (-oo, 111), [111, 222), [222, 333), [333, 444), [444, +oo), and each region have > 10000 rows. when he use the following scan to read the table, it will gain more than 3000 rows, that's quite confusing:

      Scan scan = new Scan();
      scan.withStartRow(Bytes.toBytes("111"));
      scan.withStopRow(Bytes.toBytes("4444"));
      scan.setFilter(new PageFilter(3000));
      

      In fact, the state in PageFilter is region leve only, once the scan switch from one region to another region, then we will create a new PageFilter with rowsAccepted =0 (rows counter inside PageFilter ). So the scan will get results as the following:

      1. got 3000 rows in region [111,222), and switched to another region [222, 333);
      2. got 3000 rows in region [222,333), and switched to another region [333, 444);
      3. got 3000 rows in region [333,444), and reached the stopRow. stop.

      Then the scan got 9000 rows in the end, that's quite confusing for HBase use. Actually, since 1.4.x, we have the Scan.setLimit which can replace the PageFilter now I think.
      So plan to mark the PageFilter as deprecated.

      Attachments

        Activity

          People

            openinx Zheng Hu
            openinx Zheng Hu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: