Package org.apache.hadoop.yarn.api.records.impl.pb

Examples of org.apache.hadoop.yarn.api.records.impl.pb.ApplicationIdPBImpl


    maybeInitBuilder();
    builder.setNmVersion(version);
  }
 
  private ApplicationIdPBImpl convertFromProtoFormat(ApplicationIdProto p) {
    return new ApplicationIdPBImpl(p);
  }
View Full Code Here


    containerId.setApplicationAttemptId(getApplicationAttemptId(appAttemptId));
    return containerId;
  }

  private ApplicationId getApplicationId(int applicationId) {
    ApplicationId appId = new ApplicationIdPBImpl();
    appId.setClusterTimestamp(1000);
    appId.setId(applicationId);
    return appId;
  }
View Full Code Here

    ContainerId containerId = new ContainerIdPBImpl();
    containerId.setId(1);
    ApplicationAttemptId appAId = new ApplicationAttemptIdPBImpl();
    appAId.setAttemptId(1);
    ApplicationId appId = new ApplicationIdPBImpl();
    appId.setClusterTimestamp(System.currentTimeMillis());
    appId.setId(5);
    appAId.setApplicationId(appId);
    containerId.setApplicationAttemptId(appAId);
    when(attempt.getAssignedContainerID()).thenReturn(containerId);

    when(attempt.getAssignedContainerMgrAddress()).thenReturn(
View Full Code Here

   */

  @Test
  public void testHsController() throws Exception {
    AppContext ctx = mock(AppContext.class);
    ApplicationId appId = new ApplicationIdPBImpl();
    appId.setClusterTimestamp(System.currentTimeMillis());
    appId.setId(5);
    when(ctx.getApplicationID()).thenReturn(appId);

    AppForTest app = new AppForTest(ctx);
    Configuration config = new Configuration();
    RequestContext requestCtx = mock(RequestContext.class);
View Full Code Here

  private Job getJob() {
    Job job = mock(Job.class);

    JobId jobId = new JobIdPBImpl();

    ApplicationId appId = new ApplicationIdPBImpl();
    appId.setClusterTimestamp(System.currentTimeMillis());
    appId.setId(4);
    jobId.setAppId(appId);
    jobId.setId(1);
    when(job.getID()).thenReturn(jobId);

    JobReport report = mock(JobReport.class);
View Full Code Here

    when(job.getCompletedReduces()).thenReturn(1);
    return job;
  }

  private Task getTask() {
    ApplicationId appId = new ApplicationIdPBImpl();
    appId.setId(1);
    JobId jobId = new JobIdPBImpl();
    jobId.setId(0);
    jobId.setAppId(appId);

    TaskId taskId = new TaskIdPBImpl();
View Full Code Here

  private void writeLog(Configuration configuration, String user)
      throws Exception {
    ContainerId containerId = new ContainerIdPBImpl();
    ApplicationAttemptId appAttemptId = new ApplicationAttemptIdPBImpl();
    ApplicationId appId = new ApplicationIdPBImpl();
    appId.setId(1);
    appAttemptId.setApplicationId(appId);
    appAttemptId.setAttemptId(1);
    containerId.setApplicationAttemptId(appAttemptId);
    containerId.setId(1);
    String path = "target/logs/" + user
View Full Code Here

   * Test rendering for TasksBlock
   */
  @Test
  public void testTasksBlock() throws Exception {

    ApplicationId appId = new ApplicationIdPBImpl();
    appId.setId(1);
    JobId jobId = new JobIdPBImpl();
    jobId.setId(0);
    jobId.setAppId(appId);

    TaskId taskId = new TaskIdPBImpl();
View Full Code Here

  private ContainerStatusProto convertToProtoFormat(ContainerStatus c) {
    return ((ContainerStatusPBImpl)c).getProto();
  }
 
  private ApplicationIdPBImpl convertFromProtoFormat(ApplicationIdProto c) {
    return new ApplicationIdPBImpl(c);
  }
View Full Code Here

 
  @Test
  public void testFromYarn() throws Exception {
    int appStartTime = 612354;
    YarnApplicationState state = YarnApplicationState.RUNNING;
    ApplicationId applicationId = new ApplicationIdPBImpl();
    ApplicationReportPBImpl applicationReport = new ApplicationReportPBImpl();
    applicationReport.setApplicationId(applicationId);
    applicationReport.setYarnApplicationState(state);
    applicationReport.setStartTime(appStartTime);
    applicationReport.setUser("TestTypeConverter-user");
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.api.records.impl.pb.ApplicationIdPBImpl

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.