Example usage for org.apache.hadoop.yarn.api.protocolrecords RegisterApplicationMasterResponse getNMTokensFromPreviousAttempts

List of usage examples for org.apache.hadoop.yarn.api.protocolrecords RegisterApplicationMasterResponse getNMTokensFromPreviousAttempts

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.api.protocolrecords RegisterApplicationMasterResponse getNMTokensFromPreviousAttempts.

Prototype

@Public
@Stable
public abstract List<NMToken> getNMTokensFromPreviousAttempts();

Source Link

Document

Get the list of NMTokens for communicating with the NMs where the containers of previous application attempts are running.

Usage

From source file:disAMS.AMRMClient.Impl.AMRMClientImpl.java

License:Apache License

private RegisterApplicationMasterResponse registerApplicationMaster() throws YarnException, IOException {
    RegisterApplicationMasterRequest request = RegisterApplicationMasterRequest.newInstance(this.appHostName,
            this.appHostPort, this.appTrackingUrl);
    RegisterApplicationMasterResponse response = rmClient.registerApplicationMaster(request);
    synchronized (this) {
        lastResponseId = 0;// w w w  . ja  v  a  2s  .c  o m
        if (!response.getNMTokensFromPreviousAttempts().isEmpty()) {
            populateNMTokens(response.getNMTokensFromPreviousAttempts());
        }
    }
    return response;
}