Return-Path: Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: (qmail 80360 invoked from network); 7 Apr 2011 23:22:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Apr 2011 23:22:00 -0000 Received: (qmail 61498 invoked by uid 500); 7 Apr 2011 23:22:00 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 61441 invoked by uid 500); 7 Apr 2011 23:22:00 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 61434 invoked by uid 99); 7 Apr 2011 23:22:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2011 23:22:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Apr 2011 23:21:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 90FF32388901; Thu, 7 Apr 2011 23:21:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1090060 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java Date: Thu, 07 Apr 2011 23:21:38 -0000 To: commits@hbase.apache.org From: jdcryans@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110407232138.90FF32388901@eris.apache.org> Author: jdcryans Date: Thu Apr 7 23:21:38 2011 New Revision: 1090060 URL: http://svn.apache.org/viewvc?rev=1090060&view=rev Log: HBASE-3734 HBaseAdmin creates new configurations in getCatalogTracker Modified: hbase/branches/0.90/CHANGES.txt hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java Modified: hbase/branches/0.90/CHANGES.txt URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1090060&r1=1090059&r2=1090060&view=diff ============================================================================== --- hbase/branches/0.90/CHANGES.txt (original) +++ hbase/branches/0.90/CHANGES.txt Thu Apr 7 23:21:38 2011 @@ -12,6 +12,7 @@ Release 0.90.3 - Unreleased HBASE-3717 deprecate HTable isTableEnabled() methods in favor of HBaseAdmin methods (David Butler via Stack) HBASE-3747 ReplicationSource should differanciate remote and local exceptions + HBASE-3734 HBaseAdmin creates new configurations in getCatalogTracker TASK HBASE-3748 Add rolling of thrift/rest daemons to graceful_stop.sh script Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java?rev=1090060&r1=1090059&r2=1090060&view=diff ============================================================================== --- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java (original) +++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/client/HBaseAdmin.java Thu Apr 7 23:21:38 2011 @@ -75,17 +75,17 @@ public class HBaseAdmin implements Abort /** * Constructor * - * @param conf Configuration object + * @param c Configuration object * @throws MasterNotRunningException if the master is not running * @throws ZooKeeperConnectionException if unable to connect to zookeeper */ - public HBaseAdmin(Configuration conf) + public HBaseAdmin(Configuration c) throws MasterNotRunningException, ZooKeeperConnectionException { - this.connection = HConnectionManager.getConnection(conf); - this.conf = conf; - this.pause = conf.getLong("hbase.client.pause", 1000); - this.numRetries = conf.getInt("hbase.client.retries.number", 10); - this.retryLongerMultiplier = conf.getInt("hbase.client.retries.longer.multiplier", 10); + this.conf = HBaseConfiguration.create(c); + this.connection = HConnectionManager.getConnection(this.conf); + this.pause = this.conf.getLong("hbase.client.pause", 1000); + this.numRetries = this.conf.getInt("hbase.client.retries.number", 10); + this.retryLongerMultiplier = this.conf.getInt("hbase.client.retries.longer.multiplier", 10); this.connection.getMaster(); } @@ -101,7 +101,7 @@ public class HBaseAdmin implements Abort CatalogTracker ct = null; try { HConnection connection = - HConnectionManager.getConnection(new Configuration(this.conf)); + HConnectionManager.getConnection(this.conf); ct = new CatalogTracker(connection); ct.start(); } catch (InterruptedException e) { @@ -114,7 +114,6 @@ public class HBaseAdmin implements Abort private void cleanupCatalogTracker(final CatalogTracker ct) { ct.stop(); - HConnectionManager.deleteConnection(ct.getConnection().getConfiguration(), true); } @Override @@ -820,7 +819,7 @@ public class HBaseAdmin implements Abort try { if (isRegionName) { Pair pair = - MetaReader.getRegion(getCatalogTracker(), tableNameOrRegionName); + MetaReader.getRegion(ct, tableNameOrRegionName); if (pair == null || pair.getSecond() == null) { LOG.info("No server in .META. for " + Bytes.toString(tableNameOrRegionName) + "; pair=" + pair); @@ -829,7 +828,7 @@ public class HBaseAdmin implements Abort } } else { List> pairs = - MetaReader.getTableRegionsAndLocations(getCatalogTracker(), + MetaReader.getTableRegionsAndLocations(ct, Bytes.toString(tableNameOrRegionName)); for (Pair pair: pairs) { if (pair.getFirst().isOffline()) continue; @@ -1072,7 +1071,7 @@ public class HBaseAdmin implements Abort if (isRegionName(tableNameOrRegionName)) { // Its a possible region name. Pair pair = - MetaReader.getRegion(getCatalogTracker(), tableNameOrRegionName); + MetaReader.getRegion(ct, tableNameOrRegionName); if (pair == null || pair.getSecond() == null) { LOG.info("No server in .META. for " + Bytes.toString(tableNameOrRegionName) + "; pair=" + pair); @@ -1081,7 +1080,7 @@ public class HBaseAdmin implements Abort } } else { List> pairs = - MetaReader.getTableRegionsAndLocations(getCatalogTracker(), + MetaReader.getTableRegionsAndLocations(ct, Bytes.toString(tableNameOrRegionName)); for (Pair pair: pairs) { // May not be a server for a particular row