Examples of listLocatedStatus()


Examples of org.apache.hadoop.fs.FileSystem.listLocatedStatus()

      FileStatus file = files.get(i);
      if (file.isDir()) {     // it's a MapFile
        Path p = file.getPath();
        FileSystem fs = p.getFileSystem(job.getConfiguration());
        // use the data file
        files.set(i, fs.listLocatedStatus(
            new Path(p, MapFile.DATA_FILE_NAME)).next());
      }
    }
    return files;
  }
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.listLocatedStatus()

      } else if (matches.length == 0) {
        errors.add(new IOException("Input Pattern " + p + " matches 0 files"));
      } else {
        for (FileStatus globStat: matches) {
          for(RemoteIterator<LocatedFileStatus> itor =
            fs.listLocatedStatus(globStat.getPath(),
              inputFilter); itor.hasNext();) {
            result.add(itor.next());
          }         
        }
      }
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.listLocatedStatus()

          LOG.info(dirToClean + " doesn't exist");
          return;
        }
 
        RemoteIterator<LocatedFileStatus> itor;
        for( itor = fs.listLocatedStatus(dirToClean); itor.hasNext();) {
          LocatedFileStatus dirStat = itor.next();
          // Check if this is a directory matching the pattern
          if (!dirStat.isDir()) {
            continue;
          }
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.listLocatedStatus()

     * Look at the output directory to see how many files belong to
     * the current datanode
     */
    public int getNumberOfFiles() throws IOException {
      DistributedFileSystem dfs = (DistributedFileSystem)fs;
      RemoteIterator<LocatedFileStatus> iter = dfs.listLocatedStatus(outputPath);
      int fn = 0;
      while (iter.hasNext()) {
        LocatedFileStatus lfs = iter.next();
        if (lfs.isDir())
          continue;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.