You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "Zheng Hu (JIRA)" <ji...@apache.org> on 2019/08/07 07:32:00 UTC

[jira] [Created] (HBASE-22811) Deprecated the PageFilter because it's not a global page filter but only region level page filter.

Zheng Hu created HBASE-22811:
--------------------------------

             Summary: Deprecated the PageFilter because it's not a global page filter but only region level page filter.
                 Key: HBASE-22811
                 URL: https://issues.apache.org/jira/browse/HBASE-22811
             Project: HBase
          Issue Type: Improvement
            Reporter: Zheng Hu
            Assignee: Zheng Hu


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: 
{code}
Scan scan = new Scan();
scan.withStartRow(Bytes.toBytes("111"));
scan.withStopRow(Bytes.toBytes("4444"));
scan.setFilter(new PageFilter(3000));
{code}

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.






--
This message was sent by Atlassian JIRA
(v7.6.14#76016)