CConfiguration configuration = injector.getInstance(CConfiguration.class);
ApplicationSpecification programSpec = program.getSpecification();
// if this is not for a mapper or a reducer, we don't need the metrics collection service
MetricsCollectionService metricsCollectionService =
(type == null) ? null : injector.getInstance(MetricsCollectionService.class);
DiscoveryServiceClient discoveryServiceClient = injector.getInstance(DiscoveryServiceClient.class);
// Creating mapreduce job context