Package org.apache.hadoop.mapreduce

Examples of org.apache.hadoop.mapreduce.Job.submit()


    BasicTableOutputFormat.setOutputPath(job, outPath);
    BasicTableOutputFormat.setSchema(job, "fileName, wordPos, lineNo");

    // set map-only job.
    job.setNumReduceTasks(0);
    job.submit();
    job.waitForCompletion(true);
    BasicTableOutputFormat.close( job );
  }

  /**
 
View Full Code Here


    job.setCombinerClass(InvertedIndexGen.CombinerClass.class);
    BasicTableOutputFormat.setOutputPath(job, invIndexTablePath);
    BasicTableOutputFormat.setSchema(job, "count, index");
    job.setNumReduceTasks(options.numReducer);

    job.submit();
    job.waitForCompletion(true);
    BasicTableOutputFormat.close( job );
  }

  void reduce(Summary sum, Summary delta) {
View Full Code Here

    job.setCombinerClass(FreqWords.CombinerClass.class);
    BasicTableOutputFormat.setOutputPath(job, freqWordTablePath);
    BasicTableOutputFormat.setSchema(job, "count");
    job.setNumReduceTasks(1);

    job.submit();
    job.waitForCompletion(true);
    BasicTableOutputFormat.close( job );
  }

  void printFreqWords() throws IOException, ParseException {
View Full Code Here

    createShardDirectories(outDir, 1);

    BlurOutputFormat.setupJob(job, tableDescriptor);
    BlurOutputFormat.setReducerMultiplier(job, 2);
    job.setNumReduceTasks(4);
    job.submit();

  }
 
  // @TODO this test to fail sometimes due to issues in the MR MiniCluster
//  @Test
View Full Code Here

    createShardDirectories(outDir, 2);

    BlurOutputFormat.setupJob(job, tableDescriptor);
    BlurOutputFormat.setIndexLocally(job, false);

    job.submit();
    boolean killCalled = false;
    while (!job.isComplete()) {
      Thread.sleep(1000);
      System.out.printf("Killed [" + killCalled + "] Map [%f] Reduce [%f]%n", job.mapProgress() * 100,
          job.reduceProgress() * 100);
 
View Full Code Here

    job.addFileToClassPath(second);
    job.addArchiveToClassPath(third);
    job.addCacheArchive(fourth.toUri());
    job.setMaxMapAttempts(1); // speed up failures

    job.submit();
    assertTrue(job.waitForCompletion(false));
  }

  /** Tests using the local job runner. */
  public void testLocalJobRunner() throws Exception {
View Full Code Here

    SleepJob sleepJob = new SleepJob();
    sleepJob.setConf(jobConf);
    Job job = sleepJob.createJob(3, 2, 1000, 1, 500, 1);
    job.setJarByClass(SleepJob.class);
    job.addFileToClassPath(APP_JAR); // The AppMaster jar itself.
    job.submit();
    boolean completed = job.waitForCompletion(true);
    Assert.assertTrue("Job should be completed", completed);
    Assert.assertEquals("Job should be finished successfully",
                    JobStatus.State.SUCCEEDED, job.getJobState());
  }
View Full Code Here

        job = createJob();
      }
      createInputFileListing(job);

      job.submit();
      submitted = true;
    } finally {
      if (!submitted) {
        cleanup();
      }
View Full Code Here

       
    // Submit the request
    try {
      if (submitJobFile != null) {
        Job job = Job.getInstance(new JobConf(submitJobFile));
        job.submit();
        System.out.println("Created job " + job.getJobID());
        exitCode = 0;
      } else if (getStatus) {
        Job job = cluster.getJob(JobID.forName(jobid));
        if (job == null) {
View Full Code Here

      Job job = clientUgi.doAs(new PrivilegedExceptionAction<Job> () {
        @Override
        public Job run() throws IOException, ClassNotFoundException,
          InterruptedException {
          Job job = Job.getInstance(conf);
          job.submit();
          return job;
        }
      });
      // update our Cluster instance with the one created by Job for submission
      // (we can't pass our Cluster instance to Job, since Job wraps the config
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.