Class AbstractLogicalOperator

    • Method Detail

      • getInputPorts

        public final Namespace<LogicalPort> getInputPorts()
        Description copied from interface: LogicalOperator
        Returns the list of input ports. This method is generally used by framework code; operator consumers should generally use the methods getInput(), etc to obtain a handle to input ports.
        Specified by:
        getInputPorts in interface LogicalOperator
        Returns:
        the list of input ports
      • getOutputPorts

        public final Namespace<LogicalPort> getOutputPorts()
        Description copied from interface: LogicalOperator
        Returns the list of output ports. This method is generally used by framework code; operator consumers should generally use the methods getOutput(), etc to obtain a handle to input ports.
        Specified by:
        getOutputPorts in interface LogicalOperator
        Returns:
        the list of output ports
      • disableParallelism

        public final void disableParallelism()
        Description copied from interface: LogicalOperator
        Can be called to forcible disable parallelism for the given operator (and children if this is a CompositeOperator). This method should be used sparingly since it will degrade performance significantly; but is needed in certain cases. For example:
        1. If there is a RunScript operator that contains a non-parallelizable script
        2. If there is a DeriveFields operator that contains a non-parallelizable function
        Specified by:
        disableParallelism in interface LogicalOperator
      • notifyError

        protected void notifyError​(Throwable e)
        Called to notify the operator that the graph terminated abnormally either before the operator had a chance to run or while the operator is running. If this is a CompositeOperator, this method will be invoked if any of the components
        Parameters:
        e - the error that occured
      • newRecordInput

        protected final RecordPort newRecordInput​(String name)
        Creates a new record input port. The result should be assigned to a private final variable and exposed through a public getter.
        Parameters:
        name - the name of the port, must be unique within the operator.
        Returns:
        a new record input port.
        See Also:
        LogicalOperator
      • newRecordInput

        protected final RecordPort newRecordInput​(String name,
                                                  boolean optional)
        Creates a new record input port. The result should be assigned to a private final variable and exposed through a public getter.
        Parameters:
        name - the name of the port, must be unique within the operator.
        optional - whether the port is optional.
        Returns:
        a new record input port.
        See Also:
        LogicalOperator
      • newInput

        protected final <T extends LogicalPort> T newInput​(String name,
                                                           LogicalPortFactory<T> factory)
        Creates a new input port. The result should be assigned to a private final variable and exposed through a public getter.
        Type Parameters:
        T - the type of the port
        Parameters:
        name - the name of the port, must be unique within the operator.
        factory - the factory, determines the type of the port
        Returns:
        a new input port.
        See Also:
        LogicalOperator
      • newInput

        protected final <T extends LogicalPort> T newInput​(String name,
                                                           LogicalPortFactory<T> factory,
                                                           boolean optional)
        Creates a new input port. The result should be assigned to a private final variable and exposed through a public getter.
        Type Parameters:
        T - the type of the port
        Parameters:
        name - the name of the port, must be unique within the operator.
        factory - the factory, determines the type of the port
        optional - whether the port is optional
        Returns:
        a new input port.
        See Also:
        LogicalOperator
      • newRecordOutput

        protected final RecordPort newRecordOutput​(String name)
        Creates a new record output port. The result should be assigned to a private final variable and exposed through a public getter.
        Parameters:
        name - the name of the port, must be unique within the operator.
        Returns:
        a new record output port.
        See Also:
        LogicalOperator
      • newOutput

        protected final <T extends LogicalPort> T newOutput​(String name,
                                                            LogicalPortFactory<T> factory)
        Creates a new output port. The result should be assigned to a private final variable and exposed through a public getter.
        Type Parameters:
        T - the type of the port
        Parameters:
        name - the name of the port, must be unique within the operator.
        factory - the factory, determines the type of the port
        Returns:
        a new output port.
        See Also:
        LogicalOperator