Class IterativeDataSet<T>

    • Constructor Detail

      • IterativeDataSet

        public IterativeDataSet​(ExecutionEnvironment context,
                                org.apache.flink.api.common.typeinfo.TypeInformation<T> type,
                                DataSet<T> input,
                                int maxIterations)
        Deprecated.
    • Method Detail

      • closeWith

        public DataSet<T> closeWith​(DataSet<T> iterationResult)
        Deprecated.
        Closes the iteration. This method defines the end of the iterative program part.
        Parameters:
        iterationResult - The data set that will be fed back to the next iteration.
        Returns:
        The DataSet that represents the result of the iteration, after the computation has terminated.
        See Also:
        DataSet.iterate(int)
      • closeWith

        public DataSet<T> closeWith​(DataSet<T> iterationResult,
                                    DataSet<?> terminationCriterion)
        Deprecated.
        Closes the iteration and specifies a termination criterion. This method defines the end of the iterative program part.

        The termination criterion is a means of dynamically signaling the iteration to halt. It is expressed via a data set that will trigger to halt the loop as soon as the data set is empty. A typical way of using the termination criterion is to have a filter that filters out all elements that are considered non-converged. As soon as no more such elements exist, the iteration finishes.

        Parameters:
        iterationResult - The data set that will be fed back to the next iteration.
        terminationCriterion - The data set that being used to trigger halt on operation once it is empty.
        Returns:
        The DataSet that represents the result of the iteration, after the computation has terminated.
        See Also:
        DataSet.iterate(int)
      • getMaxIterations

        public int getMaxIterations()
        Deprecated.
        Gets the maximum number of iterations.
        Returns:
        The maximum number of iterations.
      • registerAggregator

        @PublicEvolving
        public IterativeDataSet<T> registerAggregator​(String name,
                                                      org.apache.flink.api.common.aggregators.Aggregator<?> aggregator)
        Deprecated.
        Registers an Aggregator for the iteration. Aggregators can be used to maintain simple statistics during the iteration, such as number of elements processed. The aggregators compute global aggregates: After each iteration step, the values are globally aggregated to produce one aggregate that represents statistics across all parallel instances. The value of an aggregator can be accessed in the next iteration.

        Aggregators can be accessed inside a function via the AbstractRichFunction.getIterationRuntimeContext() method.

        Parameters:
        name - The name under which the aggregator is registered.
        aggregator - The aggregator class.
        Returns:
        The IterativeDataSet itself, to allow chaining function calls.
      • registerAggregationConvergenceCriterion

        @PublicEvolving
        public <X extends org.apache.flink.types.Value> IterativeDataSet<T> registerAggregationConvergenceCriterion​(String name,
                                                                                                                    org.apache.flink.api.common.aggregators.Aggregator<X> aggregator,
                                                                                                                    org.apache.flink.api.common.aggregators.ConvergenceCriterion<X> convergenceCheck)
        Deprecated.
        Registers an Aggregator for the iteration together with a ConvergenceCriterion. For a general description of aggregators, see registerAggregator(String, Aggregator) and Aggregator. At the end of each iteration, the convergence criterion takes the aggregator's global aggregate value and decided whether the iteration should terminate. A typical use case is to have an aggregator that sums up the total error of change in an iteration step and have to have a convergence criterion that signals termination as soon as the aggregate value is below a certain threshold.
        Parameters:
        name - The name under which the aggregator is registered.
        aggregator - The aggregator class.
        convergenceCheck - The convergence criterion.
        Returns:
        The IterativeDataSet itself, to allow chaining function calls.
      • translateToDataFlow

        protected org.apache.flink.api.common.operators.SingleInputOperator<T,​T,​?> translateToDataFlow​(org.apache.flink.api.common.operators.Operator<T> input)
        Deprecated.
        Description copied from class: SingleInputOperator
        Translates this operation to a data flow operator of the common data flow API.
        Specified by:
        translateToDataFlow in class SingleInputOperator<T,​T,​IterativeDataSet<T>>
        Parameters:
        input - The data flow operator that produces this operation's input data.
        Returns:
        The translated data flow operator.