Package org.apache.iceberg
Enum DistributionMode
- java.lang.Object
-
- java.lang.Enum<DistributionMode>
-
- org.apache.iceberg.DistributionMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DistributionMode>
public enum DistributionMode extends java.lang.Enum<DistributionMode>
Enum of supported write distribution mode, it defines the write behavior of batch or streaming job:1. none: don't shuffle rows. It is suitable for scenarios where the rows are located in only few partitions, otherwise that may produce too many small files because each task is writing rows into different partitions randomly.
2. hash: hash distribute by partition key, which is suitable for the scenarios where the rows are located into different partitions evenly.
3. range: range distribute by partition key (or sort key if table has an
SortOrder
), which is suitable for the scenarios where rows are located into different partitions with skew distribution.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DistributionMode
fromName(java.lang.String modeName)
java.lang.String
modeName()
static DistributionMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DistributionMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final DistributionMode NONE
-
HASH
public static final DistributionMode HASH
-
RANGE
public static final DistributionMode RANGE
-
-
Method Detail
-
values
public static DistributionMode[] 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 (DistributionMode c : DistributionMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DistributionMode valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
modeName
public java.lang.String modeName()
-
fromName
public static DistributionMode fromName(java.lang.String modeName)
-
-