Procházet zdrojové kódy

HADOOP-7165. listLocatedStatus(path, filter) is not redefined in FilterFs. Contributed by Hairong Kuang

Jason Lowe před 10 roky
rodič
revize
c4bd2cdded

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -635,6 +635,9 @@ Release 2.8.0 - UNRELEASED
     HADOOP-10356. Corrections in winutils/chmod.c. (Rene Nyffenegger via
     Arpit Agarwal)
 
+    HADOOP-7165. listLocatedStatus(path, filter) is not redefined in FilterFs
+    (Hairong Kuang via jlowe)
+
 Release 2.7.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 9 - 1
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFileSystem.java

@@ -192,7 +192,15 @@ public class FilterFileSystem extends FileSystem {
     return fs.create(f, permission,
       flags, bufferSize, replication, blockSize, progress, checksumOpt);
   }
-  
+
+  @Override
+  protected RemoteIterator<LocatedFileStatus> listLocatedStatus(final Path f,
+      final PathFilter filter)
+  throws FileNotFoundException, IOException {
+    return fs.listLocatedStatus(f, filter);
+  }
+
+
   @Override
   @Deprecated
   public FSDataOutputStream createNonRecursive(Path f, FsPermission permission,

+ 8 - 0
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FilterFs.java

@@ -184,6 +184,14 @@ public abstract class FilterFs extends AbstractFileSystem {
     return myFs.listStatus(f);
   }
 
+  @Override
+  public RemoteIterator<LocatedFileStatus> listLocatedStatus(final Path f)
+      throws AccessControlException, FileNotFoundException,
+             UnresolvedLinkException, IOException {
+    checkPath(f);
+    return myFs.listLocatedStatus(f);
+  }
+
   @Override
   public RemoteIterator<Path> listCorruptFileBlocks(Path path)
     throws IOException {