Example usage for org.apache.hadoop.yarn.api.protocolrecords RegisterApplicationMasterRequest newInstance

List of usage examples for org.apache.hadoop.yarn.api.protocolrecords RegisterApplicationMasterRequest newInstance

Introduction

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

Prototype

@Public
@Stable
public static RegisterApplicationMasterRequest newInstance(String host, int port, String trackingUrl) 

Source Link

Document

Create a new instance of RegisterApplicationMasterRequest.

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;//from ww w . j  av  a 2  s . co  m
        if (!response.getNMTokensFromPreviousAttempts().isEmpty()) {
            populateNMTokens(response.getNMTokensFromPreviousAttempts());
        }
    }
    return response;
}