hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
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 GMT
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) {



Mime
View raw message