-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement ordered list state for FnApi. (#30317)
* Add request and response proto messages for ordered list state. * Initial implementation of OrderedListState for fnApi. * Discard the use of the value coder in FakeBeamFnStateClient. * Fix the behavior of pre-existing iterators on local change of state If there are changes on a state after we obtain iterators from calling read() and readRange(), the behavior of these pre-existing iterators were incorrect in the previous implementation. The change introduced here will make sure that these iterators will still work as if no local change is made. * Support continuation token for ordered list get request in fake client * Add copyright notices to the new files * Add binding for ordered list state in fnapi state accessor * Clean up comments * Apply spotless and checkStyle to reformat * Add an encode-only coder for the use in the fake client. * Remove request and response messages for ordered list state get. * The range information is placed in the state key of ordered list * For consistency, we reuse the existing get request and response mesasages of other states like Bag, MultiMap, etc. * Remove request and response messages for ordered list state update * Reuse existing messages of clear and append. * Minor fixes based on feedbacks from reviewers * Replace String::size() > 0 with String::isEmpty() * Return this in readLater and readRangeLater instead of throwing an exception * Remove the added SupressWarnings("unchecked") * Apply spotless * Use data field in AppendRequest for ordered list state Previously, we used a repeated OrderedListEntry field in the AppendRequest particularly for ordered list state. For consistency, we now get rid of that and use the same data field as other states. * Apply spotless * Minor renaming of a variable * Create a new coder for TimestampedValue according to the notes in proto. * Address feedback from the reviewer - Add a test to cover the case when an add/clear operation happens while we are partway through an existing iterable. - Use clear() instead of clearRange(min, max) when we can. - Fix a typo. * Apply spotless * Add urn for ordered list state. * Add ordered list spec to ParDoTranslation. * Fix an edge case when async called after clear. Minor fix based on reviwer comments. * Refactor some variable names. Add a notes on the order of pendingAdds and pendingRemoves during async_close()
- Loading branch information
Showing
8 changed files
with
1,314 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.