Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 604F890ED for ; Wed, 2 Nov 2011 23:48:44 +0000 (UTC) Received: (qmail 83649 invoked by uid 500); 2 Nov 2011 23:48:44 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 83621 invoked by uid 500); 2 Nov 2011 23:48:44 -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 83612 invoked by uid 99); 2 Nov 2011 23:48:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2011 23:48:44 +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; Wed, 02 Nov 2011 23:48:43 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1358D2388CF2 for ; Wed, 2 Nov 2011 23:48:23 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1196873 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java Date: Wed, 02 Nov 2011 23:48:22 -0000 To: commits@hbase.apache.org From: tedyu@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111102234823.1358D2388CF2@eris.apache.org> Author: tedyu Date: Wed Nov 2 23:48:22 2011 New Revision: 1196873 URL: http://svn.apache.org/viewvc?rev=1196873&view=rev Log: HBASE-4609 ThriftServer.getRegionInfo() is expecting old ServerName format, need to use new Addressing class instead (Jonathan Gray) Modified: hbase/trunk/CHANGES.txt hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java Modified: hbase/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1196873&r1=1196872&r2=1196873&view=diff ============================================================================== --- hbase/trunk/CHANGES.txt (original) +++ hbase/trunk/CHANGES.txt Wed Nov 2 23:48:22 2011 @@ -443,6 +443,8 @@ Release 0.92.0 - Unreleased HBASE-4713 Raise debug level to warn on ExecutionException in HConnectionManager$HConnectionImplementation (Lucian George Iordache) HBASE-4716 Improve locking for single column family bulk load + HBASE-4609 ThriftServer.getRegionInfo() is expecting old ServerName format, need to + use new Addressing class instead (Jonathan Gray) TESTS HBASE-4450 test for number of blocks read: to serve as baseline for expected Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java?rev=1196873&r1=1196872&r2=1196873&view=diff ============================================================================== --- hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java (original) +++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java Wed Nov 2 23:48:22 2011 @@ -72,6 +72,7 @@ import org.apache.hadoop.hbase.thrift.ge import org.apache.hadoop.hbase.thrift.generated.TRegionInfo; import org.apache.hadoop.hbase.thrift.generated.TRowResult; import org.apache.hadoop.hbase.thrift.generated.TScan; +import org.apache.hadoop.hbase.util.Addressing; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.VersionInfo; import org.apache.hadoop.hbase.util.Writables; @@ -953,9 +954,10 @@ public class ThriftServer { value = startRowResult.getValue(HConstants.CATALOG_FAMILY, HConstants.SERVER_QUALIFIER); if (value != null && value.length > 0) { - ServerName sn = new ServerName(Bytes.toString(value), -1/*Any value works here for startcode*/); - region.setServerName(Bytes.toBytes(sn.getHostname())); - region.port = sn.getPort(); + String hostAndPort = Bytes.toString(value); + region.setServerName(Bytes.toBytes( + Addressing.parseHostname(hostAndPort))); + region.port = Addressing.parsePort(hostAndPort); } return region; } catch (IOException e) {