Enum Class DistributionMode

java.lang.Object
java.lang.Enum<DistributionMode>
org.apache.iceberg.DistributionMode
All Implemented Interfaces:
Serializable, Comparable<DistributionMode>, Constable

public enum DistributionMode extends 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.

  • Enum Constant Details

  • Method Details

    • values

      public static DistributionMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DistributionMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • modeName

      public String modeName()
    • fromName

      public static DistributionMode fromName(String modeName)