Examples of JobID


Examples of org.apache.hadoop.mapreduce.v2.api.records.JobId

  }

  private static StubbedJob createStubbedJob(Configuration conf,
      Dispatcher dispatcher, int numSplits, AppContext appContext) {
    JobID jobID = JobID.forName("job_1234567890000_0001");
    JobId jobId = TypeConverter.toYarn(jobID);
    if (appContext == null) {
      appContext = mock(AppContext.class);
      when(appContext.hasSuccessfullyUnregistered()).thenReturn(true);
    }
    StubbedJob job = new StubbedJob(jobId,
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.JobId

        Token containerToken = newContainerToken(nodeId, "password".getBytes(),
              containerTokenIdentifier);
        Container container = Container.newInstance(cId, nodeId,
            NM_HOST + ":" + NM_HTTP_PORT, resource, null, containerToken);
        JobID id = TypeConverter.fromYarn(applicationId);
        JobId jobId = TypeConverter.toYarn(id);
        getContext().getEventHandler().handle(new JobHistoryEvent(jobId,
            new NormalizedResourceEvent(
                org.apache.hadoop.mapreduce.TaskType.REDUCE,
            100)));
        getContext().getEventHandler().handle(new JobHistoryEvent(jobId,
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.JobId

      public Dispatcher createDispatcher() {
        return dispatcher;
      }
    };
    Job job = app.submit(new Configuration());
    JobId jobId = app.getJobId();
    app.waitForState(job, JobState.RUNNING);
    Assert.assertEquals("Num tasks not correct", 2, job.getTasks().size());
    Iterator<Task> it = job.getTasks().values().iterator();
    Task mapTask = it.next();
    Task reduceTask = it.next();
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.JobId

      public Dispatcher createDispatcher() {
        return dispatcher;
      }
    };
    Job job = app.submit(new Configuration());
    JobId jobId = app.getJobId();
    app.waitForState(job, JobState.RUNNING);
    Assert.assertEquals("Num tasks not correct", 2, job.getTasks().size());
    Iterator<Task> it = job.getTasks().values().iterator();
    Task mapTask = it.next();
    Task reduceTask = it.next();
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.JobId

     String user = UserGroupInformation.getCurrentUser().getShortUserName();
     Path stagingDir = MRApps.getStagingAreaDir(conf, user);
     when(fs.exists(stagingDir)).thenReturn(true);
     ApplicationId appId = ApplicationId.newInstance(0, 1);
     ApplicationAttemptId attemptId = ApplicationAttemptId.newInstance(appId, 1);
     JobId jobid = recordFactory.newRecordInstance(JobId.class);
     jobid.setAppId(appId);
     TestMRApp appMaster = new TestMRApp(attemptId, null,
         JobStateInternal.RUNNING, maxAttempts);
     appMaster.crushUnregistration = true;
     appMaster.init(conf);
     appMaster.start();
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.JobId

     Path stagingDir = MRApps.getStagingAreaDir(conf, user);
     when(fs.exists(stagingDir)).thenReturn(true);
     ApplicationId appId = ApplicationId.newInstance(System.currentTimeMillis(),
        0);
     ApplicationAttemptId attemptId = ApplicationAttemptId.newInstance(appId, 1);
     JobId jobid = recordFactory.newRecordInstance(JobId.class);
     jobid.setAppId(appId);
     ContainerAllocator mockAlloc = mock(ContainerAllocator.class);
     Assert.assertTrue(MRJobConfig.DEFAULT_MR_AM_MAX_ATTEMPTS > 1);
     MRAppMaster appMaster = new TestMRApp(attemptId, mockAlloc,
         JobStateInternal.RUNNING, MRJobConfig.DEFAULT_MR_AM_MAX_ATTEMPTS);
     appMaster.init(conf);
View Full Code Here

Examples of org.apache.hadoop.mapreduce.v2.api.records.JobId

     Path stagingDir = MRApps.getStagingAreaDir(conf, user);
     when(fs.exists(stagingDir)).thenReturn(true);
     ApplicationId appId = ApplicationId.newInstance(System.currentTimeMillis(),
         0);
     ApplicationAttemptId attemptId = ApplicationAttemptId.newInstance(appId, 0);
     JobId jobid = recordFactory.newRecordInstance(JobId.class);
     jobid.setAppId(appId);
     ContainerAllocator mockAlloc = mock(ContainerAllocator.class);
     MRAppMaster appMaster = new TestMRApp(attemptId, mockAlloc, 4);
     appMaster.init(conf);
     //simulate the process being killed
     MRAppMaster.MRAppMasterShutdownHook hook =
View Full Code Here

Examples of org.glite.jobid.Jobid

                } catch (URISyntaxException e) {
                    logger.warn("malformed LBAddress (" + userLBAddress + "), using default");
                }
            }

            Jobid lbjob = new Jobid(lb.getHost(), lb.getPort());
            logger.info(job.getId() + " assigned gridJobId " + lbjob.toString());

            /*
             * TODO: remove this code, and assign the grid jobid to this job
             * really
             */
            lbjob = new Jobid(lb.getHost(), lb.getPort(), job.getId());
            logger.info("... but using instead " + lbjob.toString());

            //LBCredentials cred = new LBCredentials(job.getDelegationProxyCertPath(), "/etc/grid-security/certificates");
            //ContextDirect ctxd = new ContextDirect(lb.getHost(), lb.getPort());
            //ctxd.setCredentials(cred);
            //ctxd.setJobid(lbjob);
View Full Code Here

Examples of org.rhq.core.domain.operation.JobId

        if (operation.isReadyToSubmit()) {

            // submit
            ResourceOperationSchedule sched = opsManager.scheduleResourceOperation(caller,operation.getResourceId(),operation.getName(),0,0,0,-1,
                    parameters,"Test");
            JobId jobId = new JobId(sched.getJobName(),sched.getJobGroup());
            UriBuilder uriBuilder = uriInfo.getBaseUriBuilder();
            uriBuilder.path("/operation/history/{id}");
            URI uri = uriBuilder.build(jobId);
            Link histLink = new Link("history",uri.toString());
            operation.addLink(histLink);
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.