Java Code Examples for org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetJobReportResponse#setJobReport()

The following examples show how to use org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetJobReportResponse#setJobReport() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MRClientService.java    From hadoop with Apache License 2.0 6 votes vote down vote up
@Override
public GetJobReportResponse getJobReport(GetJobReportRequest request) 
  throws IOException {
  JobId jobId = request.getJobId();
  // false is for retain compatibility
  Job job = verifyAndGetJob(jobId, JobACL.VIEW_JOB, false);
  GetJobReportResponse response = 
    recordFactory.newRecordInstance(GetJobReportResponse.class);
  if (job != null) {
    response.setJobReport(job.getReport());
  }
  else {
    response.setJobReport(null);
  }
  return response;
}
 
Example 2
Source File: NotRunningJob.java    From hadoop with Apache License 2.0 6 votes vote down vote up
@Override
public GetJobReportResponse getJobReport(GetJobReportRequest request)
    throws IOException {
  JobReport jobReport =
    recordFactory.newRecordInstance(JobReport.class);
  jobReport.setJobId(request.getJobId());
  jobReport.setJobState(jobState);
  jobReport.setUser(applicationReport.getUser());
  jobReport.setStartTime(applicationReport.getStartTime());
  jobReport.setDiagnostics(applicationReport.getDiagnostics());
  jobReport.setJobName(applicationReport.getName());
  jobReport.setTrackingUrl(applicationReport.getTrackingUrl());
  jobReport.setFinishTime(applicationReport.getFinishTime());

  GetJobReportResponse resp =
      recordFactory.newRecordInstance(GetJobReportResponse.class);
  resp.setJobReport(jobReport);
  return resp;
}
 
Example 3
Source File: TestClientRedirect.java    From hadoop with Apache License 2.0 6 votes vote down vote up
@Override
public GetJobReportResponse getJobReport(GetJobReportRequest request)
    throws IOException {

  amContact = true;

  JobReport jobReport = recordFactory.newRecordInstance(JobReport.class);
  jobReport.setJobId(request.getJobId());
  jobReport.setJobState(JobState.RUNNING);
  jobReport.setJobName("TestClientRedirect-jobname");
  jobReport.setUser("TestClientRedirect-user");
  jobReport.setStartTime(0L);
  jobReport.setFinishTime(1L);

  GetJobReportResponse response = recordFactory
      .newRecordInstance(GetJobReportResponse.class);
  response.setJobReport(jobReport);
  return response;
}
 
Example 4
Source File: MRClientService.java    From big-c with Apache License 2.0 6 votes vote down vote up
@Override
public GetJobReportResponse getJobReport(GetJobReportRequest request) 
  throws IOException {
  JobId jobId = request.getJobId();
  // false is for retain compatibility
  Job job = verifyAndGetJob(jobId, JobACL.VIEW_JOB, false);
  GetJobReportResponse response = 
    recordFactory.newRecordInstance(GetJobReportResponse.class);
  if (job != null) {
    response.setJobReport(job.getReport());
  }
  else {
    response.setJobReport(null);
  }
  return response;
}
 
Example 5
Source File: NotRunningJob.java    From big-c with Apache License 2.0 6 votes vote down vote up
@Override
public GetJobReportResponse getJobReport(GetJobReportRequest request)
    throws IOException {
  JobReport jobReport =
    recordFactory.newRecordInstance(JobReport.class);
  jobReport.setJobId(request.getJobId());
  jobReport.setJobState(jobState);
  jobReport.setUser(applicationReport.getUser());
  jobReport.setStartTime(applicationReport.getStartTime());
  jobReport.setDiagnostics(applicationReport.getDiagnostics());
  jobReport.setJobName(applicationReport.getName());
  jobReport.setTrackingUrl(applicationReport.getTrackingUrl());
  jobReport.setFinishTime(applicationReport.getFinishTime());

  GetJobReportResponse resp =
      recordFactory.newRecordInstance(GetJobReportResponse.class);
  resp.setJobReport(jobReport);
  return resp;
}
 
Example 6
Source File: TestClientRedirect.java    From big-c with Apache License 2.0 6 votes vote down vote up
@Override
public GetJobReportResponse getJobReport(GetJobReportRequest request)
    throws IOException {

  amContact = true;

  JobReport jobReport = recordFactory.newRecordInstance(JobReport.class);
  jobReport.setJobId(request.getJobId());
  jobReport.setJobState(JobState.RUNNING);
  jobReport.setJobName("TestClientRedirect-jobname");
  jobReport.setUser("TestClientRedirect-user");
  jobReport.setStartTime(0L);
  jobReport.setFinishTime(1L);

  GetJobReportResponse response = recordFactory
      .newRecordInstance(GetJobReportResponse.class);
  response.setJobReport(jobReport);
  return response;
}
 
