use of org.apache.flink.table.runtime.operators.sink.SinkOperator in project flink by apache.
the class CommonExecSink method createSinkFunctionTransformation.
private Transformation<?> createSinkFunctionTransformation(SinkFunction<RowData> sinkFunction, StreamExecutionEnvironment env, Transformation<RowData> inputTransformation, int rowtimeFieldIndex, TransformationMetadata transformationMetadata, int sinkParallelism) {
final SinkOperator operator = new SinkOperator(env.clean(sinkFunction), rowtimeFieldIndex);
if (sinkFunction instanceof InputTypeConfigurable) {
((InputTypeConfigurable) sinkFunction).setInputType(getInputTypeInfo(), env.getConfig());
}
final Transformation<?> transformation = new LegacySinkTransformation<>(inputTransformation, transformationMetadata.getName(), SimpleOperatorFactory.of(operator), sinkParallelism);
transformationMetadata.fill(transformation);
return transformation;
}
Aggregations