Prechádzať zdrojové kódy

HDFS-908. TestDistributedFileSystem fails with Wrong FS on weird hosts. Contributed by Todd Lipcon

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20@1035728 13f79535-47bb-0310-9956-ffa450edef68
Eli Collins 14 rokov pred
rodič
commit
f845b2a8ad

+ 3 - 0
CHANGES.txt

@@ -67,6 +67,9 @@ Release 0.20.3 - Unreleased
 
     HDFS-727. bug setting block size hdfsOpenFile (Eli Collins via cos)
 
+    HDFS-908. TestDistributedFileSystem fails with Wrong FS on weird hosts. 
+    (Todd Lipcon via eli)
+
   IMPROVEMENTS
 
     MAPREDUCE-1407. Update javadoc in mapreduce.{Mapper,Reducer} to match

+ 4 - 1
src/test/org/apache/hadoop/hdfs/TestDistributedFileSystem.java

@@ -130,9 +130,12 @@ public class TestDistributedFileSystem extends junit.framework.TestCase {
 
     final MiniDFSCluster cluster = new MiniDFSCluster(conf, 2, true, null);
     final FileSystem hdfs = cluster.getFileSystem();
-    final String hftpuri = "hftp://" + conf.get("dfs.http.address");
+
+    String hftpuri = "hftp://" + conf.get("dfs.http.address");
+
     System.out.println("hftpuri=" + hftpuri);
     final FileSystem hftp = new Path(hftpuri).getFileSystem(conf);
+    hftpuri = hftp.getUri().toString();
 
     final String dir = "/filechecksum";
     final int block_size = 1024;