Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@locus.apache.org Received: (qmail 82308 invoked from network); 15 May 2008 20:39:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 May 2008 20:39:16 -0000 Received: (qmail 44316 invoked by uid 500); 15 May 2008 20:39:18 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 44294 invoked by uid 500); 15 May 2008 20:39:18 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 44274 invoked by uid 99); 15 May 2008 20:39:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 13:39:18 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 May 2008 20:38:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B4E97234C118 for ; Thu, 15 May 2008 13:38:55 -0700 (PDT) Message-ID: <1679371694.1210883935739.JavaMail.jira@brutus> Date: Thu, 15 May 2008 13:38:55 -0700 (PDT) From: "stack (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Commented: (HBASE-626) Use Visitor pattern in MetaRegion to reduce code clones in HTable and HConnectionManager In-Reply-To: <1612727624.1210709155629.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HBASE-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597252#action_12597252 ] stack commented on HBASE-626: ----------------------------- On src/java/org/apache/hadoop/hbase/client/MetaScanner.java + The class comment could be clearer. Be explicit it scans the .META. table only (in hbase-speak, up to this, both -ROOT- and .META., are 'meta' tables). + FYI, in hadoop, lines are <= 80 characters + Why pass in scannerRow and startRow? When would they ever differ? Should the opening of the scanner be done with startRow rather than scannerRow since startRow is being updated as we move over regions? On src/java/org/apache/hadoop/hbase/client/HConnectionManager.java + No biggie, but do you think the MetaScanner should return something richer than RowResult? Nearly every Visitor will be doing what your Visitor in this class is doing constructing an HRegionInfo, checking its null. Should the MetaScanner parse and check for null HRegionInfos returning this plus server and startcodes? This is patch for all the duplicated code it removes. > Use Visitor pattern in MetaRegion to reduce code clones in HTable and HConnectionManager > ---------------------------------------------------------------------------------------- > > Key: HBASE-626 > URL: https://issues.apache.org/jira/browse/HBASE-626 > Project: Hadoop HBase > Issue Type: Improvement > Components: master > Reporter: Jean-Daniel Cryans > Priority: Minor > Fix For: 0.2.0 > > Attachments: hbase-626-v1.patch > > > HTable and HConnectionManager.TableServers both scan the meta region in the same way (but the later also retry one time if it fails). A Visitor pattern should be used in a new scanning method in MetaRegion to accept visitors that gather information such as region names for a table or the list of all tables. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.