rohdesamuel commented on a change in pull request #11005: [BEAM-8335] Modify
the StreamingCache to subclass the CacheManager
URL: https://github.com/apache/beam/pull/11005#discussion_r389950042
##########
File path: sdks/python/apache_beam/runners/direct/transform_evaluator.py
##########
@@ -214,11 +214,31 @@ class _TestStreamRootBundleProvider(RootBundleProvider):
"""
def get_root_bundles(self):
test_stream = self._applied_ptransform.transform
+
+ # The TestStream specification allows for multiple TestStreams in the same
+ # pipeline (with only one controlling the clock). Here, we use an array in
+ # the global EvaluationContext state to keep track of the iterator for each
+ # event stream.
+ idx = len(self._evaluation_context._test_stream_events)
+
+ # If there was an endpoint defined then get the events from the
+ # TestStreamService.
+ if self._evaluation_context._test_stream_endpoint:
Review comment:
Gotcha, I'll set the global context once and move the state to a global on
the _TestStreamEvaluator. That way the owner is strictly the
_TestStreamEvaluator.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services