Class StreamOperatorFactoryUtil


  • public class StreamOperatorFactoryUtil
    extends Object
    A utility to instantiate new operators with a given factory.
    • Constructor Detail

      • StreamOperatorFactoryUtil

        public StreamOperatorFactoryUtil()
    • Method Detail

      • createOperator

        public static <OUT,​OP extends StreamOperator<OUT>> Tuple2<OP,​Optional<ProcessingTimeService>> createOperator​(StreamOperatorFactory<OUT> operatorFactory,
                                                                                                                                 StreamTask<OUT,​?> containingTask,
                                                                                                                                 StreamConfig configuration,
                                                                                                                                 Output<StreamRecord<OUT>> output,
                                                                                                                                 OperatorEventDispatcher operatorEventDispatcher)
        Creates a new operator using a factory and makes sure that all special factory traits are properly handled.
        Parameters:
        operatorFactory - the operator factory.
        containingTask - the containing task.
        configuration - the configuration of the operator.
        output - the output of the operator.
        operatorEventDispatcher - the operator event dispatcher for communication between operator and coordinators.
        Returns:
        a newly created and configured operator, and the ProcessingTimeService instance it can access.