use of com.continuuity.weave.internal.yarn.VersionDetectYarnAMClientFactory in project weave by continuuity.
the class ApplicationMasterMain method main.
/**
* Starts the application master.
*/
public static void main(String[] args) throws Exception {
String zkConnect = System.getenv(EnvKeys.WEAVE_ZK_CONNECT);
File weaveSpec = new File(Constants.Files.WEAVE_SPEC);
RunId runId = RunIds.fromString(System.getenv(EnvKeys.WEAVE_RUN_ID));
ZKClientService zkClientService = ZKClientServices.delegate(ZKClients.reWatchOnExpire(ZKClients.retryOnFailure(ZKClientService.Builder.of(zkConnect).build(), RetryStrategies.fixDelay(1, TimeUnit.SECONDS))));
Configuration conf = new YarnConfiguration(new HdfsConfiguration(new Configuration()));
Service service = new ApplicationMasterService(runId, zkClientService, weaveSpec, new VersionDetectYarnAMClientFactory(conf), createAppLocation(conf));
new ApplicationMasterMain(String.format("%s/%s/kafka", zkConnect, runId.getId())).doMain(zkClientService, service);
}
Aggregations