Class FSSpideringIterator

  • All Implemented Interfaces:
    Iterator<org.apache.hadoop.fs.FileStatus>

    public class FSSpideringIterator
    extends Object
    implements Iterator<org.apache.hadoop.fs.FileStatus>
    An iterator that walks through the file tree for a given Path and returns FileStatus for every file encountered within the hierarchy.
    • Constructor Detail

      • FSSpideringIterator

        public FSSpideringIterator​(org.apache.hadoop.fs.FileSystem fs,
                                   org.apache.hadoop.fs.FileStatus[] statii)
    • Method Detail

      • spiderPathPropagateExceptions

        public static FSSpideringIterator spiderPathPropagateExceptions​(org.apache.hadoop.fs.FileSystem fs,
                                                                        org.apache.hadoop.fs.Path path)
      • spiderIterable

        public static Iterable<org.apache.hadoop.fs.FileStatus> spiderIterable​(org.apache.hadoop.fs.FileSystem fs,
                                                                               org.apache.hadoop.fs.Path path)
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator<org.apache.hadoop.fs.FileStatus>
      • next

        public org.apache.hadoop.fs.FileStatus next()
        Specified by:
        next in interface Iterator<org.apache.hadoop.fs.FileStatus>
      • remove

        public void remove()
        Specified by:
        remove in interface Iterator<org.apache.hadoop.fs.FileStatus>