arunpandianp commented on code in PR #36743:
URL: https://github.com/apache/beam/pull/36743#discussion_r2501327930
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/state/CachingStateTable.java:
##########
@@ -65,20 +72,52 @@ private CachingStateTable(Builder builder) {
}
}
- static CachingStateTable.Builder builder(
+ static Builder builder(
String stateFamily,
WindmillStateReader reader,
ForKeyAndFamily cache,
boolean isNewKey,
Supplier<Closeable> scopedReadStateSupplier,
WindmillStateTagUtil windmillStateTagUtil) {
- return new CachingStateTable.Builder(
+ return new Builder(
stateFamily, reader, cache, scopedReadStateSupplier, isNewKey,
windmillStateTagUtil);
}
- @Override
+ /**
+ * Gets the {@link State} in the specified {@link StateNamespace} with the
specified {@link
+ * StateTag}, binding it using the {@link #binderForNamespace} if it is not
already present in
+ * this {@link CachingStateTable}.
+ */
+ public <StateT extends State> StateT get(
+ StateNamespace namespace, StateTag<StateT> tag, StateContext<?> c) {
+
+ Equivalence.Wrapper<StateTag<?>> tagById =
StateTags.ID_EQUIVALENCE.wrap(tag);
Review Comment:
Will tackle it separately. The logic was intentionally modified in
https://github.com/apache/beam/commit/eb92417331faba570c716c3882148e61939a90cb#diff-9687c927fabdd059d20de9e8050fca21c23b9a50472643eaeaad872a7f43d5d4R212
Replaced SimpleImmutableEntry with a custom key class.
--
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]