blob: a662cdb7ac24199c17b2c603b4c529e93a202294 [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>apache_beam.runners.interactive.interactive_environment module &mdash; Apache Beam documentation</title>
<script type="text/javascript" src="_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="apache_beam.runners.interactive.interactive_runner module" href="apache_beam.runners.interactive.interactive_runner.html" />
<link rel="prev" title="apache_beam.runners.interactive.interactive_beam module" href="apache_beam.runners.interactive.interactive_beam.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Apache Beam
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="apache_beam.coders.html">apache_beam.coders package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.dataframe.html">apache_beam.dataframe package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.io.html">apache_beam.io package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.metrics.html">apache_beam.metrics package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.ml.html">apache_beam.ml package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.options.html">apache_beam.options package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.portability.html">apache_beam.portability package</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="apache_beam.runners.html">apache_beam.runners package</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="apache_beam.runners.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="apache_beam.runners.dataflow.html">apache_beam.runners.dataflow package</a></li>
<li class="toctree-l3"><a class="reference internal" href="apache_beam.runners.direct.html">apache_beam.runners.direct package</a></li>
<li class="toctree-l3 current"><a class="reference internal" href="apache_beam.runners.interactive.html">apache_beam.runners.interactive package</a><ul class="current">
<li class="toctree-l4"><a class="reference internal" href="apache_beam.runners.interactive.html#subpackages">Subpackages</a></li>
<li class="toctree-l4 current"><a class="reference internal" href="apache_beam.runners.interactive.html#submodules">Submodules</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="apache_beam.runners.job.html">apache_beam.runners.job package</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="apache_beam.runners.html#submodules">Submodules</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.transforms.html">apache_beam.transforms package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.typehints.html">apache_beam.typehints package</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.utils.html">apache_beam.utils package</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.error.html">apache_beam.error module</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.pipeline.html">apache_beam.pipeline module</a></li>
<li class="toctree-l1"><a class="reference internal" href="apache_beam.pvalue.html">apache_beam.pvalue module</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Apache Beam</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li><a href="apache_beam.runners.html">apache_beam.runners package</a> &raquo;</li>
<li><a href="apache_beam.runners.interactive.html">apache_beam.runners.interactive package</a> &raquo;</li>
<li>apache_beam.runners.interactive.interactive_environment module</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/apache_beam.runners.interactive.interactive_environment.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="module-apache_beam.runners.interactive.interactive_environment">
<span id="apache-beam-runners-interactive-interactive-environment-module"></span><h1>apache_beam.runners.interactive.interactive_environment module<a class="headerlink" href="#module-apache_beam.runners.interactive.interactive_environment" title="Permalink to this headline"></a></h1>
<p>Module of the current Interactive Beam environment.</p>
<p>For internal use only; no backwards-compatibility guarantees.
Provides interfaces to interact with existing Interactive Beam environment.
External Interactive Beam users please use interactive_beam module in
application code or notebook.</p>
<dl class="function">
<dt id="apache_beam.runners.interactive.interactive_environment.current_env">
<code class="descclassname">apache_beam.runners.interactive.interactive_environment.</code><code class="descname">current_env</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#current_env"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.current_env" title="Permalink to this definition"></a></dt>
<dd><p>Gets current Interactive Beam environment.</p>
</dd></dl>
<dl class="function">
<dt id="apache_beam.runners.interactive.interactive_environment.new_env">
<code class="descclassname">apache_beam.runners.interactive.interactive_environment.</code><code class="descname">new_env</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#new_env"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.new_env" title="Permalink to this definition"></a></dt>
<dd><p>Creates a new Interactive Beam environment to replace current one.</p>
</dd></dl>
<dl class="class">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment">
<em class="property">class </em><code class="descclassname">apache_beam.runners.interactive.interactive_environment.</code><code class="descname">InteractiveEnvironment</code><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>An interactive environment with cache and pipeline variable metadata.</p>
<p>Interactive Beam will use the watched variable information to determine if a
PCollection is assigned to a variable in user pipeline definition. When
executing the pipeline, interactivity is applied with implicit cache
mechanism for those PCollections if the pipeline is interactive. Users can
also visualize and introspect those PCollections in user code since they have
handles to the variables.</p>
<dl class="attribute">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.options">
<code class="descname">options</code><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.options" title="Permalink to this definition"></a></dt>
<dd><p>A reference to the global interactive options.</p>
<p>Provided to avoid import loop or excessive dynamic import. All internal
Interactive Beam modules should access interactive_beam.options through
this property.</p>
</dd></dl>
<dl class="attribute">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.is_interactive_ready">
<code class="descname">is_interactive_ready</code><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.is_interactive_ready" title="Permalink to this definition"></a></dt>
<dd><p>If the [interactive] dependencies are installed.</p>
</dd></dl>
<dl class="attribute">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.is_in_ipython">
<code class="descname">is_in_ipython</code><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.is_in_ipython" title="Permalink to this definition"></a></dt>
<dd><p>If the runtime is within an IPython kernel.</p>
</dd></dl>
<dl class="attribute">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.is_in_notebook">
<code class="descname">is_in_notebook</code><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.is_in_notebook" title="Permalink to this definition"></a></dt>
<dd><p>If the kernel is connected to a notebook frontend.</p>
<p>If not, it could be that the user is using kernel in a terminal or a unit
test.</p>
</dd></dl>
<dl class="attribute">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.inspector">
<code class="descname">inspector</code><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.inspector" title="Permalink to this definition"></a></dt>
<dd><p>Gets the singleton InteractiveEnvironmentInspector to retrieve
information consumable by other applications.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.cleanup">
<code class="descname">cleanup</code><span class="sig-paren">(</span><em>pipeline=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.cleanup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.cleanup" title="Permalink to this definition"></a></dt>
<dd><p>Cleans up cached states for the given pipeline. Noop if the given
pipeline is absent from the environment. Cleans up for all pipelines
if no pipeline is specified.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.watch">
<code class="descname">watch</code><span class="sig-paren">(</span><em>watchable</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.watch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.watch" title="Permalink to this definition"></a></dt>
<dd><p>Watches a watchable.</p>
<p>A watchable can be a dictionary of variable metadata such as locals(), a str
name of a module, a module object or an instance of a class. The variable
can come from any scope even local. Duplicated variable naming doesn’t
matter since they are different instances. Duplicated variables are also
allowed when watching.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.watching">
<code class="descname">watching</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.watching"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.watching" title="Permalink to this definition"></a></dt>
<dd><p>Analyzes and returns a list of pair lists referring to variable names and
values from watched scopes.</p>
<p>Each entry in the list represents the variable defined within a watched
watchable. Currently, each entry holds a list of pairs. The format might
change in the future to hold more metadata. Duplicated pairs are allowed.
And multiple paris can have the same variable name as the “first” while
having different variable values as the “second” since variables in
different scopes can have the same name.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_cache_manager">
<code class="descname">set_cache_manager</code><span class="sig-paren">(</span><em>cache_manager</em>, <em>pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.set_cache_manager"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_cache_manager" title="Permalink to this definition"></a></dt>
<dd><p>Sets the cache manager held by current Interactive Environment for the
given pipeline.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.get_cache_manager">
<code class="descname">get_cache_manager</code><span class="sig-paren">(</span><em>pipeline</em>, <em>create_if_absent=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.get_cache_manager"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.get_cache_manager" title="Permalink to this definition"></a></dt>
<dd><p>Gets the cache manager held by current Interactive Environment for the
given pipeline. If the pipeline is absent from the environment while
create_if_absent is True, creates and returns a new file based cache
manager for the pipeline.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_cache_manager">
<code class="descname">evict_cache_manager</code><span class="sig-paren">(</span><em>pipeline=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.evict_cache_manager"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_cache_manager" title="Permalink to this definition"></a></dt>
<dd><p>Evicts the cache manager held by current Interactive Environment for the
given pipeline. Noop if the pipeline is absent from the environment. If no
pipeline is specified, evicts for all pipelines.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_recording_manager">
<code class="descname">set_recording_manager</code><span class="sig-paren">(</span><em>recording_manager</em>, <em>pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.set_recording_manager"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_recording_manager" title="Permalink to this definition"></a></dt>
<dd><p>Sets the recording manager for the given pipeline.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.get_recording_manager">
<code class="descname">get_recording_manager</code><span class="sig-paren">(</span><em>pipeline</em>, <em>create_if_absent=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.get_recording_manager"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.get_recording_manager" title="Permalink to this definition"></a></dt>
<dd><p>Gets the recording manager for the given pipeline.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_recording_manager">
<code class="descname">evict_recording_manager</code><span class="sig-paren">(</span><em>pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.evict_recording_manager"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_recording_manager" title="Permalink to this definition"></a></dt>
<dd><p>Evicts the recording manager for the given pipeline.</p>
<p>This stops the background caching job and clears the cache.
Noop if the pipeline is absent from the environment. If no
pipeline is specified, evicts for all pipelines.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.describe_all_recordings">
<code class="descname">describe_all_recordings</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.describe_all_recordings"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.describe_all_recordings" title="Permalink to this definition"></a></dt>
<dd><p>Returns a description of the recording for all watched pipelnes.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_pipeline_result">
<code class="descname">set_pipeline_result</code><span class="sig-paren">(</span><em>pipeline</em>, <em>result</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.set_pipeline_result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_pipeline_result" title="Permalink to this definition"></a></dt>
<dd><p>Sets the pipeline run result. Adds one if absent. Otherwise, replace.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_pipeline_result">
<code class="descname">evict_pipeline_result</code><span class="sig-paren">(</span><em>pipeline=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.evict_pipeline_result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_pipeline_result" title="Permalink to this definition"></a></dt>
<dd><p>Evicts the last run result of the given pipeline. Noop if the pipeline
is absent from the environment. If no pipeline is specified, evicts for all
pipelines.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.pipeline_result">
<code class="descname">pipeline_result</code><span class="sig-paren">(</span><em>pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.pipeline_result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.pipeline_result" title="Permalink to this definition"></a></dt>
<dd><p>Gets the pipeline run result. None if absent.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_background_caching_job">
<code class="descname">set_background_caching_job</code><span class="sig-paren">(</span><em>pipeline</em>, <em>background_caching_job</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.set_background_caching_job"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_background_caching_job" title="Permalink to this definition"></a></dt>
<dd><p>Sets the background caching job started from the given pipeline.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.get_background_caching_job">
<code class="descname">get_background_caching_job</code><span class="sig-paren">(</span><em>pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.get_background_caching_job"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.get_background_caching_job" title="Permalink to this definition"></a></dt>
<dd><p>Gets the background caching job started from the given pipeline.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_background_caching_job">
<code class="descname">evict_background_caching_job</code><span class="sig-paren">(</span><em>pipeline=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.evict_background_caching_job"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_background_caching_job" title="Permalink to this definition"></a></dt>
<dd><p>Evicts the background caching job started from the given pipeline. Noop
if the given pipeline is absent from the environment. If no pipeline is
specified, evicts for all pipelines.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_test_stream_service_controller">
<code class="descname">set_test_stream_service_controller</code><span class="sig-paren">(</span><em>pipeline</em>, <em>controller</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.set_test_stream_service_controller"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_test_stream_service_controller" title="Permalink to this definition"></a></dt>
<dd><p>Sets the test stream service controller that has started a gRPC server
serving the test stream for any job started from the given user defined
pipeline.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.get_test_stream_service_controller">
<code class="descname">get_test_stream_service_controller</code><span class="sig-paren">(</span><em>pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.get_test_stream_service_controller"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.get_test_stream_service_controller" title="Permalink to this definition"></a></dt>
<dd><p>Gets the test stream service controller that has started a gRPC server
serving the test stream for any job started from the given user defined
pipeline.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_test_stream_service_controller">
<code class="descname">evict_test_stream_service_controller</code><span class="sig-paren">(</span><em>pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.evict_test_stream_service_controller"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_test_stream_service_controller" title="Permalink to this definition"></a></dt>
<dd><p>Evicts and pops the test stream service controller that has started a
gRPC server serving the test stream for any job started from the given
user defined pipeline. Noop if the given pipeline is absent from the
environment. If no pipeline is specified, evicts for all pipelines.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.is_terminated">
<code class="descname">is_terminated</code><span class="sig-paren">(</span><em>pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.is_terminated"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.is_terminated" title="Permalink to this definition"></a></dt>
<dd><p>Queries if the most recent job (by executing the given pipeline) state
is in a terminal state. True if absent.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_cached_source_signature">
<code class="descname">set_cached_source_signature</code><span class="sig-paren">(</span><em>pipeline</em>, <em>signature</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.set_cached_source_signature"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.set_cached_source_signature" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.get_cached_source_signature">
<code class="descname">get_cached_source_signature</code><span class="sig-paren">(</span><em>pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.get_cached_source_signature"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.get_cached_source_signature" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_cached_source_signature">
<code class="descname">evict_cached_source_signature</code><span class="sig-paren">(</span><em>pipeline=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.evict_cached_source_signature"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_cached_source_signature" title="Permalink to this definition"></a></dt>
<dd><p>Evicts the signature generated for each recorded source of the given
pipeline. Noop if the given pipeline is absent from the environment. If no
pipeline is specified, evicts for all pipelines.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.track_user_pipelines">
<code class="descname">track_user_pipelines</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.track_user_pipelines"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.track_user_pipelines" title="Permalink to this definition"></a></dt>
<dd><p>Record references to all user defined pipeline instances watched in
current environment.</p>
<p>Current static global singleton interactive environment holds references to
a set of pipeline instances defined by the user in the watched scope.
Interactive Beam features could use the references to determine if a given
pipeline is defined by user or implicitly created by Beam SDK or runners,
then handle them differently.</p>
<p>This is invoked every time a PTransform is to be applied if the current
code execution is under ipython due to the possibility that any user defined
pipeline can be re-evaluated through notebook cell re-execution at any time.</p>
<p>Each time this is invoked, it will check if there is a cache manager
already created for each user defined pipeline. If not, create one for it.</p>
<p>If a pipeline is no longer watched due to re-execution while its
PCollections are still in watched scope, the pipeline becomes anonymous but
still accessible indirectly through references to its PCollections. This
function also clears up internal states for those anonymous pipelines once
all their PCollections are anonymous.</p>
</dd></dl>
<dl class="attribute">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.tracked_user_pipelines">
<code class="descname">tracked_user_pipelines</code><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.tracked_user_pipelines" title="Permalink to this definition"></a></dt>
<dd><p>Returns the user pipelines in this environment.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.user_pipeline">
<code class="descname">user_pipeline</code><span class="sig-paren">(</span><em>derived_pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.user_pipeline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.user_pipeline" title="Permalink to this definition"></a></dt>
<dd><p>Returns the user pipeline for the given derived pipeline.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.add_user_pipeline">
<code class="descname">add_user_pipeline</code><span class="sig-paren">(</span><em>user_pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.add_user_pipeline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.add_user_pipeline" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.add_derived_pipeline">
<code class="descname">add_derived_pipeline</code><span class="sig-paren">(</span><em>user_pipeline</em>, <em>derived_pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.add_derived_pipeline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.add_derived_pipeline" title="Permalink to this definition"></a></dt>
<dd><p>Adds the derived pipeline to the parent user pipeline.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_tracked_pipelines">
<code class="descname">evict_tracked_pipelines</code><span class="sig-paren">(</span><em>user_pipeline</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.evict_tracked_pipelines"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_tracked_pipelines" title="Permalink to this definition"></a></dt>
<dd><p>Evicts the user pipeline and its derived pipelines.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.pipeline_id_to_pipeline">
<code class="descname">pipeline_id_to_pipeline</code><span class="sig-paren">(</span><em>pid</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.pipeline_id_to_pipeline"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.pipeline_id_to_pipeline" title="Permalink to this definition"></a></dt>
<dd><p>Converts a pipeline id to a user pipeline.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.mark_pcollection_computed">
<code class="descname">mark_pcollection_computed</code><span class="sig-paren">(</span><em>pcolls</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.mark_pcollection_computed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.mark_pcollection_computed" title="Permalink to this definition"></a></dt>
<dd><p>Marks computation completeness for the given pcolls.</p>
<p>Interactive Beam can use this information to determine if a computation is
needed to introspect the data of any given PCollection.</p>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_computed_pcollections">
<code class="descname">evict_computed_pcollections</code><span class="sig-paren">(</span><em>pipeline=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.evict_computed_pcollections"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.evict_computed_pcollections" title="Permalink to this definition"></a></dt>
<dd><p>Evicts all computed PCollections for the given pipeline. If no pipeline
is specified, evicts for all pipelines.</p>
</dd></dl>
<dl class="attribute">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.computed_pcollections">
<code class="descname">computed_pcollections</code><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.computed_pcollections" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.load_jquery_with_datatable">
<code class="descname">load_jquery_with_datatable</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.load_jquery_with_datatable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.load_jquery_with_datatable" title="Permalink to this definition"></a></dt>
<dd><p>Loads common resources to enable jquery with datatable configured for
notebook frontends if necessary. If the resources have been loaded, NOOP.</p>
<p>A window.interactive_beam_jquery with datatable plugin configured can be
used in following notebook cells once this is invoked.</p>
<ol class="arabic simple">
<li>There should only be one jQuery imported.</li>
<li>Datatable needs to be imported after jQuery is loaded.</li>
<li>Imported jQuery is attached to window named as jquery[version].</li>
<li>The window attachment needs to happen at the end of import chain until
all jQuery plugins are set.</li>
</ol>
</dd></dl>
<dl class="method">
<dt id="apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.import_html_to_head">
<code class="descname">import_html_to_head</code><span class="sig-paren">(</span><em>html_hrefs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/runners/interactive/interactive_environment.html#InteractiveEnvironment.import_html_to_head"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.runners.interactive.interactive_environment.InteractiveEnvironment.import_html_to_head" title="Permalink to this definition"></a></dt>
<dd><p>Imports given external HTMLs (supported through webcomponents) into
the head of the document.</p>
<p>On load of webcomponentsjs, import given HTMLs. If HTML import is already
supported, skip loading webcomponentsjs.</p>
<p>No matter how many times an HTML import occurs in the document, only the
first occurrence really embeds the external HTML. In a notebook environment,
the body of the document is always changing due to cell [re-]execution,
deletion and re-ordering. Thus, HTML imports shouldn’t be put in the body
especially the output areas of notebook cells.</p>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="apache_beam.runners.interactive.interactive_runner.html" class="btn btn-neutral float-right" title="apache_beam.runners.interactive.interactive_runner module" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="apache_beam.runners.interactive.interactive_beam.html" class="btn btn-neutral float-left" title="apache_beam.runners.interactive.interactive_beam module" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>