arunpandianp commented on code in PR #36743:
URL: https://github.com/apache/beam/pull/36743#discussion_r2498467547
##########
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:
related question: do you know why the system/user prefix is not included in
the StateTable keys? is it correct to not include them?
With SimpleStateTag, ID_EQUIVALENCE here will get only the RawId and not the
`s`/`u` prefix.
--
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]