@Override
 protected void serviceStop() throws Exception {
   if (this.rmClient != null) {
     RPC.stopProxy(this.rmClient);
   }
   super.serviceStop();
 }
 @Override
 protected void serviceStart() throws Exception {
   final YarnConfiguration conf = new YarnConfiguration(getConfig());
   try {
     rmClient = ClientRMProxy.createRMProxy(conf, ApplicationMasterProtocol.class);
   } catch (IOException e) {
     throw new YarnRuntimeException(e);
   }
   super.serviceStart();
 }
 @Override
 protected void serviceInit(Configuration conf) throws Exception {
   RackResolver.init(conf);
   super.serviceInit(conf);
 }