Search in sources :

Example 1 with Output

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;
}
Also used : TezUncheckedException(org.apache.tez.dag.api.TezUncheckedException) OutputDescriptor(org.apache.tez.dag.api.OutputDescriptor) LogicalOutput(org.apache.tez.runtime.api.LogicalOutput) LogicalOutput(org.apache.tez.runtime.api.LogicalOutput) Output(org.apache.tez.runtime.api.Output)

Aggregations

OutputDescriptor (org.apache.tez.dag.api.OutputDescriptor)1 TezUncheckedException (org.apache.tez.dag.api.TezUncheckedException)1 LogicalOutput (org.apache.tez.runtime.api.LogicalOutput)1 Output (org.apache.tez.runtime.api.Output)1