}
private LogicalOutput createOutput(OutputSpec outputSpec, OutputContext outputContext) {
LOG.info("Creating Output");
OutputDescriptor outputDesc = outputSpec.getOutputDescriptor();
Output output = ReflectionUtils.createClazzInstance(outputDesc.getClassName(),
new Class[]{OutputContext.class, Integer.TYPE},
new Object[]{outputContext, outputSpec.getPhysicalEdgeCount()});
if (!(output instanceof LogicalOutput)) {
throw new TezUncheckedException(output.getClass().getName()
+ " is not a sub-type of LogicalOutput."
+ " Only LogicalOutput sub-types supported by LogicalIOProcessor.");
}
return (LogicalOutput) output;
}