private AbstractLogicalIOProcessor createProcessor(
String processorClassName, ProcessorContext processorContext) throws TezException {
Processor processor = ReflectionUtils.createClazzInstance(processorClassName,
new Class[]{ProcessorContext.class}, new Object[]{processorContext});
if (!(processor instanceof AbstractLogicalIOProcessor)) {
throw new TezUncheckedException(processor.getClass().getName()
+ " is not a sub-type of AbstractLogicalIOProcessor."
+ " Only AbstractLogicalIOProcessor sub-types supported by LogicalIOProcessorRuntimeTask.");
}
return (AbstractLogicalIOProcessor) processor;
}