Enum OrderingMode
- All Implemented Interfaces:
Serializable,Comparable<OrderingMode>,java.lang.constant.Constable
Submission order is worth keeping only when the input already has an order per row and every mutation of a row reaches the same sink subtask: a Table API changelog that Flink shuffles by its primary key, or a stream keyed by primary key before the sink. Each subtask orders only what it receives, so input that spreads one row's mutations over several subtasks stays unordered whatever this mode says.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiontoString()Returns the spelling aWITHclause uses.static OrderingModeReturns the enum constant of this type with the specified name.static OrderingMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NONE
No order between mutations of one row within a batch write request (default). Spanner applies the mutation groups of one request in an unspecified order, so aninsertOrUpdatefollowed by adeleteof the same row in one request can leave the row in place. Requests are sent one at a time, so mutations in different requests keep their order, unless the service applies an attempt that timed out on the client after a later request. -
PER_KEY
Applies mutations of one row in the order the subtask received them. The writer sends its batch before a mutation whose row the batch already holds, so no request carries a row twice. Mutations of other rows still share requests.The row is the table and the primary-key values, with the primary key and its column types read from the database's
INFORMATION_SCHEMAwhen the writer opens, and read again, once per name, when a mutation names a table they do not list. A mutation whose row the writer cannot name, such as a delete of a key range, is ordered against every mutation of its table instead, and a mutation of a table the new read does not list either, such as a synonym, against every mutation of the batch. A row written many times in a row costs one request per mutation, and an attempt that timed out on the client can still be applied by the service after a later request. A primary key changed by dropping a table and creating it again is not detected; restart the job after such a change.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
toString
Returns the spelling aWITHclause uses.- Overrides:
toStringin classEnum<OrderingMode>
-