Java Code Examples for org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetDiagnosticsRequest

The following examples show how to use org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetDiagnosticsRequest. These examples are extracted from open source projects. 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 Project: hadoop   Source File: ClientServiceDelegate.java    License: 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 Project: big-c   Source File: ClientServiceDelegate.java    License: 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 Project: hadoop   Source File: MRClientService.java    License: 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 4
Source Project: hadoop   Source File: NotRunningJob.java    License: 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 Project: hadoop   Source File: MRClientProtocolPBServiceImpl.java    License: 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 6
Source Project: hadoop   Source File: MRClientProtocolPBClientImpl.java    License: 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 7
Source Project: hadoop   Source File: HistoryClientService.java    License: 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 8
Source Project: big-c   Source File: MRClientService.java    License: 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 9
Source Project: big-c   Source File: NotRunningJob.java    License: 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 10
Source Project: big-c   Source File: MRClientProtocolPBServiceImpl.java    License: 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 11
Source Project: big-c   Source File: MRClientProtocolPBClientImpl.java    License: 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 12
Source Project: big-c   Source File: HistoryClientService.java    License: 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 13
Source Project: incubator-tez   Source File: NotRunningJob.java    License: 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 14
Source Project: tez   Source File: NotRunningJob.java    License: 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 Project: hadoop   Source File: TestClientRedirect.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public GetDiagnosticsResponse
    getDiagnostics(GetDiagnosticsRequest request)
        throws IOException {
  return null;
}
 
Example 16
Source Project: hadoop   Source File: TestRPCFactories.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  return null;
}
 
Example 17
Source Project: big-c   Source File: TestClientRedirect.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public GetDiagnosticsResponse
    getDiagnostics(GetDiagnosticsRequest request)
        throws IOException {
  return null;
}
 
Example 18
Source Project: big-c   Source File: TestRPCFactories.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request)
    throws IOException {
  return null;
}
 
Example 19
Source Project: hadoop   Source File: MRClientProtocol.java    License: Apache License 2.0 votes vote down vote up
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request) throws IOException; 
Example 20
Source Project: big-c   Source File: MRClientProtocol.java    License: Apache License 2.0 votes vote down vote up
public GetDiagnosticsResponse getDiagnostics(GetDiagnosticsRequest request) throws IOException;