protected void addLocatedInputPathRecursively ( List < LocatedFileStatus > result , FileSystem fs , Path path , PathFilter inputFilter ) throws IOException { for ( RemoteIterator < LocatedFileStatus > itor = fs . listLocatedStatus ( path , inputFilter ) ; itor . hasNext ( ) ; ) { LocatedFileStatus stat = itor . next ( ) ; if ( stat . isDir ( ) ) { addLocatedInputPathRecursively ( result , fs , stat . getPath ( ) , inputFilter ) ; } else { result . add ( stat ) ; } } }
Add files in the input path recursively into the results .