Class RequestedLocalProperties
- java.lang.Object
-
- org.apache.flink.optimizer.dataproperties.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestedLocalPropertiesclone()booleanequals(Object obj)RequestedLocalPropertiesfilterBySemanticProperties(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.org.apache.flink.api.common.operators.util.FieldSetgetGroupedFields()Gets the grouped fields.org.apache.flink.api.common.operators.OrderinggetOrdering()Gets the key order.inthashCode()booleanisMetBy(LocalProperties other)Checks, if this set of properties, as interesting properties, is met by the given properties.booleanisTrivial()Checks, if the properties in this object are trivial, i.e.voidparameterizeChannel(Channel channel)Parametrizes the local strategy fields of a channel such that the channel produces the desired local properties.voidreset()This method resets the local properties to a state where no properties are given.voidsetGroupedFields(org.apache.flink.api.common.operators.util.FieldSet groupedFields)Sets the fields that are grouped in these data properties.voidsetOrdering(org.apache.flink.api.common.operators.Ordering ordering)Sets the order for these interesting local properties.StringtoString()
-
-
-
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
nullif 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
nullif 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.
-
clone
public RequestedLocalProperties clone()
-
-