YARN-7488. Make ServiceClient.getAppId method public to return ApplicationId for a service name. Contributed by Gour Saha

This commit is contained in:
Jian He 2017-11-13 18:55:12 -08:00
parent 8b12574165
commit 4f40cd314a

View File

@ -943,7 +943,7 @@ protected ClientAMProtocol createAMProxy(String host, int port)
UserGroupInformation.getCurrentUser(), rpc, address); UserGroupInformation.getCurrentUser(), rpc, address);
} }
private synchronized ApplicationId getAppId(String serviceName) public synchronized ApplicationId getAppId(String serviceName)
throws IOException, YarnException { throws IOException, YarnException {
if (cachedAppIds.containsKey(serviceName)) { if (cachedAppIds.containsKey(serviceName)) {
return cachedAppIds.get(serviceName); return cachedAppIds.get(serviceName);