Enum OrderingMode

java.lang.Object
java.lang.Enum<OrderingMode>
io.github.flink.gcp.connector.bigtable.sink.OrderingMode
All Implemented Interfaces:
Serializable, Comparable<OrderingMode>, java.lang.constant.Constable

@Experimental public enum OrderingMode extends Enum<OrderingMode>
Whether the sink applies writes to one row in the order a sink subtask received them.

Submission order is worth keeping only when the input already has an order per row and every write for a row reaches the same sink subtask: a Table API changelog that Flink shuffles by its primary key, or a stream keyed by row key before the sink. Each subtask orders only what it receives, so input that spreads one row's writes over several subtasks stays unordered whatever this mode says. A row is a row key in one table: the same key in two tables is two rows.

See Also:
  • Enum Constant Details

    • NONE

      public static final OrderingMode NONE
      No order between writes to one row (default), tuned for throughput. The client keeps several MutateRows requests in flight and Bigtable may apply them, and even the entries of one request, in any order; the single-row sinks keep several requests in flight too. Writes to one row that travel in different requests have been measured applied out of order, so a setCell followed by a row delete can leave the row in place.
    • PER_KEY

      public static final OrderingMode PER_KEY
      Applies writes to one row in the order the subtask received them. A write whose row already has an earlier write unanswered is held in the writer and sent only once that write is applied or handed to the failure handler. Writes to other rows are not held back. A turn ends when the client answers, so an attempt the client abandoned at its own timeout and retried may in principle still be applied after the row's next write.

      Each held write costs one round trip after the one before it, so a row written many times in a row is written at one write per round trip. Held writes count against the writer's in-flight bounds, so a row receiving writes faster than that can fill them and slow the subtask's other rows with it.

  • Method Details

    • values

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

      public static OrderingMode 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 name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Returns the spelling a WITH clause uses.
      Overrides:
      toString in class Enum<OrderingMode>