[ 
https://issues.apache.org/jira/browse/HBASE-5664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13566279#comment-13566279
 ] 

Anoop Sam John commented on HBASE-5664:
---------------------------------------

[~lhofhansl]
The new CP call is in nextRow(byte [] currentRow, int offset, short length)
This method is called only when a row is filtered out.
{code}
if (filterRowKey(currentRow, offset, length)) {
-            nextRow(currentRow, offset, length);
+            boolean moreRows = nextRow(currentRow, offset, length);

if (isEmptyRow || filterRow()) {
-            nextRow(currentRow, offset, length);
+            boolean moreRows = nextRow(currentRow, offset, length);

if (results.isEmpty()) {
-          nextRow(currentRow, offset, length);
+          boolean moreRows = nextRow(currentRow, offset, length);

{code}

So in a normal scan how this will affect? Sorry if I am missing some thing. I 
really not getting..:(

{quote}
Also, looking at the patch again, we're not actually filtering rows, but ending 
the scan, right?
So the coprocessor hook is misnamed.
{quote}
The hook is for notifying some row is filtered out. This is for the purpose of 
doing a fast forward rather than a normal go to next row. So by this fast 
forward some time CP implementation can see no more rows remaining in this 
region and that is why it returns a boolean to indicate that. If the CP says no 
more rows, the scan ends there

                
> 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, Filters
>    Affects Versions: 0.92.1
>            Reporter: Anoop Sam John
>            Assignee: Anoop Sam John
>             Fix For: 0.96.0, 0.94.5
>
>         Attachments: HBASE-5664_94.patch, HBASE-5664_94_V2.patch, 
> HBASE-5664_94_V3.patch, HBASE-5664_Trunk.patch, HBASE-5664_Trunk_V2.patch
>
>
> 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

Reply via email to