// 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
MapReduceSpecification spec = program.getSpecification().getMapReduce().get(program.getName());
BasicMapReduceContext context =
new BasicMapReduceContext(program, type, RunIds.fromString(runId),