apache_beam.runners.interactive.recording_manager module¶
-
class
apache_beam.runners.interactive.recording_manager.
ElementStream
(pcoll: apache_beam.pvalue.PCollection, var: str, cache_key: str, max_n: int, max_duration_secs: float)[source]¶ Bases:
object
A stream of elements from a given PCollection.
-
var
¶ Returns the variable named that defined this PCollection.
-
pcoll
¶ Returns the PCollection that supplies this stream with data.
-
cache_key
¶ Returns the cache key for this stream.
-
-
class
apache_beam.runners.interactive.recording_manager.
Recording
(user_pipeline: apache_beam.pipeline.Pipeline, pcolls: List[apache_beam.pvalue.PCollection], result: beam.runner.PipelineResult, max_n: int, max_duration_secs: float)[source]¶ Bases:
object
A group of PCollections from a given pipeline run.
-
stream
(pcoll: apache_beam.pvalue.PCollection) → apache_beam.runners.interactive.recording_manager.ElementStream[source]¶ Returns an ElementStream for a given PCollection.
-
-
class
apache_beam.runners.interactive.recording_manager.
RecordingManager
(user_pipeline: apache_beam.pipeline.Pipeline, pipeline_var: str = None, test_limiters: List[Limiter] = None)[source]¶ Bases:
object
Manages recordings of PCollections for a given pipeline.
-
record_pipeline
() → bool[source]¶ Starts a background caching job for this RecordingManager’s pipeline.
-
record
(pcolls: List[apache_beam.pvalue.PCollection], max_n: int, max_duration: Union[int, str]) → apache_beam.runners.interactive.recording_manager.Recording[source]¶ Records the given PCollections.
-
read
(pcoll_name: str, pcoll: apache_beam.pvalue.PValue, max_n: int, max_duration_secs: float) → Union[None, apache_beam.runners.interactive.recording_manager.ElementStream][source]¶ Reads an ElementStream of a computed PCollection.
Returns None if an error occurs. The caller is responsible of validating if the given pcoll_name and pcoll can identify a watched and computed PCollection without ambiguity in the notebook.
-