Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.InvalidJobConfException


   
    int requestedPartitions = jobConf.getOrbRequestedPartitions();
    // if no partitions are requested, the job is invalid
    if (requestedPartitions <= 0) {
      logger.error("missing number of requested partitions for job");
      throw new InvalidJobConfException("missing number of requested partitions for job");
    }
    int reservedPartitions = jobConf.getOrbReservedPartitions();
   
    // if this is zero, it screws up the resource allocation so we set it to Int max to move through
    // the allocation process
View Full Code Here


      for (String fileString : fileStrings) {
        thisSubject = coreLocation(fileString, conf);

        if (archivesSet.contains(thisSubject)) {
          throw new InvalidJobConfException
            ("The core URI, \""
             + thisSubject
             + "\" is listed both in " + DistributedCache.CACHE_FILES
             + " and in " + DistributedCache.CACHE_ARCHIVES + " .");
        }
View Full Code Here

        uriString
          = (new URI(uri.getScheme(), uri.getAuthority(), uri.getPath(),
                     null, null)
             .toString());
      } catch (URISyntaxException e) {
        throw new InvalidJobConfException
          ("Badly formatted URI: " + uriString, e);
      }
    }
       
    Path path = new Path(uriString);

    try {
      path = path.makeQualified(path.getFileSystem(conf));
    } catch (IOException e) {
      throw new InvalidJobConfException
        ("Invalid file system in distributed cache for the URI: "
         + uriString, e);
    }

    return path;
View Full Code Here

  public void checkOutputSpecs(JobContext job
                               ) throws FileAlreadyExistsException, IOException{
    // Ensure that the output directory is set and not already there
    Path outDir = getOutputPath(job);
    if (outDir == null) {
      throw new InvalidJobConfException("Output directory not set.");
    }

    // get delegation token for outDir's file system
    TokenCache.obtainTokensForNamenodes(job.getCredentials(),
        new Path[] { outDir }, job.getConfiguration());
View Full Code Here

  public void checkOutputSpecs(FileSystem ignored, BSPJob job)
      throws FileAlreadyExistsException, InvalidJobConfException, IOException {
    // Ensure that the output directory is set and not already there
    Path outDir = getOutputPath(job);
    if (outDir == null && job.getNumBspTask() != 0) {
      throw new InvalidJobConfException("Output directory not set in JobConf.");
    }
    if (outDir != null) {
      FileSystem fs = outDir.getFileSystem(job.getConf());
      // normalize the output directory
      outDir = fs.makeQualified(outDir);
View Full Code Here

    {
        // Ensure that the output directory is set and not already there
        Path outDir = getOutputPath(job);
        if (outDir == null)
        {
            throw new InvalidJobConfException("Output directory not set.");
        }

        // get delegation token for outDir's file system
        TokenCache.obtainTokensForNamenodes(
            job.getCredentials(),
View Full Code Here

  public void checkOutputSpecs(JobContext job
                               ) throws FileAlreadyExistsException, IOException{
    // Ensure that the output directory is set and not already there
    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

      jobConf_.setOutputValueClass(Text.class);
    } else if (key_value_class.equalsIgnoreCase("BytesWritable")) {
      jobConf_.setOutputKeyClass(BytesWritable.class);
      jobConf_.setOutputValueClass(BytesWritable.class);
    } else {
      throw new InvalidJobConfException("Key value class " +
        key_value_class + " is not supported. Only Text and " +
        " BytesWritable are supported.");
    }

    jobConf_.set("stream.addenvironment", addTaskEnvironment_);
View Full Code Here

TOP

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

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.