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

Enis Soztutar commented on HBASE-16838:
---------------------------------------

Sorry a bit late, but we were discussion with Devaraj about the small scan API 
yesterday. I understand the reason why we want to avoid 3 RPCs per scan if the 
scan is really small, but I think we should have made it so that ALL scans are 
saving RPCs, and becomes a "small" scan automatically without the client using 
a different API or Scan.setSmall(). 

There is no reason for regular scans to have openScan() and next() calls 
separately. We can easily make it so that Scanner open will return the next set 
of batch results. And we can make it so that the region server at the end of 
the scan when the region is exhausted automatically close the scanner before 
returning and give the results back to the client. So, for a "small" scan, the 
first RPC will open the results, and fetch all the results in the batch and 
return by closing the scanner in a single RPC automatically. What do you guys 
think? We can open a separate issue to track this. 

> Implement basic scan
> --------------------
>
>                 Key: HBASE-16838
>                 URL: https://issues.apache.org/jira/browse/HBASE-16838
>             Project: HBase
>          Issue Type: Sub-task
>    Affects Versions: 2.0.0
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>             Fix For: 2.0.0
>
>         Attachments: HBASE-16838-v1.patch, HBASE-16838-v2.patch, 
> HBASE-16838.patch
>
>
> Implement a scan works like the grpc streaming call that all returned results 
> will be passed to a ScanObserver. The methods of the observer will be called 
> directly in the rpc framework threads so it is not allowed to do time 
> consuming work in the methods. So in general only experts or the 
> implementation of other methods in AsyncTable can call this method directly, 
> that's why I call it 'basic scan'.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to