Examples of copyToLocalFile()


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

   
    Configuration conf = CachedConfiguration.getInstance();
    FileSystem fs;
    fs = FileSystem.get(conf);
   
    fs.copyToLocalFile(new Path("/accumulo-scale/conf/site.conf"), new Path(sitePath));
    fs.copyToLocalFile(new Path(String.format("/accumulo-scale/conf/%s.conf", opts.testId)), new Path(testPath));
   
    // load configuration file properties
    Properties scaleProps = new Properties();
    Properties testProps = new Properties();
View Full Code Here

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

    Configuration conf = CachedConfiguration.getInstance();
    FileSystem fs;
    fs = FileSystem.get(conf);
   
    fs.copyToLocalFile(new Path("/accumulo-scale/conf/site.conf"), new Path(sitePath));
    fs.copyToLocalFile(new Path(String.format("/accumulo-scale/conf/%s.conf", opts.testId)), new Path(testPath));
   
    // load configuration file properties
    Properties scaleProps = new Properties();
    Properties testProps = new Properties();
    try {
View Full Code Here

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

    Path jobFile = new Path(t.getJobFile());
    FileSystem systemFS = tracker.systemFS;
    this.localizedJobFile = new Path(workDir, jobID + ".xml");
    LOG.info("Localizing CJT configuration from " + jobFile + " to " +
        localizedJobFile);
    systemFS.copyToLocalFile(jobFile, localizedJobFile);
    JobConf localJobConf = new JobConf(localizedJobFile);
    boolean modified = Task.saveStaticResolutions(localJobConf);
    if (modified) {
      FSDataOutputStream out = new FSDataOutputStream(
        new FileOutputStream(localizedJobFile.toUri().getPath()));
View Full Code Here

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

    Path jobDir = jobtracker.getSystemDirectoryForJob(jobId);
    FileSystem fs = jobDir.getFileSystem(default_conf);
    jobFile = new Path(jobDir, "job.xml");

    if (!localFs.exists(localJobFile)) {
      fs.copyToLocalFile(jobFile, localJobFile);
    }

    conf = new JobConf(localJobFile);
    this.priority = conf.getJobPriority();
    this.status.setJobPriority(this.priority);
View Full Code Here

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

    FileSystem fs = jobDir.getFileSystem(default_conf);
    JobConf default_job_conf = new JobConf(default_conf);
    Path localJobFile = default_job_conf.getLocalPath(JobTracker.SUBDIR + "/"
        + jobid + ".xml");
    Path jobFile = new Path(jobDir, "job.xml");
    fs.copyToLocalFile(jobFile, localJobFile);
  }

  /**
   * Called periodically by JobTrackerMetrics to update the metrics for
   * this job.
View Full Code Here

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

   
    Configuration conf = CachedConfiguration.getInstance();
    FileSystem fs;
    fs = FileSystem.get(conf);
   
    fs.copyToLocalFile(new Path("/accumulo-scale/conf/site.conf"), new Path(sitePath));
    fs.copyToLocalFile(new Path(String.format("/accumulo-scale/conf/%s.conf", testId)), new Path(testPath));
   
    // load configuration file properties
    Properties scaleProps = new Properties();
    Properties testProps = new Properties();
View Full Code Here

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

    Configuration conf = CachedConfiguration.getInstance();
    FileSystem fs;
    fs = FileSystem.get(conf);
   
    fs.copyToLocalFile(new Path("/accumulo-scale/conf/site.conf"), new Path(sitePath));
    fs.copyToLocalFile(new Path(String.format("/accumulo-scale/conf/%s.conf", testId)), new Path(testPath));
   
    // load configuration file properties
    Properties scaleProps = new Properties();
    Properties testProps = new Properties();
    try {
View Full Code Here

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

      FileSystem fs = path.getFileSystem(this.conf);
      File parentDir = new File(this.conf.get("hbase.local.dir") + COPROCESSOR_JARS_DIR);
      parentDir.mkdirs();
      File dst = new File(parentDir, "." + pathPrefix +
          "." + className + "." + System.currentTimeMillis() + ".jar");
      fs.copyToLocalFile(path, new Path(dst.toString()));
      dst.deleteOnExit();

      // TODO: code weaving goes here

      // TODO: wrap heap allocations and enforce maximum usage limits
View Full Code Here

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

      if ( ! resourceDir.exists() && ! resourceDir.mkdirs() ) {
        throw new RuntimeException("Couldn't create directory " + resourceDir);
      }
      try {
        FileSystem fs = FileSystem.get(new URI(value), conf);
        fs.copyToLocalFile(new Path(value), new Path(destinationFile.getCanonicalPath()));
        value = destinationFile.getCanonicalPath();
        if (convertToUnix && DosToUnix.isWindowsScript(destinationFile)) {
          try {
            DosToUnix.convertWindowsScriptToUnix(destinationFile);
          } catch (Exception e) {
View Full Code Here

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

    this.localJarFile = default_job_conf.getLocalPath(JobTracker.SUBDIR
                                                      +"/"+ jobid + ".jar");
    Path sysDir = new Path(this.jobtracker.getSystemDir());
    FileSystem fs = sysDir.getFileSystem(default_conf);
    jobFile = new Path(sysDir, jobid + "/job.xml");
    fs.copyToLocalFile(jobFile, localJobFile);
    conf = new JobConf(localJobFile);
    this.priority = conf.getJobPriority();
    this.status.setJobPriority(this.priority);
    this.profile = new JobProfile(conf.getUser(), jobid,
                                  jobFile.toString(), url, conf.getJobName(),
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.