Browse Source

commit 80ff324d50e3f12f11a02e6fdd08cfdd4082c330
Author: Tsz Wo Wo Sze <tsz@ucdev29.inktomisearch.com>
Date: Thu Jan 27 23:59:56 2011 +0000

/HDFS:1598. Directory listing on hftp:// does not show .*.crc files.

+++ b/YAHOO-CHANGES.txt
+ /HDFS:1598. Directory listing on hftp:// does not show
+ .*.crc files. (szetszwo)
+


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077778 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 years ago
parent
commit
462244931c

+ 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") : "\\..*\\.crc";
+      ? request.getParameter("exclude") : "";
     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", 1);
+    createFile("/dir/.a.crc", 1);
     createFile("/dir/b", 1);
     mkdirs("/dir/dir1");
     checkStatus("/dir");

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

@@ -117,7 +117,6 @@
           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());