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

Hamed Madani commented on HBASE-8774:
-------------------------------------

Do you want me to create a patch out of HBASE-6073 to close the scanner when 
there are no result or do you think with HBASE-3852, that's unnecessary ? I 
added a third parameter to getScannerRows to close the scanner as soon as it 
gets the result. I understand that introducing a third parameter might be very 
specific to our use case, that's why I did not create a patch for it. What do 
you think about it?    

{code}
  public List<TResult> getScannerRows(int scannerId, int numRows, boolean once) 
throws TIOError,
      TIllegalArgument, TException {
    ResultScanner scanner = getScanner(scannerId);
    if (scanner == null) {
      TIllegalArgument ex = new TIllegalArgument();
      ex.setMessage("Invalid scanner Id");
      throw ex;
    }

    try {
      List<TResult> result = resultsFromHBase(scanner.next(numRows));
      if (once) {
        removeScanner(scannerId);
      }
      return result;
    } catch (IOException e) {
      throw getTIOError(e);
    }
  }
{code}
                
> Add BatchSize and Filter to Thrift2
> -----------------------------------
>
>                 Key: HBASE-8774
>                 URL: https://issues.apache.org/jira/browse/HBASE-8774
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Thrift
>    Affects Versions: 0.95.1
>            Reporter: Hamed Madani
>            Assignee: Lars George
>              Labels: thrift2
>         Attachments: HBASE_8774.patch
>
>
> Attached Patch will add BatchSize and Filter support to Thrift2

--
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