You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/08/05 18:20:02 UTC

[GitHub] [beam] anthonyqzhu commented on a change in pull request #15214: [BEAM-10212] Integrate caching client

anthonyqzhu commented on a change in pull request #15214:
URL: https://github.com/apache/beam/pull/15214#discussion_r683687444



##########
File path: sdks/java/harness/src/main/java/org/apache/beam/fn/harness/control/ProcessBundleHandler.java
##########
@@ -491,14 +514,25 @@ private BundleProcessor createBundleProcessor(
       }
     }
 
-    // Instantiate a State API call handler depending on whether a State ApiServiceDescriptor
-    // was specified.
-    HandleStateCallsForBundle beamFnStateClient =
-        bundleDescriptor.hasStateApiServiceDescriptor()
-            ? new BlockTillStateCallsFinish(
-                beamFnStateGrpcClientCache.forApiServiceDescriptor(
-                    bundleDescriptor.getStateApiServiceDescriptor()))
-            : new FailAllStateCallsForBundle(processBundleRequest);
+    // Instantiate a State API call handler depending on whether a State ApiServiceDescriptor was
+    // specified. If pipeline is batch, use a CachingBeamFnStateClient to store state responses.
+    // User state caching is currently not supported in streaming mode.
+    HandleStateCallsForBundle beamFnStateClient;
+    if (bundleDescriptor.hasStateApiServiceDescriptor()) {

Review comment:
       `hasStateApiServiceDescriptor` determines if a state handler is used at all, and `options.as(StreamingOptions.class).isStreaming()` determines if it is batch or streaming. Updated comments to show this more clearly




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org