Search in sources :

Example 1 with OutputFormatVertex

use of org.apache.flink.runtime.jobgraph.OutputFormatVertex in project flink by apache.

the class JobGraphGenerator method createDataSinkVertex.

private JobVertex createDataSinkVertex(SinkPlanNode node) throws CompilerException {
    final OutputFormatVertex vertex = new OutputFormatVertex(node.getNodeName());
    final TaskConfig config = new TaskConfig(vertex.getConfiguration());
    vertex.setResources(node.getMinResources(), node.getPreferredResources());
    vertex.setInvokableClass(DataSinkTask.class);
    vertex.setFormatDescription(getDescriptionForUserCode(node.getProgramOperator().getUserCodeWrapper()));
    // set user code
    config.setStubWrapper(node.getProgramOperator().getUserCodeWrapper());
    config.setStubParameters(node.getProgramOperator().getParameters());
    return vertex;
}
Also used : OutputFormatVertex(org.apache.flink.runtime.jobgraph.OutputFormatVertex) TaskConfig(org.apache.flink.runtime.operators.util.TaskConfig)

Aggregations

OutputFormatVertex (org.apache.flink.runtime.jobgraph.OutputFormatVertex)1 TaskConfig (org.apache.flink.runtime.operators.util.TaskConfig)1