HBASE-10717 TestFSHDFSUtils#testIsSameHdfs fails with IllegalArgumentException running against hadoop 2.3
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1576371 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
85fd591a19
commit
fdd4e8a01b
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue