super(name, cConfName, hConfName);
}
@Override
protected void doInit(TwillContext context) {
CConfiguration cConf = getCConfiguration();
Configuration hConf = getConfiguration();
// NOTE: twill client will try to load all the classes present here - including hive classes but it
// will fail since Hive classes are not in master classpath, and ignore those classes silently
injector = Guice.createInjector(
new ConfigModule(cConf, hConf),
new IOModule(), new ZKClientModule(),
new KafkaClientModule(),
new MetricsClientRuntimeModule().getDistributedModules(),
new DiscoveryRuntimeModule().getDistributedModules(),
new LocationRuntimeModule().getDistributedModules(),
new DataFabricModules().getDistributedModules(),
new DataSetsModules().getDistributedModule(),
new LoggingModules().getDistributedModules(),
new ExploreRuntimeModule().getDistributedModules(),
new AuthModule());
injector.getInstance(LogAppenderInitializer.class).initialize();
LoggingContextAccessor.setLoggingContext(new ServiceLoggingContext(Constants.Logging.SYSTEM_NAME,
Constants.Logging.COMPONENT_NAME,
Constants.Service.EXPLORE_HTTP_USER_SERVICE));
LOG.info("Initializing runnable {}", name);
// Set the host name to the one provided by Twill
cConf.set(Constants.Explore.SERVER_ADDRESS, context.getHost().getHostName());
}