diff --git a/shims/common/src/main/java/org/apache/hadoop/fs/ProxyFileSystem.java b/shims/common/src/main/java/org/apache/hadoop/fs/ProxyFileSystem.java index a82b2f0564..0f10e5ae1f 100644 --- a/shims/common/src/main/java/org/apache/hadoop/fs/ProxyFileSystem.java +++ b/shims/common/src/main/java/org/apache/hadoop/fs/ProxyFileSystem.java @@ -207,6 +207,25 @@ public boolean deleteOnExit(Path f) throws IOException { return ret; } + //@Override uncomment once migrated to Hadoop 3.2.0, ref. HADOOP-12502 + public RemoteIterator listStatusIterator(Path f) throws IOException { + return new RemoteIterator() { + private final RemoteIterator orig = + ProxyFileSystem.super.listStatusIterator(swizzleParamPath(f)); + + @Override + public boolean hasNext() throws IOException { + return orig.hasNext(); + } + + @Override + public FileStatus next() throws IOException { + FileStatus ret = orig.next(); + return swizzleFileStatus(ret, false); + } + }; + } + @Override public Path getHomeDirectory() { return swizzleReturnPath(super.getHomeDirectory());