hadoop-hdfs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cnaur...@apache.org
Subject svn commit: r1498058 - in /hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs: CHANGES.txt src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java
Date Sun, 30 Jun 2013 03:57:05 GMT
Author: cnauroth
Date: Sun Jun 30 03:57:05 2013
New Revision: 1498058

URL: http://svn.apache.org/r1498058
Log:
HDFS-4944. Merging change r1498057 from branch-2 to branch-2.1-beta.

Modified:
    hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
    hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java

Modified: hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt?rev=1498058&r1=1498057&r2=1498058&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt Sun
Jun 30 03:57:05 2013
@@ -399,6 +399,9 @@ Release 2.1.0-beta - 2013-07-02
     HDFS-4927. CreateEditsLog creates inodes with an invalid inode ID, which then
     cannot be loaded by a namenode. (cnauroth)
 
+    HDFS-4944. WebHDFS cannot create a file path containing characters that must
+    be URI-encoded, such as space. (cnauroth)
+
   BREAKDOWN OF HDFS-347 SUBTASKS AND RELATED JIRAS
 
     HDFS-4353. Encapsulate connections to peers in Peer and PeerServer classes.

Modified: hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java?rev=1498058&r1=1498057&r2=1498058&view=diff
==============================================================================
--- hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java
(original)
+++ hadoop/common/branches/branch-2.1-beta/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHdfsFileSystemContract.java
Sun Jun 30 03:57:05 2013
@@ -404,5 +404,34 @@ public class TestWebHdfsFileSystemContra
       }
       conn.disconnect();
     }
+
+    {//test create with path containing spaces
+      HttpOpParam.Op op = PutOpParam.Op.CREATE;
+      Path path = new Path("/test/path%20with%20spaces");
+      URL url = webhdfs.toUrl(op, path);
+      HttpURLConnection conn = (HttpURLConnection)url.openConnection();
+      conn.setRequestMethod(op.getType().toString());
+      conn.setDoOutput(false);
+      conn.setInstanceFollowRedirects(false);
+      final String redirect;
+      try {
+        conn.connect();
+        assertEquals(HttpServletResponse.SC_TEMPORARY_REDIRECT,
+          conn.getResponseCode());
+        redirect = conn.getHeaderField("Location");
+      } finally {
+        conn.disconnect();
+      }
+
+      conn = (HttpURLConnection)new URL(redirect).openConnection();
+      conn.setRequestMethod(op.getType().toString());
+      conn.setDoOutput(op.getDoOutput());
+      try {
+        conn.connect();
+        assertEquals(HttpServletResponse.SC_CREATED, conn.getResponseCode());
+      } finally {
+        conn.disconnect();
+      }
+    }
   }
 }



Mime
View raw message