use of io.cdap.cdap.internal.app.runtime.batch.MapReduceContextConfig in project cdap by caskdata.
the class DistributedMapReduceTaskContextProvider method createInjector.
private static Injector createInjector(CConfiguration cConf, Configuration hConf) {
MapReduceContextConfig mapReduceContextConfig = new MapReduceContextConfig(hConf);
// principal will be null if running on a kerberos distributed cluster
ProgramOptions programOptions = mapReduceContextConfig.getProgramOptions();
Arguments systemArgs = programOptions.getArguments();
String runId = systemArgs.getOption(ProgramOptionConstants.RUN_ID);
return Guice.createInjector(new DistributedProgramContainerModule(cConf, hConf, mapReduceContextConfig.getProgramId().run(runId), programOptions));
}
Aggregations