shunping commented on code in PR #30317:
URL: https://github.com/apache/beam/pull/30317#discussion_r1635202567
##########
sdks/java/harness/src/test/java/org/apache/beam/fn/harness/state/FakeBeamFnStateClient.java:
##########
@@ -47,6 +60,7 @@ public class FakeBeamFnStateClient implements
BeamFnStateClient {
private static final int DEFAULT_CHUNK_SIZE = 6;
private final Map<StateKey, List<ByteString>> data;
private int currentId;
+ private final Map<StateKey, NavigableSet<Long>>
orderedListSortKeysFromStateKey;
Review Comment:
The structure is used to support multiple ordered list states within one
DoFn.
For example, we can have order list state A and B, which have different
StateKeys. The outer Map is only used once when looking up the inner set
structure.
Then under each state key, the NavigableSet, which is internally initialized
with a TreeSet, can support removing a range of keys efficiently.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]