Package org.apache.hadoop.fs

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


    try {
      Path libPath = new Path(libPathStr);

      FileSystem fs = FileSystem.get(config);

      RemoteIterator<LocatedFileStatus> itr = fs.listFiles(libPath, true);

      while (itr.hasNext()) {
        LocatedFileStatus f = itr.next();

        if (!f.isDirectory() && f.getPath().getName().endsWith("jar")) {
View Full Code Here


    FileSystem fs = inputDir.getFileSystem(conf);

    // obtain input data file statuses
    long dataSize = 0;
    long fileCount = 0;
    RemoteIterator<LocatedFileStatus> iter = fs.listFiles(inputDir, true);
    PathFilter filter = new Utils.OutputFileUtils.OutputFilesFilter();
    while (iter.hasNext()) {
      LocatedFileStatus lStatus = iter.next();
      if (filter.accept(lStatus.getPath())) {
        dataSize += lStatus.getLen();
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.