Preconditions.checkArgument(masterContainerId != null,
"Missing %s from environment", ApplicationConstants.AM_CONTAINER_ID_ENV);
this.containerId = ConverterUtils.toContainerId(masterContainerId);
this.containerRequests = ArrayListMultimap.create();
this.amrmClient = new AMRMClientImpl(containerId.getApplicationAttemptId());
this.amrmClient.init(conf);
this.nmClient = new Hadoop20YarnNMClient(YarnRPC.create(conf), conf);
}