Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.FileAlreadyExistsException


      Configuration conf = job.getConfiguration();

      isAppend = conf.get(HIHOConf.IS_APPEND, "false");
      if (isAppend.equalsIgnoreCase("false")) {
        throw new FileAlreadyExistsException();
      } else {
        Path outDir = getOutputPath(job);
        if (outDir == null) {
          throw new InvalidJobConfException(
              "OUTPUT directory not set.");
View Full Code Here


      Configuration conf = job.getConfiguration();

      isAppend = conf.get(HIHOConf.IS_APPEND, "false");
      if (isAppend.equalsIgnoreCase("false")) {
        throw new FileAlreadyExistsException();
      } else {
        Path outDir = getOutputPath(job);
        if (outDir == null) {
          throw new InvalidJobConfException(
              "OUTPUT directory not set.");
View Full Code Here

    TokenCache.obtainTokensForNamenodes(job.getCredentials(),
                                        new Path[] {outDir},
                                        job.getConfiguration());

    if (outDir.getFileSystem(job.getConfiguration()).exists(outDir)) {
      throw new FileAlreadyExistsException("Output directory " + outDir +
                                           " already exists");
    }
  }
View Full Code Here

    // Get local output target
    //
    FileSystem fs = FileSystem.get(getConf());
    if (fs.exists(outputIndex)) {
      throw new FileAlreadyExistsException("Output directory " + outputIndex + " already exists!");
    }

    Path tmpLocalOutput = new Path(localWorkingDir, "merge-output");
    Path localOutput = fs.startLocalOutput(outputIndex, tmpLocalOutput);
View Full Code Here

      // normalize the output directory
      outDir = fs.makeQualified(outDir);
      setOutputPath(job, outDir);
      // check its existence
      if (fs.exists(outDir)) {
        throw new FileAlreadyExistsException("Output directory " + outDir
            + " already exists");
      }
    }
  }
View Full Code Here

    // Get local output target
    //
    FileSystem fs = FileSystem.get(getConf());
    if (fs.exists(outputIndex)) {
      throw new FileAlreadyExistsException("Output directory " + outputIndex + " already exists!");
    }

    Path tmpLocalOutput = new Path(localWorkingDir, "merge-output");
    Path localOutput = fs.startLocalOutput(outputIndex, tmpLocalOutput);
View Full Code Here

    // Get local output target
    //
    FileSystem fs = FileSystem.get(getConf());
    if (fs.exists(outputIndex)) {
      throw new FileAlreadyExistsException("Output directory " + outputIndex + " already exists!");
    }

    Path tmpLocalOutput = new Path(localWorkingDir, "merge-output");
    Path localOutput = fs.startLocalOutput(outputIndex, tmpLocalOutput);
View Full Code Here

    Path outDir = getOutputPath(job);
    if (outDir == null) {
      throw new InvalidJobConfException("Output directory not set.");
    }
    if (outDir.getFileSystem(job.getConfiguration()).exists(outDir)) {
      throw new FileAlreadyExistsException("Output directory " + outDir +
                                           " already exists");
    }
  }
View Full Code Here

        String inputPath = inputPaths.get(dagIndex-1);
        String outputPath = outputPaths.get(dagIndex-1);

        if (fs.exists(new Path(outputPath))) {
          throw new FileAlreadyExistsException("Output directory "
              + outputPath + " already exists");
        }
        LOG.info("Running OrderedWordCount DAG"
            + ", dagIndex=" + dagIndex
            + ", inputPath=" + inputPath
View Full Code Here

    DAGClient dagClient = null;

    try {
        if (fs.exists(new Path(outputPath))) {
          throw new FileAlreadyExistsException("Output directory "
              + outputPath + " already exists");
        }
       
        Map<String, LocalResource> localResources =
          new TreeMap<String, LocalResource>();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.mapred.FileAlreadyExistsException

Copyright © 2018 www.massapicom. 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.