You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2017/04/18 22:43:16 UTC

[1/3] beam-site git commit: [BEAM-1949] Doc changes for Python SideOutputValue to OutputValue rename

Repository: beam-site
Updated Branches:
  refs/heads/asf-site 64b7bca76 -> 9511ebfe8


[BEAM-1949] Doc changes for Python SideOutputValue to OutputValue rename


Project: http://git-wip-us.apache.org/repos/asf/beam-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam-site/commit/679ed218
Tree: http://git-wip-us.apache.org/repos/asf/beam-site/tree/679ed218
Diff: http://git-wip-us.apache.org/repos/asf/beam-site/diff/679ed218

Branch: refs/heads/asf-site
Commit: 679ed218ae81841baba25e1228cc546f00a05c21
Parents: 64b7bca
Author: melissa <me...@google.com>
Authored: Tue Apr 18 11:36:42 2017 -0700
Committer: Davor Bonaci <da...@google.com>
Committed: Tue Apr 18 15:42:35 2017 -0700

----------------------------------------------------------------------
 src/documentation/programming-guide.md | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam-site/blob/679ed218/src/documentation/programming-guide.md
----------------------------------------------------------------------
diff --git a/src/documentation/programming-guide.md b/src/documentation/programming-guide.md
index 4b9f960..2e10884 100644
--- a/src/documentation/programming-guide.md
+++ b/src/documentation/programming-guide.md
@@ -889,16 +889,16 @@ While `ParDo` always produces a main output `PCollection` (as the return value f
 ```
 
 ```py
-# To emit elements to a side output PCollection, invoke with_outputs() on the ParDo, optionally specifying the expected tags for the output.
+# To emit elements to multiple output PCollections, invoke with_outputs() on the ParDo, and specify the expected tags for the outputs.
 # with_outputs() returns a DoOutputsTuple object. Tags specified in with_outputs are attributes on the returned DoOutputsTuple object.
 # The tags give access to the corresponding output PCollections.
 
-{% github_sample /apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py tag:model_pardo_with_side_outputs
+{% github_sample /apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py tag:model_pardo_with_tagged_outputs
 %}
 
 # The result is also iterable, ordered in the same order that the tags were passed to with_outputs(), the main tag (if specified) first.
 
-{% github_sample /apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py tag:model_pardo_with_side_outputs_iter
+{% github_sample /apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py tag:model_pardo_with_tagged_outputs_iter
 %}```
 
 ##### Emitting to multiple outputs in your DoFn:
@@ -928,17 +928,17 @@ While `ParDo` always produces a main output `PCollection` (as the return value f
 ```
 
 ```py
-# Inside your ParDo's DoFn, you can emit an element to a side output by wrapping the value and the output tag (str).
-# using the pvalue.SideOutputValue wrapper class.
-# Based on the previous example, this shows the DoFn emitting to the main and side outputs.
+# Inside your ParDo's DoFn, you can emit an element to a specific output by wrapping the value and the output tag (str).
+# using the pvalue.OutputValue wrapper class.
+# Based on the previous example, this shows the DoFn emitting to the main output and two additional outputs.
 
-{% github_sample /apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py tag:model_pardo_emitting_values_on_side_outputs
+{% github_sample /apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py tag:model_pardo_emitting_values_on_tagged_outputs
 %}
 
-# Side outputs are also available in Map and FlatMap.
+# Producing multiple outputs is also available in Map and FlatMap.
 # Here is an example that uses FlatMap and shows that the tags do not need to be specified ahead of time.
 
-{% github_sample /apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py tag:model_pardo_with_side_outputs_undeclared
+{% github_sample /apache/beam/blob/master/sdks/python/apache_beam/examples/snippets/snippets_test.py tag:model_pardo_with_undeclared_outputs
 %}```
 
 ## <a name="transforms-composite"></a>Composite Transforms


[3/3] beam-site git commit: This closes #214

Posted by da...@apache.org.
This closes #214


Project: http://git-wip-us.apache.org/repos/asf/beam-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam-site/commit/9511ebfe
Tree: http://git-wip-us.apache.org/repos/asf/beam-site/tree/9511ebfe
Diff: http://git-wip-us.apache.org/repos/asf/beam-site/diff/9511ebfe

Branch: refs/heads/asf-site
Commit: 9511ebfe830277da475c3754daac577d1b9f7f34
Parents: 64b7bca 031683d
Author: Davor Bonaci <da...@google.com>
Authored: Tue Apr 18 15:42:59 2017 -0700
Committer: Davor Bonaci <da...@google.com>
Committed: Tue Apr 18 15:42:59 2017 -0700

----------------------------------------------------------------------
 .../documentation/programming-guide/index.html  | 20 ++++++++++----------
 src/documentation/programming-guide.md          | 18 +++++++++---------
 2 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------



[2/3] beam-site git commit: Regenerate website

Posted by da...@apache.org.
Regenerate website


Project: http://git-wip-us.apache.org/repos/asf/beam-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam-site/commit/031683d3
Tree: http://git-wip-us.apache.org/repos/asf/beam-site/tree/031683d3
Diff: http://git-wip-us.apache.org/repos/asf/beam-site/diff/031683d3

Branch: refs/heads/asf-site
Commit: 031683d36dd6802aa807540de0c73f6f3c149de8
Parents: 679ed21
Author: Davor Bonaci <da...@google.com>
Authored: Tue Apr 18 15:42:58 2017 -0700
Committer: Davor Bonaci <da...@google.com>
Committed: Tue Apr 18 15:42:58 2017 -0700

----------------------------------------------------------------------
 .../documentation/programming-guide/index.html  | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam-site/blob/031683d3/content/documentation/programming-guide/index.html
----------------------------------------------------------------------
diff --git a/content/documentation/programming-guide/index.html b/content/documentation/programming-guide/index.html
index d7b1253..edb184b 100644
--- a/content/documentation/programming-guide/index.html
+++ b/content/documentation/programming-guide/index.html
@@ -1156,7 +1156,7 @@ guest, [[], [order4]]
 </code></pre>
 </div>
 
-<div class="language-py highlighter-rouge"><pre class="highlight"><code><span class="c"># To emit elements to a side output PCollection, invoke with_outputs() on the ParDo, optionally specifying the expected tags for the output.</span>
+<div class="language-py highlighter-rouge"><pre class="highlight"><code><span class="c"># To emit elements to multiple output PCollections, invoke with_outputs() on the ParDo, and specify the expected tags for the outputs.</span>
 <span class="c"># with_outputs() returns a DoOutputsTuple object. Tags specified in with_outputs are attributes on the returned DoOutputsTuple object.</span>
 <span class="c"># The tags give access to the corresponding output PCollections.</span>
 
@@ -1205,9 +1205,9 @@ guest, [[], [order4]]
 </code></pre>
 </div>
 
-<div class="language-py highlighter-rouge"><pre class="highlight"><code><span class="c"># Inside your ParDo's DoFn, you can emit an element to a side output by wrapping the value and the output tag (str).</span>
-<span class="c"># using the pvalue.SideOutputValue wrapper class.</span>
-<span class="c"># Based on the previous example, this shows the DoFn emitting to the main and side outputs.</span>
+<div class="language-py highlighter-rouge"><pre class="highlight"><code><span class="c"># Inside your ParDo's DoFn, you can emit an element to a specific output by wrapping the value and the output tag (str).</span>
+<span class="c"># using the pvalue.OutputValue wrapper class.</span>
+<span class="c"># Based on the previous example, this shows the DoFn emitting to the main output and two additional outputs.</span>
 
 <span class="k">class</span> <span class="nc">ProcessWords</span><span class="p">(</span><span class="n">beam</span><span class="o">.</span><span class="n">DoFn</span><span class="p">):</span>
 
@@ -1216,19 +1216,19 @@ guest, [[], [order4]]
       <span class="c"># Emit this short word to the main output.</span>
       <span class="k">yield</span> <span class="n">element</span>
     <span class="k">else</span><span class="p">:</span>
-      <span class="c"># Emit this word's long length to a side output.</span>
-      <span class="k">yield</span> <span class="n">pvalue</span><span class="o">.</span><span class="n">SideOutputValue</span><span class="p">(</span>
+      <span class="c"># Emit this word's long length to the 'above_cutoff_lengths' output.</span>
+      <span class="k">yield</span> <span class="n">pvalue</span><span class="o">.</span><span class="n">OutputValue</span><span class="p">(</span>
           <span class="s">'above_cutoff_lengths'</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">element</span><span class="p">))</span>
     <span class="k">if</span> <span class="n">element</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="n">marker</span><span class="p">):</span>
-      <span class="c"># Emit this word to a different side output.</span>
-      <span class="k">yield</span> <span class="n">pvalue</span><span class="o">.</span><span class="n">SideOutputValue</span><span class="p">(</span><span class="s">'marked strings'</span><span class="p">,</span> <span class="n">element</span><span class="p">)</span>
+      <span class="c"># Emit this word to a different output with the 'marked strings' tag.</span>
+      <span class="k">yield</span> <span class="n">pvalue</span><span class="o">.</span><span class="n">OutputValue</span><span class="p">(</span><span class="s">'marked strings'</span><span class="p">,</span> <span class="n">element</span><span class="p">)</span>
 
 
-<span class="c"># Side outputs are also available in Map and FlatMap.</span>
+<span class="c"># Producing multiple outputs is also available in Map and FlatMap.</span>
 <span class="c"># Here is an example that uses FlatMap and shows that the tags do not need to be specified ahead of time.</span>
 
 <span class="k">def</span> <span class="nf">even_odd</span><span class="p">(</span><span class="n">x</span><span class="p">):</span>
-  <span class="k">yield</span> <span class="n">pvalue</span><span class="o">.</span><span class="n">SideOutputValue</span><span class="p">(</span><span class="s">'odd'</span> <span class="k">if</span> <span class="n">x</span> <span class="o">%</span> <span class="mi">2</span> <span class="k">else</span> <span class="s">'even'</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span>
+  <span class="k">yield</span> <span class="n">pvalue</span><span class="o">.</span><span class="n">OutputValue</span><span class="p">(</span><span class="s">'odd'</span> <span class="k">if</span> <span class="n">x</span> <span class="o">%</span> <span class="mi">2</span> <span class="k">else</span> <span class="s">'even'</span><span class="p">,</span> <span class="n">x</span><span class="p">)</span>
   <span class="k">if</span> <span class="n">x</span> <span class="o">%</span> <span class="mi">10</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
     <span class="k">yield</span> <span class="n">x</span>