فهرست منبع

HDFS-1598 Revert HDFS-1598 (szetszwo)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-203@1086650 13f79535-47bb-0310-9956-ffa450edef68
Owen O'Malley 14 سال پیش
والد
کامیت
50b71dc27e

+ 0 - 3
CHANGES.txt

@@ -32,9 +32,6 @@ Release 0.20.203.0 - unreleased
     MAPREDUCE-2364. Don't hold the rjob lock while localizing resources. (ddas
     via omalley)
 
-    HDFS:1598. Directory listing on hftp:// does not show
-    .*.crc files.  (szetszwo)
-
     MAPREDUCE-2365. New counters for FileInputFormat (BYTES_READ) and 
     FileOutputFormat (BYTES_WRITTEN). 
     New counter MAP_OUTPUT_MATERIALIZED_BYTES for compressed MapOutputSize.

+ 1 - 1
src/hdfs/org/apache/hadoop/hdfs/server/namenode/ListPathsServlet.java

@@ -85,7 +85,7 @@ public class ListPathsServlet extends DfsServlet {
     final String path = request.getPathInfo() != null
       ? request.getPathInfo() : "/";
     final String exclude = request.getParameter("exclude") != null
-      ? request.getParameter("exclude") : "";
+      ? request.getParameter("exclude") : "\\..*\\.crc";
     final String filter = request.getParameter("filter") != null
       ? request.getParameter("filter") : ".*";
     final boolean recur = request.getParameter("recursive") != null

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

@@ -94,7 +94,7 @@ public class TestListPathServlet {
     checkStatus("/");
 
     // A directory with files and directories
-    createFile("/dir/.a.crc", 1);
+    createFile("/dir/a", 1);
     createFile("/dir/b", 1);
     mkdirs("/dir/dir1");
     checkStatus("/dir");

+ 1 - 0
src/webapps/datanode/browseDirectory.jsp

@@ -117,6 +117,7 @@
           for (int i = 0; i < files.length; i++) {
             //Get the location of the first block of the file
             String localname = files[i].getLocalName();
+            if (localname.endsWith(".crc")) continue;
             if (!files[i].isDir()) {
               cols[1] = "file";
               cols[2] = StringUtils.byteDesc(files[i].getLen());