rohdesamuel commented on a change in pull request #12800:
URL: https://github.com/apache/beam/pull/12800#discussion_r493079795
##########
File path: sdks/python/apache_beam/runners/interactive/interactive_beam.py
##########
@@ -199,6 +199,93 @@ def display_timezone(self, value):
self._display_timezone = value
+class Recordings():
+ """An introspection interface for recordings for pipelines.
+
+ When a user materializes a PCollection onto disk (eg. ib.show) for a
streaming
+ pipeline, a background recording job is started. This job pulls data from all
+ defined unbounded sources for that PCollection's pipeline. The following
+ methods allow for introspection into that background recording job.
+ """
+ def describe(self, pipeline=None):
+ # type: (Optional[beam.Pipeline]) -> dict[str, Any]
+
+ """Returns a description of all the recordings for the given pipeline.
+
+ If no pipeline is given then this returns a dictionary of descriptions for
+ all pipelines.
+ """
+
+ watching = ie.current_env().watching()
+ description = ie.current_env().describe_all_recordings()
+
+ # In the case that the user has multiple pipelines, this correlates the
+ # pipeline object to the variable name.
Review comment:
This shouldn't be heavily used, but yeah it's pretty inefficient. I
moved this into the InteractiveEnvironment when constructing a RecordingManager
so we only pay the price once per pipeline.
----------------------------------------------------------------
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]