Class GlobalProperties

  • All Implemented Interfaces:
    Cloneable

    public class GlobalProperties
    extends Object
    implements Cloneable
    This class represents global properties of the data at a certain point in the plan. Global properties are properties that describe data across different partitions, such as whether the data is hash partitioned, range partitioned, replicated, etc.
    • Field Detail

      • LOG

        public static final org.slf4j.Logger LOG
    • Constructor Detail

      • GlobalProperties

        public GlobalProperties()
        Initializes the global properties with no partitioning.
    • Method Detail

      • setHashPartitioned

        public void setHashPartitioned​(org.apache.flink.api.common.operators.util.FieldList partitionedFields)
        Sets this global properties to represent a hash partitioning.
        Parameters:
        partitionedFields - The key fields on which the data is hash partitioned.
      • setRangePartitioned

        public void setRangePartitioned​(org.apache.flink.api.common.operators.Ordering ordering)
        Set the parameters for range partition.
        Parameters:
        ordering - Order of the partitioned fields
      • setRangePartitioned

        public void setRangePartitioned​(org.apache.flink.api.common.operators.Ordering ordering,
                                        org.apache.flink.api.common.distributions.DataDistribution distribution)
        Set the parameters for range partition.
        Parameters:
        ordering - Order of the partitioned fields
        distribution - The data distribution for range partition. User can supply a customized data distribution, also the data distribution can be null.
      • setAnyPartitioning

        public void setAnyPartitioning​(org.apache.flink.api.common.operators.util.FieldList partitionedFields)
      • setRandomPartitioned

        public void setRandomPartitioned()
      • setFullyReplicated

        public void setFullyReplicated()
      • setForcedRebalanced

        public void setForcedRebalanced()
      • setCustomPartitioned

        public void setCustomPartitioned​(org.apache.flink.api.common.operators.util.FieldList partitionedFields,
                                         org.apache.flink.api.common.functions.Partitioner<?> partitioner)
      • addUniqueFieldCombination

        public void addUniqueFieldCombination​(org.apache.flink.api.common.operators.util.FieldSet fields)
      • clearUniqueFieldCombinations

        public void clearUniqueFieldCombinations()
      • getUniqueFieldCombination

        public Set<org.apache.flink.api.common.operators.util.FieldSet> getUniqueFieldCombination()
      • getPartitioningFields

        public org.apache.flink.api.common.operators.util.FieldList getPartitioningFields()
      • getPartitioningOrdering

        public org.apache.flink.api.common.operators.Ordering getPartitioningOrdering()
      • getCustomPartitioner

        public org.apache.flink.api.common.functions.Partitioner<?> getCustomPartitioner()
      • getDataDistribution

        public org.apache.flink.api.common.distributions.DataDistribution getDataDistribution()
      • isPartitionedOnFields

        public boolean isPartitionedOnFields​(org.apache.flink.api.common.operators.util.FieldSet fields)
      • isExactlyPartitionedOnFields

        public boolean isExactlyPartitionedOnFields​(org.apache.flink.api.common.operators.util.FieldList fields)
      • matchesOrderedPartitioning

        public boolean matchesOrderedPartitioning​(org.apache.flink.api.common.operators.Ordering o)
      • isFullyReplicated

        public boolean isFullyReplicated()
      • 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 properties to a state where no properties are given.
      • filterBySemanticProperties

        public GlobalProperties filterBySemanticProperties​(org.apache.flink.api.common.operators.SemanticProperties props,
                                                           int input)
        Filters these GlobalProperties by the fields that are forwarded to the output as described by the SemanticProperties.
        Parameters:
        props - The semantic properties holding information about forwarded fields.
        input - The index of the input.
        Returns:
        The filtered GlobalProperties
      • parameterizeChannel

        public void parameterizeChannel​(Channel channel,
                                        boolean globalDopChange,
                                        org.apache.flink.api.common.ExecutionMode exchangeMode,
                                        boolean breakPipeline)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object