hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1576369 - /hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java
Date Tue, 11 Mar 2014 14:52:50 GMT
Author: tedyu
Date: Tue Mar 11 14:52:49 2014
New Revision: 1576369

URL: http://svn.apache.org/r1576369
Log:
HBASE-10717 TestFSHDFSUtils#testIsSameHdfs fails with IllegalArgumentException running against
hadoop 2.3


Modified:
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java?rev=1576369&r1=1576368&r2=1576369&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSHDFSUtils.java
Tue Mar 11 14:52:49 2014
@@ -85,7 +85,12 @@ public class FSHDFSUtils extends FSUtils
       }
     } else {
       URI uri = fs.getUri();
-      InetSocketAddress addr = new InetSocketAddress(uri.getHost(), uri.getPort());
+      int port = uri.getPort();
+      if (port < 0) {
+        int idx = serviceName.indexOf(':');
+        port = Integer.parseInt(serviceName.substring(idx+1));
+      }
+      InetSocketAddress addr = new InetSocketAddress(uri.getHost(), port);
       addresses.add(addr);
     }
 



Mime
View raw message