This is an automated email from the ASF dual-hosted git repository. git-site-role pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/asf-site by this push: new 69367b6 Publishing website 2020/01/17 00:32:51 at commit ce797f0 69367b6 is described below commit 69367b6b83d5adb8d0e42b7c559784c418fc1487 Author: jenkins <bui...@apache.org> AuthorDate: Fri Jan 17 00:32:52 2020 +0000 Publishing website 2020/01/17 00:32:51 at commit ce797f0 --- .../io/developing-io-python/index.html | 4 ++-- .../patterns/pipeline-options/index.html | 23 +++++++++++----------- .../documentation/programming-guide/index.html | 6 ++++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/website/generated-content/documentation/io/developing-io-python/index.html b/website/generated-content/documentation/io/developing-io-python/index.html index d31e664..4131c08 100644 --- a/website/generated-content/documentation/io/developing-io-python/index.html +++ b/website/generated-content/documentation/io/developing-io-python/index.html @@ -827,8 +827,8 @@ to <code class="highlighter-rouge">_CountingSource</code>. Then, create the wrap <p>Finally, read from the source:</p> -<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>p = beam.Pipeline(options=PipelineOptions()) -numbers = p | 'ProduceNumbers' >> ReadFromCountingSource(count) +<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>with beam.Pipeline(options=PipelineOptions()) as p: + numbers = p | 'ProduceNumbers' >> ReadFromCountingSource(count) </code></pre></div></div> <p>For the sink, rename <code class="highlighter-rouge">SimpleKVSink</code> to <code class="highlighter-rouge">_SimpleKVSink</code>. Then, create the wrapper <code class="highlighter-rouge">PTransform</code>, called <code class="highlighter-rouge">WriteToKVSink</code>:</p> diff --git a/website/generated-content/documentation/patterns/pipeline-options/index.html b/website/generated-content/documentation/patterns/pipeline-options/index.html index 5f9bd01..57b3186 100644 --- a/website/generated-content/documentation/patterns/pipeline-options/index.html +++ b/website/generated-content/documentation/patterns/pipeline-options/index.html @@ -571,21 +571,20 @@ limitations under the License. <span class="n">pipeline_options</span> <span class="o">=</span> <span class="n">PipelineOptions</span><span class="p">()</span> <span class="c"># Create pipeline.</span> -<span class="n">p</span> <span class="o">=</span> <span class="n">beam</span><span class="o">.</span><span class="n">Pipeline</span><span class="p">(</span><span class="n">options</span><span class="o">=</span><span class="n">pipeline_options</span><span class="p">)</span> +<span class="k">with</span> <span class="n">beam</span><span class="o">.</span><span class="n">Pipeline</span><span class="p">(</span><span class="n">options</span><span class="o">=</span><span class="n">pipeline_options</span><span class="p">)</span> <span class="k">as</span> <span class="n">p</span><span class="p">:</span> -<span class="n">my_options</span> <span class="o">=</span> <span class="n">pipeline_options</span><span class="o">.</span><span class="n">view_as</span><span class="p">(</span><span class="n">MyOptions</span><span class="p">)</span> -<span class="c"># Add a branch for logging the ValueProvider value.</span> -<span class="n">_</span> <span class="o">=</span> <span class="p">(</span><span class="n">p</span> - <span class="o">|</span> <span class="n">beam</span><span class="o">.</span><span class="n">Create</span><span class="p">([</span><span class="bp">None</span><span class="p">])</span> - <span class="o">|</span> <span class="s">'LogValueProvs'</span> <span class="o">>></span> <span class="n">beam</span><span class="o">.</span><span class="n">ParDo</span><span class="p">(</span> - <span class="n">LogValueProvidersFn</span><span class="p">(</span><span class="n">my_options</span><span class="o">.</span><span class="n">string_value</span><span class="p">)))</span> + <span class="n">my_options</span> <span class="o">=</span> <span class="n">pipeline_options</span><span class="o">.</span><span class="n">view_as</span><span class="p">(</span><span class="n">MyOptions</span><span class="p">)</span> + <span class="c"># Add a branch for logging the ValueProvider value.</span> + <span class="n">_</span> <span class="o">=</span> <span class="p">(</span><span class="n">p</span> + <span class="o">|</span> <span class="n">beam</span><span class="o">.</span><span class="n">Create</span><span class="p">([</span><span class="bp">None</span><span class="p">])</span> + <span class="o">|</span> <span class="s">'LogValueProvs'</span> <span class="o">>></span> <span class="n">beam</span><span class="o">.</span><span class="n">ParDo</span><span class="p">(</span> + <span class="n">LogValueProvidersFn</span><span class="p">(</span><span class="n">my_options</span><span class="o">.</span><span class="n">string_value</span><span class="p">)))</span> -<span class="c"># The main pipeline.</span> -<span class="n">result_pc</span> <span class="o">=</span> <span class="p">(</span><span class="n">p</span> - <span class="o">|</span> <span class="s">"main_pc"</span> <span class="o">>></span> <span class="n">beam</span><span class="o">.</span><span class="n">Create</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">])</span> - <span class="o">|</span> <span class="n">beam</span><span class="o">.</span><span class="n">combiners</span><span class="o">.</span><span class="n">Sum</span><span class="o">.</span><span class="n">Globally</span><span class="p">())</span> + <span class="c"># The main pipeline.</span> + <span class="n">result_pc</span> <span class="o">=</span> <span class="p">(</span><span class="n">p</span> + <span class="o">|</span> <span class="s">"main_pc"</span> <span class="o">>></span> <span class="n">beam</span><span class="o">.</span><span class="n">Create</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">])</span> + <span class="o">|</span> <span class="n">beam</span><span class="o">.</span><span class="n">combiners</span><span class="o">.</span><span class="n">Sum</span><span class="o">.</span><span class="n">Globally</span><span class="p">())</span> -<span class="n">p</span><span class="o">.</span><span class="n">run</span><span class="p">()</span><span class="o">.</span><span class="n">wait_until_finish</span><span class="p">()</span> </code></pre></div></div> diff --git a/website/generated-content/documentation/programming-guide/index.html b/website/generated-content/documentation/programming-guide/index.html index 964db7c..382a16b 100644 --- a/website/generated-content/documentation/programming-guide/index.html +++ b/website/generated-content/documentation/programming-guide/index.html @@ -660,7 +660,8 @@ to the <code class="highlighter-rouge">Pipeline</code> object when you create th <div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">import</span> <span class="nn">apache_beam</span> <span class="k">as</span> <span class="n">beam</span> <span class="kn">from</span> <span class="nn">apache_beam.options.pipeline_options</span> <span class="kn">import</span> <span class="n">PipelineOptions</span> -<span class="n">p</span> <span class="o">=</span> <span class="n">beam</span><span class="o">.</span><span class="n">Pipeline</span><span class="p">(</span><span class="n">options</span><span class="o">=</span><span class="n">PipelineOptions</span><span class="p">())</span> +<span class="k">with</span> <span class="n">beam</span><span class="o">.</span><span class="n">Pipeline</span><span class="p">(</span><span class="n">options</span><span class="o">=</span><span class="n">PipelineOptions</span><span class="p">())</span> <span class="k">as</span> <span class="n">p</span><span class="p">:</span> + <span class="k">pass</span> <span class="c"># build your pipeline here</span> </code></pre></div></div> <div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">// In order to start creating the pipeline for execution, a Pipeline object and a Scope object are needed.</span><span class="x"> @@ -694,7 +695,8 @@ as demonstrated in the following example code:</p> <div class="language-py highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">import</span> <span class="nn">apache_beam</span> <span class="k">as</span> <span class="n">beam</span> <span class="kn">from</span> <span class="nn">apache_beam.options.pipeline_options</span> <span class="kn">import</span> <span class="n">PipelineOptions</span> -<span class="n">p</span> <span class="o">=</span> <span class="n">beam</span><span class="o">.</span><span class="n">Pipeline</span><span class="p">(</span><span class="n">options</span><span class="o">=</span><span class="n">PipelineOptions</span><span class="p">())</span> +<span class="k">with</span> <span class="n">beam</span><span class="o">.</span><span class="n">Pipeline</span><span class="p">(</span><span class="n">options</span><span class="o">=</span><span class="n">PipelineOptions</span><span class="p">())</span> <span class="k">as</span> <span class="n">p</span><span class="p">:</span> + <span class="k">pass</span> <span class="c"># build your pipeline here</span> </code></pre></div></div> <div class="language-go highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="c">// If beamx or Go flags are used, flags must be parsed first.</span><span class="x">