try {
if (mapWork.getVectorMode()) {
mapOp = new VectorMapOperator();
} else {
mapOp = new MapOperator();
}
connectOps.clear();
if (mergeWorkList != null) {
MapOperator mergeMapOp = null;
for (MapWork mergeMapWork : mergeWorkList) {
if (mergeMapWork.getVectorMode()) {
mergeMapOp = new VectorMapOperator();
} else {
mergeMapOp = new MapOperator();
}
mergeMapOpList.add(mergeMapOp);
// initialize the merge operators first.
if (mergeMapOp != null) {
mergeMapOp.setConf(mergeMapWork);
l4j.info("Input name is " + mergeMapWork.getName());
jconf.set(Utilities.INPUT_NAME, mergeMapWork.getName());
mergeMapOp.setChildren(jconf);
if (foundCachedMergeWork == false) {
DummyStoreOperator dummyOp = getJoinParentOp(mergeMapOp);
connectOps.put(mergeMapWork.getTag(), dummyOp);
}
mergeMapOp.setExecContext(new ExecMapperContext(jconf));
mergeMapOp.initializeLocalWork(jconf);
}
}
}
// initialize map operator
mapOp.setConf(mapWork);
l4j.info("Main input name is " + mapWork.getName());
jconf.set(Utilities.INPUT_NAME, mapWork.getName());
mapOp.setChildren(jconf);
l4j.info(mapOp.dump(0));
MapredContext.init(true, new JobConf(jconf));
((TezContext) MapredContext.get()).setInputs(inputs);
((TezContext) MapredContext.get()).setTezProcessorContext(processorContext);
mapOp.setExecContext(execContext);
mapOp.initializeLocalWork(jconf);
initializeMapRecordSources();
mapOp.initialize(jconf, null);
if ((mergeMapOpList != null) && mergeMapOpList.isEmpty() == false) {
for (MapOperator mergeMapOp : mergeMapOpList) {
jconf.set(Utilities.INPUT_NAME, mergeMapOp.getConf().getName());
mergeMapOp.initialize(jconf, null);
}
}
// Initialization isn't finished until all parents of all operators
// are initialized. For broadcast joins that means initializing the