use of org.apache.tez.runtime.api.Output in project tez by apache.
the class LogicalIOProcessorRuntimeTask method createOutput.
private LogicalOutput createOutput(OutputSpec outputSpec, OutputContext outputContext) throws TezException {
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;
}
Aggregations