@SuppressWarnings("unchecked") private RegisterApplicationMasterResponse registerApplicationMaster() throws YarnException, IOException { RegisterApplicationMasterRequest request = RegisterApplicationMasterRequest.newInstance(this.appHostName, this.appHostPort, this.appTrackingUrl); if (!this.placementConstraints.isEmpty()) { request.setPlacementConstraints(this.placementConstraints); } RegisterApplicationMasterResponse response = rmClient.registerApplicationMaster(request); synchronized (this) { lastResponseId = 0; if (!response.getNMTokensFromPreviousAttempts().isEmpty()) { populateNMTokens(response.getNMTokensFromPreviousAttempts()); } this.resourceProfilesMap = response.getResourceProfiles(); List<Container> prevContainers = response.getContainersFromPreviousAttempts(); AMRMClientUtils.removeFromOutstandingSchedulingRequests(prevContainers, this.outstandingSchedRequests); } return response; }
req.setTrackingUrl(""); if (!placementConstraints.isEmpty()) { req.setPlacementConstraints(this.placementConstraints);