List of usage examples for org.apache.hadoop.mapred ClientServiceDelegate ClientServiceDelegate
public ClientServiceDelegate(Configuration conf, ResourceMgrDelegate rm, JobID jobId,
MRClientProtocol historyServerProxy)
From source file:com.twitter.hraven.hadoopJobMonitor.rpc.ClientCache.java
License:Apache License
public synchronized ClientServiceDelegate getClient(JobID jobId) throws YarnException { if (hsProxy == null) { try {/*from w ww . j a v a2 s . co m*/ hsProxy = instantiateHistoryProxy(); } catch (IOException e) { LOG.warn("Could not connect to History server.", e); throw new YarnException("Could not connect to History server.", e); } } ClientServiceDelegate client = cache.get(jobId); if (client == null) { client = new ClientServiceDelegate(conf, rm, jobId, hsProxy); cache.put(jobId, client); } return client; }