hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject svn commit: r618416 - in /hadoop/core/trunk: CHANGES.txt src/java/org/apache/hadoop/fs/ChecksumFileSystem.java
Date Mon, 04 Feb 2008 20:16:40 GMT
Author: shv
Date: Mon Feb  4 12:16:37 2008
New Revision: 618416

URL: http://svn.apache.org/viewvc?rev=618416&view=rev
Log:
HADOOP-2754 Filter out .crc files from local file system listing. Contributed by Hairong Kuang.

Modified:
    hadoop/core/trunk/CHANGES.txt
    hadoop/core/trunk/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java

Modified: hadoop/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/CHANGES.txt?rev=618416&r1=618415&r2=618416&view=diff
==============================================================================
--- hadoop/core/trunk/CHANGES.txt (original)
+++ hadoop/core/trunk/CHANGES.txt Mon Feb  4 12:16:37 2008
@@ -16,6 +16,9 @@
     HADOOP-2738 Text is not subclassable because set(Text) and compareTo(Object)
     access the other instance's private members directly.
 
+    HADOOP-2754 Filter out .crc files from local file system listing.
+    (Hairong Kuang via shv)
+
 Release 0.16.0 - 2008-02-07
 
   INCOMPATIBLE CHANGES

Modified: hadoop/core/trunk/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java
URL: http://svn.apache.org/viewvc/hadoop/core/trunk/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java?rev=618416&r1=618415&r2=618416&view=diff
==============================================================================
--- hadoop/core/trunk/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java (original)
+++ hadoop/core/trunk/src/java/org/apache/hadoop/fs/ChecksumFileSystem.java Mon Feb  4 12:16:37
2008
@@ -425,18 +425,32 @@
   }
 
   final private static PathFilter DEFAULT_FILTER = new PathFilter() {
-      public boolean accept(Path file) {
-        return !isChecksumFile(file);
-      }
-    };
+    public boolean accept(Path file) {
+      return !isChecksumFile(file);
+    }
+  };
 
+  /**
+   * List the statuses of the files/directories in the given path if the path is
+   * a directory.
+   * 
+   * @param f
+   *          given path
+   * @return the statuses of the files/directories in the given patch
+   * @throws IOException
+   */
+  @Override
+  public FileStatus[] listStatus(Path f) throws IOException {
+    return fs.listStatus(f, DEFAULT_FILTER);
+  }
+  
   /** 
    * Filter raw files in the given pathes using the default checksum filter. 
    * @param files a list of paths
    * @return a list of files under the source paths
    * @exception IOException
    */
-  @Override
+  @Deprecated
   public Path[] listPaths(Path[] files) throws IOException {
     return fs.listPaths(files, DEFAULT_FILTER);
   }
@@ -447,6 +461,7 @@
    * @return a list of files under the source path
    * @exception IOException
    */
+  @Deprecated
   public Path[] listPaths(Path f) throws IOException {
     return fs.listPaths(f, DEFAULT_FILTER);
   }



Mime
View raw message