Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.LocalFileSystem.makeQualified()


        String path = conf.get(KEY_LOCAL_TEMPDIR);
        if (path == null) {
            return null;
        }
        LocalFileSystem fs = FileSystem.getLocal(conf);
        Path result = fs.makeQualified(new Path(path));
        return result;
    }

    /**
     * Creates output context from Hadoop context.
View Full Code Here


            LOG.debug("copyToLocalFile: " + pathDst);
            hdfs.copyToLocalFile(pathSrc, pathDst);
            local.deleteOnExit(pathDst);

            libjars[i] = new URL(local.makeQualified(pathDst).toString());
          }

        } catch (IOException ex) {
          throw new RuntimeException("Error setting up classpath", ex);
        }
View Full Code Here

            LOG.debug("copyToLocalFile: " + pathDst);
            hdfs.copyToLocalFile(pathSrc, pathDst);
            local.deleteOnExit(pathDst);

            libjars[i] = new URL(local.makeQualified(pathDst).toString());
          }

        } catch (IOException ex) {
          throw new RuntimeException("Error setting up classpath", ex);
        }
View Full Code Here

        cacheFiles[n] = new Path(fallbackFiles[n].getPath());
      }
    } else {

      for (int n = 0; n < cacheFiles.length; n++) {
        cacheFiles[n] = localFs.makeQualified(cacheFiles[n]);
        // fallback for local execution
        if (!localFs.exists(cacheFiles[n])) {
          cacheFiles[n] = new Path(fallbackFiles[n].getPath());
        }
      }
View Full Code Here

            LOG.debug("copyToLocalFile: " + pathDst);
            hdfs.copyToLocalFile(pathSrc, pathDst);
            local.deleteOnExit(pathDst);

            libjars[i] = new URL(local.makeQualified(pathDst).toString());
          }

        } catch (IOException ex) {
          throw new RuntimeException("Error setting up classpath", ex);
        }
View Full Code Here

        cacheFiles[n] = new Path(fallbackFiles[n].getPath());
      }
    } else {

      for (int n = 0; n < cacheFiles.length; n++) {
        cacheFiles[n] = localFs.makeQualified(cacheFiles[n]);
        // fallback for local execution
        if (!localFs.exists(cacheFiles[n])) {
          cacheFiles[n] = new Path(fallbackFiles[n].getPath());
        }
      }
View Full Code Here

        cacheFiles[n] = new Path(fallbackFiles[n].getPath());
      }
    } else {

      for (int n = 0; n < cacheFiles.length; n++) {
        cacheFiles[n] = localFs.makeQualified(cacheFiles[n]);
        // fallback for local execution
        if (!localFs.exists(cacheFiles[n])) {
          cacheFiles[n] = new Path(fallbackFiles[n].getPath());
        }
      }
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.