org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetDiagnosticsResponse Java Examples

The following examples show how to use org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetDiagnosticsResponse. 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: ClientServiceDelegate.java    From hadoop with Apache License 2.0 6 votes vote down vote up
public String[] getTaskDiagnostics(org.apache.hadoop.mapreduce.TaskAttemptID arg0)
    throws IOException, InterruptedException {

  org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID = TypeConverter
      .toYarn(arg0);
  GetDiagnosticsRequest request = recordFactory
      .newRecordInstance(GetDiagnosticsRequest.class);
  request.setTaskAttemptId(attemptID);
  List<String> list = ((GetDiagnosticsResponse) invoke("getDiagnostics",
      GetDiagnosticsRequest.class, request)).getDiagnosticsList();
  String[] result = new String[list.size()];
  int i = 0;
  for (String c : list) {
    result[i++] = c.toString();
  }
  return result;
}
 
Example #2
Source File: ClientServiceDelegate.java    From big-c with Apache License 2.0 6 votes vote down vote up
public String[] getTaskDiagnostics(org.apache.hadoop.mapreduce.TaskAttemptID arg0)
    throws IOException, InterruptedException {

  org.apache.hadoop.mapreduce.v2.api.records.TaskAttemptId attemptID = TypeConverter
      .toYarn(arg0);
  GetDiagnosticsRequest request = recordFactory
      .newRecordInstance(GetDiagnosticsRequest.class);
  request.setTaskAttemptId(attemptID);
  List<String> list = ((GetDiagnosticsResponse) invoke("getDiagnostics",
      GetDiagnosticsRequest.class, request)).getDiagnosticsList();
  String[] result = new String[list.size()];
  int i = 0;
  for (String c : list) {
    result[i++] = c.toString();
  }
  return result;
}
 
Example #3
Source File: NotRunningJob.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  GetDiagnosticsResponse resp =
    recordFactory.newRecordInstance(GetDiagnosticsResponse.class);
  resp.addDiagnostics("");
  return resp;
}
 
Example #4
Source File: NotRunningJob.java    From tez with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  GetDiagnosticsResponse resp =
    recordFactory.newRecordInstance(GetDiagnosticsResponse.class);
  resp.addDiagnostics("");
  return resp;
}
 
Example #5
Source File: NotRunningJob.java    From incubator-tez with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  GetDiagnosticsResponse resp =
    recordFactory.newRecordInstance(GetDiagnosticsResponse.class);
  resp.addDiagnostics("");
  return resp;
}
 
Example #6
Source File: HistoryClientService.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  TaskAttemptId taskAttemptId = request.getTaskAttemptId();

  Job job = verifyAndGetJob(taskAttemptId.getTaskId().getJobId(), true);

  GetDiagnosticsResponse response = recordFactory.newRecordInstance(GetDiagnosticsResponse.class);
  response.addAllDiagnostics(job.getTask(taskAttemptId.getTaskId()).getAttempt(taskAttemptId).getDiagnostics());
  return response;
}
 
Example #7
Source File: MRClientProtocolPBClientImpl.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  GetDiagnosticsRequestProto requestProto = ((GetDiagnosticsRequestPBImpl)request).getProto();
  try {
    return new GetDiagnosticsResponsePBImpl(proxy.getDiagnostics(null, requestProto));
  } catch (ServiceException e) {
    throw unwrapAndThrowException(e);
  }
}
 
Example #8
Source File: MRClientProtocolPBServiceImpl.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponseProto getDiagnostics(RpcController controller,
    GetDiagnosticsRequestProto proto) throws ServiceException {
  GetDiagnosticsRequest request = new GetDiagnosticsRequestPBImpl(proto);
  try {
    GetDiagnosticsResponse response = real.getDiagnostics(request);
    return ((GetDiagnosticsResponsePBImpl)response).getProto();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
 
Example #9
Source File: MRClientService.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(
    GetDiagnosticsRequest request) throws IOException {
  TaskAttemptId taskAttemptId = request.getTaskAttemptId();
  
  GetDiagnosticsResponse response = 
    recordFactory.newRecordInstance(GetDiagnosticsResponse.class);
  response.addAllDiagnostics(verifyAndGetAttempt(taskAttemptId,
      JobACL.VIEW_JOB).getDiagnostics());
  return response;
}
 
Example #10
Source File: MRClientService.java    From big-c with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(
    GetDiagnosticsRequest request) throws IOException {
  TaskAttemptId taskAttemptId = request.getTaskAttemptId();
  
  GetDiagnosticsResponse response = 
    recordFactory.newRecordInstance(GetDiagnosticsResponse.class);
  response.addAllDiagnostics(verifyAndGetAttempt(taskAttemptId,
      JobACL.VIEW_JOB).getDiagnostics());
  return response;
}
 
Example #11
Source File: HistoryClientService.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  TaskAttemptId taskAttemptId = request.getTaskAttemptId();

  Job job = verifyAndGetJob(taskAttemptId.getTaskId().getJobId(), true);

  GetDiagnosticsResponse response = recordFactory.newRecordInstance(GetDiagnosticsResponse.class);
  response.addAllDiagnostics(job.getTask(taskAttemptId.getTaskId()).getAttempt(taskAttemptId).getDiagnostics());
  return response;
}
 
Example #12
Source File: MRClientProtocolPBClientImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  GetDiagnosticsRequestProto requestProto = ((GetDiagnosticsRequestPBImpl)request).getProto();
  try {
    return new GetDiagnosticsResponsePBImpl(proxy.getDiagnostics(null, requestProto));
  } catch (ServiceException e) {
    throw unwrapAndThrowException(e);
  }
}
 
Example #13
Source File: MRClientProtocolPBServiceImpl.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponseProto getDiagnostics(RpcController controller,
    GetDiagnosticsRequestProto proto) throws ServiceException {
  GetDiagnosticsRequest request = new GetDiagnosticsRequestPBImpl(proto);
  try {
    GetDiagnosticsResponse response = real.getDiagnostics(request);
    return ((GetDiagnosticsResponsePBImpl)response).getProto();
  } catch (IOException e) {
    throw new ServiceException(e);
  }
}
 
Example #14
Source File: NotRunningJob.java    From hadoop with Apache License 2.0 5 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  GetDiagnosticsResponse resp =
    recordFactory.newRecordInstance(GetDiagnosticsResponse.class);
  resp.addDiagnostics("");
  return resp;
}
 
Example #15
Source File: TestRPCFactories.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  return null;
}
 
Example #16
Source File: TestClientRedirect.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public GetDiagnosticsResponse
    getDiagnostics(GetDiagnosticsRequest request)
        throws IOException {
  return null;
}
 
Example #17
Source File: TestRPCFactories.java    From big-c with Apache License 2.0 4 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  return null;
}
 
Example #18
Source File: TestClientRedirect.java    From hadoop with Apache License 2.0 4 votes vote down vote up
@Override
public GetDiagnosticsResponse
    getDiagnostics(GetDiagnosticsRequest request)
        throws IOException {
  return null;
}
 
Example #19
Source File: MRClientProtocol.java    From big-c with Apache License 2.0 votes vote down vote up
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request) throws IOException; 
Example #20
Source File: MRClientProtocol.java    From hadoop with Apache License 2.0 votes vote down vote up
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request) throws IOException;