java.lang.Object
java.lang.Enum<Strategy>
org.apache.gravitino.rel.expressions.distributions.Strategy
All Implemented Interfaces:
Serializable, Comparable<Strategy>, Constable

@Evolving public enum Strategy extends Enum<Strategy>
An enum that defines the distribution strategy.

The following strategies are supported:

  • Hash: Uses the hash value of the expression to distribute data.
  • Range: Uses the range of the expression specified to distribute data.
  • Even: Distributes data evenly across partitions.
  • Enum Constant Details

    • NONE

      public static final Strategy NONE
      No distribution strategy. This is the default strategy. Will depend on the allocation strategy of the underlying system.
    • HASH

      public static final Strategy HASH
      Uses the hash value of the expression to distribute data.
    • RANGE

      public static final Strategy RANGE
      Uses the range of the expression specified to distribute data. The range is specified using the rangeStart and rangeEnd properties.
    • EVEN

      public static final Strategy EVEN
      Distributes data evenly across partitions.
  • Method Details

    • values

      public static Strategy[] 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 Strategy 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
    • getByName

      public static Strategy getByName(String name)
      Get the distribution strategy by name.
      Parameters:
      name - The name of the distribution strategy.
      Returns:
      The distribution strategy.