Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 678EB7C49 for ; Mon, 10 Oct 2011 18:48:51 +0000 (UTC) Received: (qmail 87689 invoked by uid 500); 10 Oct 2011 18:48:51 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 87639 invoked by uid 500); 10 Oct 2011 18:48:51 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 87630 invoked by uid 99); 10 Oct 2011 18:48:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2011 18:48:51 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Oct 2011 18:48:50 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D45F43011FF for ; Mon, 10 Oct 2011 18:48:29 +0000 (UTC) Date: Mon, 10 Oct 2011 18:48:29 +0000 (UTC) From: "Lars Hofhansl (Commented) (JIRA)" To: issues@hbase.apache.org Message-ID: <1916151888.15962.1318272509871.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1655736512.10994.1318052009808.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (HBASE-4556) Fix all incorrect uses of InternalScanner.next(...) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-4556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13124387#comment-13124387 ] Lars Hofhansl commented on HBASE-4556: -------------------------------------- Many scanners only return false when there are no more current KVs to return, i.e. the passed kv list is also empty. But does not follow the contract of InternalScanner. > 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