Class RequestedLocalProperties

  • All Implemented Interfaces:
    Cloneable

    public class RequestedLocalProperties
    extends Object
    implements Cloneable
    This class represents the local properties of the data that are requested by an operator. Local properties are the properties within one partition. Operators request the local properties they need for correct execution. Here are some example local properties requested by certain operators:
    • "groupBy/reduce" will request the data to be grouped on the key fields.
    • A sort-merge join will request the data from each input to be sorted on the respective join key.
    • Constructor Summary

      Constructors 
      Constructor Description
      RequestedLocalProperties()
      Default constructor for trivial local properties.
      RequestedLocalProperties​(org.apache.flink.api.common.operators.Ordering ordering)
      Creates interesting properties for the given ordering.
      RequestedLocalProperties​(org.apache.flink.api.common.operators.util.FieldSet groupedFields)
      Creates interesting properties for the given grouping.
    • Constructor Detail

      • RequestedLocalProperties

        public RequestedLocalProperties()
        Default constructor for trivial local properties. No order, no grouping, no uniqueness.
      • RequestedLocalProperties

        public RequestedLocalProperties​(org.apache.flink.api.common.operators.Ordering ordering)
        Creates interesting properties for the given ordering.
        Parameters:
        ordering - The interesting ordering.
      • RequestedLocalProperties

        public RequestedLocalProperties​(org.apache.flink.api.common.operators.util.FieldSet groupedFields)
        Creates interesting properties for the given grouping.
        Parameters:
        groupedFields - The set of fields whose grouping is interesting.
    • Method Detail

      • getOrdering

        public org.apache.flink.api.common.operators.Ordering getOrdering()
        Gets the key order.
        Returns:
        The key order, or null if nothing is ordered.
      • setOrdering

        public void setOrdering​(org.apache.flink.api.common.operators.Ordering ordering)
        Sets the order for these interesting local properties.
        Parameters:
        ordering - The order to set.
      • getGroupedFields

        public org.apache.flink.api.common.operators.util.FieldSet getGroupedFields()
        Gets the grouped fields.
        Returns:
        The grouped fields, or null if nothing is grouped.
      • setGroupedFields

        public void setGroupedFields​(org.apache.flink.api.common.operators.util.FieldSet groupedFields)
        Sets the fields that are grouped in these data properties.
        Parameters:
        groupedFields - The fields that are grouped in these data properties.
      • isTrivial

        public boolean isTrivial()
        Checks, if the properties in this object are trivial, i.e. only standard values.
      • reset

        public void reset()
        This method resets the local properties to a state where no properties are given.
      • filterBySemanticProperties

        public RequestedLocalProperties filterBySemanticProperties​(org.apache.flink.api.common.operators.SemanticProperties props,
                                                                   int input)
        Filters these properties by what can be preserved by the given SemanticProperties when propagated down to the given input.
        Parameters:
        props - The SemanticProperties which define which fields are preserved.
        input - The index of the operator's input.
        Returns:
        The filtered RequestedLocalProperties
      • isMetBy

        public boolean isMetBy​(LocalProperties other)
        Checks, if this set of properties, as interesting properties, is met by the given properties.
        Parameters:
        other - The properties for which to check whether they meet these properties.
        Returns:
        True, if the properties are met, false otherwise.
      • parameterizeChannel

        public void parameterizeChannel​(Channel channel)
        Parametrizes the local strategy fields of a channel such that the channel produces the desired local properties.
        Parameters:
        channel - The channel to parametrize.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object