Package org.apache.hadoop.examples

Examples of org.apache.hadoop.examples.SleepJob


    // No map-memory configuration
    JobConf jobConf = new JobConf(clusterConf);
    String[] args = { "-m", "0", "-r", "0", "-mt", "0", "-rt", "0" };
    String msg = null;
    try {
      ToolRunner.run(jobConf, new SleepJob(), args);
      assertTrue(false);
    } catch (RemoteException re) {
      System.out.println("Exception " + StringUtils.stringifyException(re));
    }
View Full Code Here


      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

    ArrayList<String> taskTrackerCollection = new ArrayList<String>();
    //This boolean tells if two tasks ran onteh same tasktracker or not
    boolean taskTrackerFound = false;

    do {
      SleepJob job = new SleepJob();
      job.setConf(conf);
      conf = job.setupJobConf(5, 1, 1000, 1000, 100, 100);
      conf.setBoolean("mapreduce.job.complete.cancel.delegation.tokens", false);

      //Before starting, Modify the file
      String input = "This will be the content of\n" + "distributed cache\n";
      //Creating the path with the file
View Full Code Here

    Assert.assertEquals("Job has not been failed...",
            JobStatus.SUCCEEDED, jStatus.getRunState());
  }

  private void setupJobAndRun() throws IOException {
    SleepJob job = new SleepJob();
    job.setConf(conf);
    conf = job.setupJobConf(3, 1, 60000, 100, 60000, 100);
    JobConf jobConf = new JobConf(conf);
    cleanup(outputDir, conf);
    jtClient = cluster.getJTClient();
    JobClient client = jtClient.getClient();
    wovenClient = cluster.getJTClient().getProxy();
View Full Code Here

    //This counter will check for count of a loop,
    //which might become infinite.
    int count = 0;

    SleepJob job = new SleepJob();
    job.setConf(conf);
    conf = job.setupJobConf(5, 1, 1000, 1000, 100, 100);

    DistributedCache.createSymlink(conf);
    URI uri = URI.create(uriPath);
    DistributedCache.addCacheFile(uri, conf);
    JobConf jconf = new JobConf(conf);
View Full Code Here

   * Verifying the job summary information for killed job.
   */
  @Test
  public void testJobSummaryInfoOfKilledJob() throws IOException,
          InterruptedException {
    SleepJob job = new SleepJob();
    conf.setBoolean("mapreduce.job.complete.cancel.delegation.tokens", false);
    job.setConf(conf);
    conf = job.setupJobConf(2, 1, 4000, 4000, 100, 100);
    JobConf jobConf = new JobConf(conf);
    RunningJob runJob = jobClient.submitJob(jobConf);
    JobID jobId = runJob.getID();
    Assert.assertTrue("Job has not been started for 1 min.",
            jtClient.isJobStarted(jobId));
View Full Code Here

   * after job is completed.
   */
  @Test
  public void testJobQueueInfoInJobSummary() throws IOException,
  InterruptedException {
    SleepJob job = new SleepJob();
    job.setConf(conf);
    conf = job.setupJobConf(2, 1, 4000, 4000, 100, 100);
    conf.setBoolean("mapreduce.job.complete.cancel.delegation.tokens", false);
    JobConf jobConf = new JobConf(conf);
    JobQueueInfo [] queues = jobClient.getQueues();
    for (JobQueueInfo queueInfo : queues ){
      if (!queueInfo.getQueueName().equals("default")) {
View Full Code Here

          users.get(0));
    } else {
      proxyUGI = UserGroupInformation.createProxyUser(
      users.get(0), ugi);
    }
    SleepJob job = new SleepJob();
    job.setConf(conf);
    final JobConf jobConf = job.setupJobConf(2, 1, 2000, 2000, 100, 100);
    final JobClient jClient =
      proxyUGI.doAs(new PrivilegedExceptionAction<JobClient>() {
          public JobClient run() throws IOException {
            return new JobClient(jobConf);
          }
View Full Code Here

        "/homes/hadoopqa/hadoopqa.dev.headless.keytab hadoopqa";
    excludeHostPath = new Path(excludeHostPathString);
    LOG.info("exclude Host pathString is :" + excludeHostPathString);

    //One sleep job is submitted
    SleepJob job = new SleepJob();
    job.setConf(conf);
    conf = job.setupJobConf(1, 0, 100, 100, 100, 100);
    JobConf jconf = new JobConf(conf);
    RunningJob rJob = cluster.getJTClient().getClient().submitJob(jconf);

    //username who submitted the job is got.
    String userName = null;
View Full Code Here

  @Test
  public void testControlledJob() throws Exception {
    Configuration conf = new Configuration(cluster.getConf());
    JTProtocol wovenClient = cluster.getJTClient().getProxy();
    FinishTaskControlAction.configureControlActionForJob(conf);
    SleepJob job = new SleepJob();
    job.setConf(conf);
   
    conf = job.setupJobConf(1, 0, 100, 100, 100, 100);
    JobClient client = cluster.getJTClient().getClient();
   
    RunningJob rJob = client.submitJob(new JobConf(conf));
    JobID id = rJob.getID();
   
View Full Code Here

TOP

Related Classes of org.apache.hadoop.examples.SleepJob

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.