List of usage examples for org.apache.hadoop.yarn.api.protocolrecords RegisterApplicationMasterRequest newInstance
@Public @Stable public static RegisterApplicationMasterRequest newInstance(String host, int port, String trackingUrl)
RegisterApplicationMasterRequest. 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; }