@SuppressWarnings("unchecked") private static ArrayList<Path> collectInputFiles(String input,FileSystem fs) throws FileNotFoundException, IOException {
  Path path=new Path(input);
  ArrayList<Path> files=new ArrayList<Path>();
  if (fs.isDirectory(path)) {
    for (    FileStatus stat : fs.listStatus(path,CSVReblockMR.hiddenFileFilter))     files.add(stat.getPath());
    Collections.sort(files);
  }
 else   files.add(path);
  return files;
}

@ SuppressWarnings ( "unchecked" ) private static ArrayList < Path > collectInputFiles ( String input , FileSystem fs ) throws FileNotFoundException , IOException { Path path = new Path ( input ) ; ArrayList < Path > files = new ArrayList < Path > ( ) ; if ( fs . isDirectory ( path ) ) { for ( FileStatus stat : fs . listStatus ( path , CSVReblockMR . hiddenFileFilter ) ) files . add ( stat . getPath ( ) ) ; Collections . sort ( files ) ; } else files . add ( path ) ; return files ; }
helper function to fetch and sort the list of part files under the given input directory .
