Enum PartitioningProperty
- java.lang.Object
-
- java.lang.Enum<PartitioningProperty>
-
- org.apache.flink.optimizer.dataproperties.PartitioningProperty
-
- All Implemented Interfaces:
Serializable,Comparable<PartitioningProperty>
public enum PartitioningProperty extends Enum<PartitioningProperty>
An enumeration of the different types of distributing data across partitions or parallel workers.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ANY_DISTRIBUTIONAny possible way of data distribution, including random partitioning and full replication.ANY_PARTITIONINGA not further specified partitioning on a key (hash-, or range partitioning, or some other scheme even).CUSTOM_PARTITIONINGA custom partitioning, accompanied by aPartitioner.FORCED_REBALANCEDA forced even re-balancing.FULL_REPLICATIONFull replication of the data to each parallel instance.HASH_PARTITIONEDA hash partitioning on a certain key.RANDOM_PARTITIONEDA random disjunct (non-replicated) data distribution, where each datum is contained in one partition only.RANGE_PARTITIONEDA range partitioning on a certain key.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisComputablyPartitioned()Checks, if this property represents a partitioning that is computable.booleanisPartitioned()Checks, if this property represents in fact a partitioning.booleanisPartitionedOnKey()Checks if this property presents a partitioning that is not random, but on a partitioning key.booleanisReplication()Checks, if this property represents a full replication.static PartitioningPropertyvalueOf(String name)Returns the enum constant of this type with the specified name.static PartitioningProperty[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ANY_DISTRIBUTION
public static final PartitioningProperty ANY_DISTRIBUTION
Any possible way of data distribution, including random partitioning and full replication.
-
RANDOM_PARTITIONED
public static final PartitioningProperty RANDOM_PARTITIONED
A random disjunct (non-replicated) data distribution, where each datum is contained in one partition only. This is for example the result of parallel scans of data in a file system like HDFS, or the result of a round-robin data distribution.
-
HASH_PARTITIONED
public static final PartitioningProperty HASH_PARTITIONED
A hash partitioning on a certain key.
-
RANGE_PARTITIONED
public static final PartitioningProperty RANGE_PARTITIONED
A range partitioning on a certain key.
-
ANY_PARTITIONING
public static final PartitioningProperty ANY_PARTITIONING
A not further specified partitioning on a key (hash-, or range partitioning, or some other scheme even).
-
FULL_REPLICATION
public static final PartitioningProperty FULL_REPLICATION
Full replication of the data to each parallel instance.
-
FORCED_REBALANCED
public static final PartitioningProperty FORCED_REBALANCED
A forced even re-balancing. All partitions are guaranteed to have almost the same number of records.
-
CUSTOM_PARTITIONING
public static final PartitioningProperty CUSTOM_PARTITIONING
A custom partitioning, accompanied by aPartitioner.
-
-
Method Detail
-
values
public static PartitioningProperty[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PartitioningProperty c : PartitioningProperty.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PartitioningProperty valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isPartitioned
public boolean isPartitioned()
Checks, if this property represents in fact a partitioning. That is, whether this property is not equal to PartitionProperty.FULL_REPLICATION.- Returns:
- True, if this enum constant is unequal to PartitionProperty.FULL_REPLICATION, false otherwise.
-
isReplication
public boolean isReplication()
Checks, if this property represents a full replication.- Returns:
- True, if this enum constant is equal to PartitionProperty.FULL_REPLICATION, false otherwise.
-
isPartitionedOnKey
public boolean isPartitionedOnKey()
Checks if this property presents a partitioning that is not random, but on a partitioning key.- Returns:
- True, if the data is partitioned on a key.
-
isComputablyPartitioned
public boolean isComputablyPartitioned()
Checks, if this property represents a partitioning that is computable. A computable partitioning can be recreated through an algorithm. If two sets of data are to be co-partitioned, it is crucial, that the partitioning schemes are computable.Examples for computable partitioning schemes are hash- or range-partitioning. An example for a non-computable partitioning is the implicit partitioning that exists though a globally unique key.
- Returns:
- True, if this enum constant is a re-computable partitioning.
-
-