public TezTaskRunner2(Configuration tezConf, UserGroupInformation ugi, String[] localDirs,
TaskSpec taskSpec, int appAttemptNumber,
Map<String, ByteBuffer> serviceConsumerMetadata,
Map<String, String> serviceProviderEnvMap,
Multimap<String, String> startedInputsMap,
TaskReporterInterface taskReporter, ExecutorService executor,
ObjectRegistry objectRegistry, String pid,
ExecutionContext executionContext, long memAvailable,
boolean updateSysCounters, HadoopShim hadoopShim,
TezExecutors sharedExecutor) throws
IOException {
this.ugi = ugi;
this.taskReporter = taskReporter;
this.executor = executor;
this.umbilicalAndErrorHandler = new UmbilicalAndErrorHandler();
this.hadoopShim = hadoopShim;
this.taskConf = new Configuration(tezConf);
if (taskSpec.getTaskConf() != null) {
Iterator<Entry<String, String>> iter = taskSpec.getTaskConf().iterator();
while (iter.hasNext()) {
Entry<String, String> entry = iter.next();
taskConf.set(entry.getKey(), entry.getValue());
}
}
localExecutor = sharedExecutor == null ? new TezSharedExecutor(tezConf) : null;
this.task = new LogicalIOProcessorRuntimeTask(taskSpec, appAttemptNumber, taskConf, localDirs,
umbilicalAndErrorHandler, serviceConsumerMetadata, serviceProviderEnvMap, startedInputsMap,
objectRegistry, pid, executionContext, memAvailable, updateSysCounters, hadoopShim,
sharedExecutor == null ? localExecutor : sharedExecutor);
}