Examples of SleepJob


Examples of org.apache.hadoop.examples.SleepJob

      IOException {
    String[] args = { "-m", "0", "-r", "0", "-mt", "0", "-rt", "0" };
    boolean throwsException = false;
    String msg = null;
    try {
      ToolRunner.run(jobConf, new SleepJob(), args);
    } catch (RemoteException re) {
      throwsException = true;
      msg = re.unwrapRemoteException().getMessage();
    }
    assertTrue(throwsException);
View Full Code Here

Examples of org.apache.hadoop.examples.SleepJob

  //got a KillJobAction).
  private static final Log LOG =
        LogFactory.getLog(TestEmptyJob.class.getName());
  private void runSleepJob(JobConf conf) throws Exception {
    String[] args = { "-m", "1", "-r", "10", "-mt", "1000", "-rt", "10000" };
    ToolRunner.run(conf, new SleepJob(), args);
  }
View Full Code Here

Examples of org.apache.hadoop.examples.SleepJob

  }
 
  private void runSleepJob(JobConf conf) throws Exception {
    String[] args = { "-m", "1", "-r", "1",
                      "-mt", "10", "-rt", "10" };
    ToolRunner.run(conf, new SleepJob(), args);
  }
View Full Code Here

Examples of org.apache.hadoop.examples.SleepJob

    LOG.info("Starting testEmptyJob");
    corona = new MiniCoronaCluster.Builder().numTaskTrackers(1).build();
    JobConf conf = corona.createJobConf();
    long start = System.currentTimeMillis();
    String[] args = {"-m", "0", "-r", "0", "-mt", "1", "-rt", "1", "-nosetup" };
    ToolRunner.run(conf, new SleepJob(), args);
    // This sleep is here to wait for the JobTracker to go down completely
    TstUtils.reliableSleep(1000);
    long end = System.currentTimeMillis();
    LOG.info("Time spent for testEmptyJob:" + (end - start));
  }
View Full Code Here

Examples of org.apache.hadoop.examples.SleepJob

      throws Exception {
    String[] args = {"-m", maps + "",
                     "-r", reduces + "",
                     "-mt", "1",
                     "-rt", "1" };
    ToolRunner.run(conf, new SleepJob(), args);
    // This sleep is here to wait for the JobTracker to go down completely
    TstUtils.reliableSleep(1000);
  }
View Full Code Here

Examples of org.apache.hadoop.examples.SleepJob

        sleepTime = 1;
      } else {
        sleepTime = 60000;
      }

      SleepJob sleepJob = new SleepJob();
      sleepJob.setConf(conf);
      SleepJobRunnerThread t =
              new SleepJobRunnerThread(conf, nMappers, nReducers, sleepTime);
      threads.add(t);
    }
View Full Code Here

Examples of org.apache.hadoop.examples.SleepJob

    long endTime = 0;

    public SleepJobRunnerThread(Configuration conf, int nMappers,
            int nReducers, int sleepTime) {
      super();
      jobToRun = new SleepJob();
      jobToRun.setConf(conf);
      this.nMappers = nMappers;
      this.nReducers = nReducers;
      this.sleepTime = sleepTime;
    }
View Full Code Here

Examples of org.apache.hadoop.examples.SleepJob

    Configuration conf = new Configuration();
    conf.set("mapred.job.tracker", "localhost:"
                              + miniMRCluster.getJobTrackerPort());
    String[] args = { "-m", "1", "-r", "1",
                      "-mt", "1000", "-rt", "1000" };
    ToolRunner.run(conf, new SleepJob(), args);
  }
View Full Code Here

Examples of org.apache.hadoop.examples.SleepJob

    }
  }

  private void runSleepJob(JobConf conf) throws Exception {
    String[] args = { "-m", "3", "-r", "1", "-mt", "3000", "-rt", "1000" };
    ToolRunner.run(conf, new SleepJob(), args);
  }
View Full Code Here

Examples of org.apache.hadoop.examples.SleepJob

    conf.set("fs.default.name", "hdfs://"
        + nn.getNameNodeAddress().getHostName() + ":"
        + nn.getNameNodeAddress().getPort());

    JobClient jClient = new JobClient(conf);
    SleepJob sleepJob = new SleepJob();
    sleepJob.setConf(conf);
    // Start the job
    RunningJob job =
        jClient.submitJob(sleepJob.setupJobConf(1, 1, 5000, 1, 1000, 1));
    boolean TTOverFlowMsgPresent = false;
    while (true) {
      // Set-up tasks are the first to be launched.
      TaskReport[] setUpReports = jt.getSetupTaskReports(job.getID());
      for (TaskReport tr : setUpReports) {
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.