public enum DistributionMode extends java.lang.Enum<DistributionMode>
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.
Modifier and Type | Method and 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.
|
public static final DistributionMode NONE
public static final DistributionMode HASH
public static final DistributionMode RANGE
public static DistributionMode[] values()
for (DistributionMode c : DistributionMode.values()) System.out.println(c);
public static DistributionMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String modeName()
public static DistributionMode fromName(java.lang.String modeName)