Example 7
Source File: NotRunningJob.java    From incubator-tez with Apache License 2.0 6 votes vote down vote up
@Override
public GetJobReportResponse getJobReport(GetJobReportRequest request)
    throws IOException {
  JobReport jobReport =
    recordFactory.newRecordInstance(JobReport.class);
  jobReport.setJobId(request.getJobId());
  jobReport.setJobState(jobState);
  jobReport.setUser(applicationReport.getUser());
  jobReport.setStartTime(applicationReport.getStartTime());
  jobReport.setDiagnostics(applicationReport.getDiagnostics());
  jobReport.setJobName(applicationReport.getName());
  jobReport.setTrackingUrl(applicationReport.getTrackingUrl());
  jobReport.setFinishTime(applicationReport.getFinishTime());

  GetJobReportResponse resp =
      recordFactory.newRecordInstance(GetJobReportResponse.class);
  resp.setJobReport(jobReport);
  return resp;
}
 
Example 8
Source File: NotRunningJob.java    From tez with Apache License 2.0 6 votes vote down vote up
@Override
public GetJobReportResponse getJobReport(GetJobReportRequest request)
    throws IOException {
  JobReport jobReport =
    recordFactory.newRecordInstance(JobReport.class);
  jobReport.setJobId(request.getJobId());
  jobReport.setJobState(jobState);
  jobReport.setUser(applicationReport.getUser());
  jobReport.setStartTime(applicationReport.getStartTime());
  jobReport.setDiagnostics(applicationReport.getDiagnostics());
  jobReport.setJobName(applicationReport.getName());
  jobReport.setTrackingUrl(applicationReport.getTrackingUrl());
  jobReport.setFinishTime(applicationReport.getFinishTime());

  GetJobReportResponse resp =
      recordFactory.newRecordInstance(GetJobReportResponse.class);
  resp.setJobReport(jobReport);
  return resp;
}
 
Example 9
Source File: TestClientServiceDelegate.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private GetJobReportResponse getJobReportResponse() {
  GetJobReportResponse jobReportResponse = Records
      .newRecord(GetJobReportResponse.class);
  JobReport jobReport = Records.newRecord(JobReport.class);
  jobReport.setJobId(jobId);
  jobReport.setJobState(JobState.SUCCEEDED);
  jobReportResponse.setJobReport(jobReport);
  return jobReportResponse;
}
 
Example 10
Source File: TestClientServiceDelegate.java    From hadoop with Apache License 2.0 5 votes vote down vote up
private GetJobReportResponse getJobReportResponseFromHistoryServer() {
  GetJobReportResponse jobReportResponse = Records                                              
      .newRecord(GetJobReportResponse.class);                                                   
  JobReport jobReport = Records.newRecord(JobReport.class);                                     
  jobReport.setJobId(jobId);                                                                    
  jobReport.setJobState(JobState.SUCCEEDED);                                                    
  jobReport.setMapProgress(1.0f);
  jobReport.setReduceProgress(1.0f);
  jobReport.setJobFile("TestJobFilePath");
  jobReport.setTrackingUrl("http://TestTrackingUrl");
  jobReportResponse.setJobReport(jobReport);
  return jobReportResponse;
}
 
Example 11
Source File: HistoryClientService.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetJobReportResponse getJobReport(GetJobReportRequest request)
    throws IOException {
  JobId jobId = request.getJobId();
  Job job = verifyAndGetJob(jobId, false);
  GetJobReportResponse response = recordFactory.newRecordInstance(GetJobReportResponse.class);
  if (job != null) {
    response.setJobReport(job.getReport());
  }
  else {
    response.setJobReport(null);
  }
  return response;
}
 
Example 12
Source File: TestClientServiceDelegate.java    From big-c with Apache License 2.0 5 votes vote down vote up
private GetJobReportResponse getJobReportResponse() {
  GetJobReportResponse jobReportResponse = Records
      .newRecord(GetJobReportResponse.class);
  JobReport jobReport = Records.newRecord(JobReport.class);
  jobReport.setJobId(jobId);
  jobReport.setJobState(JobState.SUCCEEDED);
  jobReportResponse.setJobReport(jobReport);
  return jobReportResponse;
}
 
Example 13
Source File: TestClientServiceDelegate.java    From big-c with Apache License 2.0 5 votes vote down vote up
private GetJobReportResponse getJobReportResponseFromHistoryServer() {
  GetJobReportResponse jobReportResponse = Records                                              
      .newRecord(GetJobReportResponse.class);                                                   
  JobReport jobReport = Records.newRecord(JobReport.class);                                     
  jobReport.setJobId(jobId);                                                                    
  jobReport.setJobState(JobState.SUCCEEDED);                                                    
  jobReport.setMapProgress(1.0f);
  jobReport.setReduceProgress(1.0f);
  jobReport.setJobFile("TestJobFilePath");
  jobReport.setTrackingUrl("http://TestTrackingUrl");
  jobReportResponse.setJobReport(jobReport);
  return jobReportResponse;
}
 
Example 14
Source File: HistoryClientService.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public GetJobReportResponse getJobReport(GetJobReportRequest request)
    throws IOException {
  JobId jobId = request.getJobId();
  Job job = verifyAndGetJob(jobId, false);
  GetJobReportResponse response = recordFactory.newRecordInstance(GetJobReportResponse.class);
  if (job != null) {
    response.setJobReport(job.getReport());
  }
  else {
    response.setJobReport(null);
  }
  return response;
}