Java Code Examples for org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetDiagnosticsRequest#setTaskAttemptId()
The following examples show how to use
org.apache.hadoop.mapreduce.v2.api.protocolrecords.GetDiagnosticsRequest#setTaskAttemptId() .
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 |
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 |
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; }