hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-4556) Fix all incorrect uses of InternalScanner.next(...)
Date Tue, 11 Oct 2011 06:40:31 GMT

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

Lars Hofhansl commented on HBASE-4556:
--------------------------------------

I think we could use some tests that (somehow) simulate InternalScanners or RegionScanners,
where next returns false while still delivering KVs in the current iteration.
                
> Fix all incorrect uses of InternalScanner.next(...)
> ---------------------------------------------------
>
>                 Key: HBASE-4556
>                 URL: https://issues.apache.org/jira/browse/HBASE-4556
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>
> There are cases all over the code where InternalScanner.next(...) is not used correctly.
> I see this a lot:
> {code}
> while(scanner.next(...)) {
> }
> {code}
> The correct pattern is:
> {code}
> boolean more = false;
> do {
>    more = scanner.next(...);
> } while (more);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message