@Override public void initialize() throws IOException { perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.TEZ_INITIALIZE_PROCESSOR); Configuration conf = TezUtils.createConfFromUserPayload(getContext().getUserPayload()); this.jobConf = new JobConf(conf); this.processorContext = getContext(); ExecutionContext execCtx = processorContext.getExecutionContext(); if (execCtx instanceof Hook) { ((Hook)execCtx).initializeHook(this); } setupMRLegacyConfigs(processorContext); perfLogger.PerfLogEnd(CLASS_NAME, PerfLogger.TEZ_INITIALIZE_PROCESSOR); }
LOG.debug("Running task: " + getContext().getUniqueIdentifier()); progressHelper = new ReflectiveProgressHelper(jobConf, inputs, getContext(), this.getClass().getSimpleName()); rproc = new MapRecordProcessor(jobConf, getContext()); } else { rproc = new ReduceRecordProcessor(jobConf, getContext()); initializeAndRunProcessor(inputs, outputs);
try { MRTaskReporter mrReporter = new MRTaskReporter(getContext()); Throwables.getRootCause(originalThrowable) instanceof Error)) { LOG.error("Cannot recover from this FATAL error", StringUtils.stringifyException(originalThrowable)); getContext().reportFailure(TaskFailureType.FATAL, originalThrowable, "Cannot recover from this error"); throw new RuntimeException(originalThrowable);
try { MRTaskReporter mrReporter = new MRTaskReporter(getContext());
@Override public void initialize() throws IOException { perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.TEZ_INITIALIZE_PROCESSOR); Configuration conf = TezUtils.createConfFromUserPayload(getContext().getUserPayload()); this.jobConf = new JobConf(conf); this.processorContext = getContext(); ExecutionContext execCtx = processorContext.getExecutionContext(); if (execCtx instanceof Hook) { ((Hook)execCtx).initializeHook(this); } setupMRLegacyConfigs(processorContext); perfLogger.PerfLogEnd(CLASS_NAME, PerfLogger.TEZ_INITIALIZE_PROCESSOR); }
LOG.debug("Running task: " + getContext().getUniqueIdentifier()); rproc = new MapRecordProcessor(jobConf, getContext()); } else { rproc = new ReduceRecordProcessor(jobConf, getContext()); initializeAndRunProcessor(inputs, outputs);
try { MRTaskReporter mrReporter = new MRTaskReporter(getContext()); rproc.init(mrReporter, inputs, outputs); rproc.run();
@Override public void initialize() throws IOException { perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.TEZ_INITIALIZE_PROCESSOR); Configuration conf = TezUtils.createConfFromUserPayload(getContext().getUserPayload()); this.jobConf = new JobConf(conf); this.processorContext = getContext(); setupMRLegacyConfigs(processorContext); perfLogger.PerfLogEnd(CLASS_NAME, PerfLogger.TEZ_INITIALIZE_PROCESSOR); }
@Override public void run(Map<String, LogicalInput> inputs, Map<String, LogicalOutput> outputs) throws Exception { perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.TEZ_RUN_PROCESSOR); // in case of broadcast-join read the broadcast edge inputs // (possibly asynchronously) LOG.info("Running task: " + getContext().getUniqueIdentifier()); if (isMap) { rproc = new MapRecordProcessor(jobConf, getContext()); } else { rproc = new ReduceRecordProcessor(jobConf, getContext()); } initializeAndRunProcessor(inputs, outputs); }