Class AbstractIterativeTask<S extends org.apache.flink.api.common.functions.Function,​OT>

    • Field Detail

      • worksetAggregator

        protected org.apache.flink.api.common.aggregators.LongSumAggregator worksetAggregator
      • isWorksetIteration

        protected boolean isWorksetIteration
      • isWorksetUpdate

        protected boolean isWorksetUpdate
      • isSolutionSetUpdate

        protected boolean isSolutionSetUpdate
    • Constructor Detail

      • AbstractIterativeTask

        public AbstractIterativeTask​(Environment environment)
        Create an Invokable task and set its environment.
        Parameters:
        environment - The environment assigned to this invokable.
    • Method Detail

      • closeLocalStrategiesAndCaches

        protected void closeLocalStrategiesAndCaches()
        Overrides:
        closeLocalStrategiesAndCaches in class BatchTask<S extends org.apache.flink.api.common.functions.Function,​OT>
      • inFirstIteration

        protected boolean inFirstIteration()
      • currentIteration

        protected int currentIteration()
      • incrementIterationCounter

        protected void incrementIterationCounter()
      • brokerKey

        public String brokerKey()
      • verifyEndOfSuperstepState

        protected void verifyEndOfSuperstepState()
                                          throws IOException
        Throws:
        IOException
      • cancel

        public void cancel()
                    throws Exception
        Description copied from interface: TaskInvokable
        This method is called when a task is canceled either as a result of a user abort or an execution failure. It can be overwritten to respond to shut down the user code properly.
        Specified by:
        cancel in interface TaskInvokable
        Overrides:
        cancel in class BatchTask<S extends org.apache.flink.api.common.functions.Function,​OT>
        Throws:
        Exception
      • createWorksetUpdateOutputCollector

        protected org.apache.flink.util.Collector<OT> createWorksetUpdateOutputCollector​(org.apache.flink.util.Collector<OT> delegate)
        Creates a new WorksetUpdateOutputCollector.

        This collector is used by IterationIntermediateTask or IterationTailTask to update the workset.

        If a non-null delegate is given, the new Collector will write to the solution set and also call collect(T) of the delegate.

        Parameters:
        delegate - null -OR- the delegate on which to call collect() by the newly created collector
        Returns:
        a new WorksetUpdateOutputCollector
      • createWorksetUpdateOutputCollector

        protected org.apache.flink.util.Collector<OT> createWorksetUpdateOutputCollector()