Search in sources :

Example 1 with FailApplicationAttemptRequest

use of org.apache.hadoop.yarn.api.protocolrecords.FailApplicationAttemptRequest in project hadoop by apache.

the class MockRM method failApplicationAttempt.

public FailApplicationAttemptResponse failApplicationAttempt(ApplicationAttemptId attemptId) throws Exception {
    ApplicationClientProtocol client = getClientRMService();
    FailApplicationAttemptRequest req = FailApplicationAttemptRequest.newInstance(attemptId);
    FailApplicationAttemptResponse response = client.failApplicationAttempt(req);
    drainEventsImplicitly();
    return response;
}
Also used : FailApplicationAttemptResponse(org.apache.hadoop.yarn.api.protocolrecords.FailApplicationAttemptResponse) FailApplicationAttemptRequest(org.apache.hadoop.yarn.api.protocolrecords.FailApplicationAttemptRequest) ApplicationClientProtocol(org.apache.hadoop.yarn.api.ApplicationClientProtocol)

Example 2 with FailApplicationAttemptRequest

use of org.apache.hadoop.yarn.api.protocolrecords.FailApplicationAttemptRequest in project hadoop by apache.

the class YarnClientImpl method failApplicationAttempt.

@Override
public void failApplicationAttempt(ApplicationAttemptId attemptId) throws YarnException, IOException {
    LOG.info("Failing application attempt " + attemptId);
    FailApplicationAttemptRequest request = Records.newRecord(FailApplicationAttemptRequest.class);
    request.setApplicationAttemptId(attemptId);
    rmClient.failApplicationAttempt(request);
}
Also used : FailApplicationAttemptRequest(org.apache.hadoop.yarn.api.protocolrecords.FailApplicationAttemptRequest)

Aggregations

FailApplicationAttemptRequest (org.apache.hadoop.yarn.api.protocolrecords.FailApplicationAttemptRequest)2 ApplicationClientProtocol (org.apache.hadoop.yarn.api.ApplicationClientProtocol)1 FailApplicationAttemptResponse (org.apache.hadoop.yarn.api.protocolrecords.FailApplicationAttemptResponse)1