org.apache.flink.runtime.operators.DataSinkTask Java Examples
The following examples show how to use
org.apache.flink.runtime.operators.DataSinkTask.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JobGraphGenerator.java From flink with Apache License 2.0 | 6 votes |
private JobVertex createDataSinkVertex(SinkPlanNode node) throws CompilerException { final InputOutputFormatVertex vertex = new InputOutputFormatVertex(node.getNodeName()); final TaskConfig config = new TaskConfig(vertex.getConfiguration()); final OperatorID operatorID = new OperatorID(); vertex.setResources(node.getMinResources(), node.getPreferredResources()); vertex.setInvokableClass(DataSinkTask.class); vertex.setFormatDescription(operatorID, getDescriptionForUserCode(node.getProgramOperator().getUserCodeWrapper())); // set user code new InputOutputFormatContainer(Thread.currentThread().getContextClassLoader()) .addOutputFormat(operatorID, (UserCodeWrapper<? extends OutputFormat<?>>) node.getProgramOperator().getUserCodeWrapper()) .addParameters(operatorID, node.getProgramOperator().getParameters()) .write(config); return vertex; }
Example #2
Source File: JobGraphGenerator.java From flink with Apache License 2.0 | 6 votes |
private JobVertex createDataSinkVertex(SinkPlanNode node) throws CompilerException { final InputOutputFormatVertex vertex = new InputOutputFormatVertex(node.getNodeName()); final TaskConfig config = new TaskConfig(vertex.getConfiguration()); final OperatorID operatorID = new OperatorID(); vertex.setResources(node.getMinResources(), node.getPreferredResources()); vertex.setInvokableClass(DataSinkTask.class); vertex.setFormatDescription(operatorID, getDescriptionForUserCode(node.getProgramOperator().getUserCodeWrapper())); // set user code new InputOutputFormatContainer(Thread.currentThread().getContextClassLoader()) .addOutputFormat(operatorID, (UserCodeWrapper<? extends OutputFormat<?>>) node.getProgramOperator().getUserCodeWrapper()) .addParameters(operatorID, node.getProgramOperator().getParameters()) .write(config); return vertex; }
Example #3
Source File: JobGraphGenerator.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
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; }