[ https://issues.apache.org/jira/browse/HBASE-5664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13540312#comment-13540312 ]
Anoop Sam John commented on HBASE-5664: --------------------------------------- This is needed in the Secondary index solution The scenario is as below Having 2 conditions in FilterList with MUST_PASS_ALL One SCVF on column cf1:c1 and another scvf on column cf1:c2 Suppose there is only one index on column cf1:c1 Now based on the data got from the index table we will seek to the exact row where cf1:c1=?. But dont know what is the value of cf1:c2 there in that row. Now the second filter may filter out this row. As per the logic in HRegion.nextInternal() it will start a loop there and taking next row onwards till finding a row satisfying both conditions Now as the condition in FL is MUST_PASS_ALL, there is no point in continuing with all the rows. The next row satisfying the condition on column cf1:c1 , we can know from the index data and so we can make a seek to that row directly and check that. Now there is no way to do so. It will be good to provide a CP hook for this so that within that hook I can reseek to the exact row key. > CP hooks in Scan flow for fast forward when filter filters out a row > -------------------------------------------------------------------- > > Key: HBASE-5664 > URL: https://issues.apache.org/jira/browse/HBASE-5664 > Project: HBase > Issue Type: Improvement > Components: Coprocessors > Affects Versions: 0.92.1 > Reporter: Anoop Sam John > Assignee: Anoop Sam John > Fix For: 0.96.0 > > > In HRegion.nextInternal(int limit, String metric) > We have while(true) loop so as to fetch a next result which satisfies > filter condition. When Filter filters out the current fetched row we call > nextRow(byte [] currentRow) before going with the next row. > {code} > if (results.isEmpty() || filterRow()) { > // this seems like a redundant step - we already consumed the row > // there're no left overs. > // the reasons for calling this method are: > // 1. reset the filters. > // 2. provide a hook to fast forward the row (used by subclasses) > nextRow(currentRow); > {code} > // 2. provide a hook to fast forward the row (used by subclasses) > We can provide same feature of fast forward support for the CP also. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira