Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.JobClient


      File wd = new File(".").getAbsoluteFile();
      StreamUtil.unJar(new File(jar_), wd);
    }

    // if jobConf_ changes must recreate a JobClient
    jc_ = new JobClient(jobConf_);
    boolean error = true;
    running_ = null;
    String lastReport = null;
    try {
      running_ = jc_.submitJob(jobConf_);
View Full Code Here


    jobConf.set(TMP_DIR_LABEL, tmpDir.toUri().toString());
    LOG.info("srcCount=" + srcCount);
    jobConf.setInt(SRC_COUNT_LABEL, srcCount);
    jobConf.setLong(TOTAL_SIZE_LABEL, cbsize);
    jobConf.setNumMapTasks(getMapCount(cbsize,
        new JobClient(jobConf).getClusterStatus().getTaskTrackers()));
  }
View Full Code Here

      return null;
    }

    try {
      Configuration cfg = job.getConfiguration();
      JobClient jobClient = null;
      try {
        Constructor<JobClient> constr = JobClient.class.getConstructor(Configuration.class);
        jobClient = constr.newInstance(cfg);
      } catch (Exception e) {
        jobClient = new JobClient();
      }
      org.apache.hadoop.mapred.JobID id = getOldJobId(job);
      if (id != null) {
        return jobClient.getJob(id);
      } else {
        return null;
      }
    } catch (IOException e) {
      return null;
View Full Code Here

    idbconf.setInfiniDBHome("/usr/local/Calpont");

    jobconf.setMapperClass(InfiniDoopMapper.class);
    jobconf.setNumMapTasks(1);
    jobconf.setNumReduceTasks(2);
    JobClient client = new JobClient();
    client.setConf(jobconf);
    try {
      JobClient.runJob(jobconf);
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

    idbconf.setOutputPath("output2");
    jobconf.setMapperClass(InfiniDoopInputMapper.class);
    jobconf.setNumMapTasks(4);
    jobconf.setNumReduceTasks(1);
    jobconf.set("mapred.textoutputformat.separator", "|");
    JobClient client = new JobClient();

    client.setConf(jobconf);
    try {
      JobClient.runJob(jobconf);
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

    jobconf.set("mapred.output.dir", "output");
   
        jobconf.setMapperClass(InfiniDoopMapper.class);
        jobconf.setNumMapTasks(1);
        jobconf.setNumReduceTasks(2);
        JobClient client = new JobClient();
        //System.out.println(jobconf.getUser());
        //System.out.println(FileOutputFormat.getOutputPath(jobconf));
        jobconf.setInt("mapred.min.split.size", 2147483647);

        //int i = (job.waitForCompletion(true)? 1: 0);
        //return i;
        client.setConf(jobconf);
    try {
      JobClient.runJob(jobconf);
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

    Job job = new Job(jobconf);
    jobconf.set("mapred.output.dir", "output1");
        jobconf.setMapperClass(InfiniDoopInputMapper.class);
        jobconf.setNumMapTasks(4);
        jobconf.setNumReduceTasks(8);
        JobClient client = new JobClient();
        //System.out.println(jobconf.getUser());
        //System.out.println(FileOutputFormat.getOutputPath(jobconf));

        //int i = (job.waitForCompletion(true)? 1: 0);
        //return i;
        client.setConf(jobconf);
    try {
      JobClient.runJob(jobconf);
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

    jobconf.set("mapred.output.dir", "output");
   
        jobconf.setMapperClass(InfiniDoopMapper.class);
        jobconf.setNumMapTasks(1);
        jobconf.setNumReduceTasks(2);
        JobClient client = new JobClient();
        //System.out.println(jobconf.getUser());
        //System.out.println(FileOutputFormat.getOutputPath(jobconf));
        jobconf.setInt("mapred.min.split.size", 2147483647);

        //int i = (job.waitForCompletion(true)? 1: 0);
        //return i;
        client.setConf(jobconf);
    try {
      JobClient.runJob(jobconf);
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

    sortJob.setOutputKeyComparatorClass           // sort by decreasing freq
      (LongWritable.DecreasingComparator.class);

    JobClient.runJob(sortJob);

    new JobClient(defaults).getFs().delete(tempDir);
  }
View Full Code Here

  protected void closeFileSystem(FileSystem fs) throws IOException {
    fs.close();
  }

  protected JobClient createJobClient(JobConf jobtrackerConf) throws IOException {
    return new JobClient(jobtrackerConf);
  }
View Full Code Here

TOP

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

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.