From 1f78f64026e26a714f0d4c22a48c676591782d6f Mon Sep 17 00:00:00 2001 From: sberyozkin Date: Wed, 24 May 2017 21:27:21 +0100 Subject: [PATCH 1/2] TikaIO JIRA number fix --- src/documentation/io/built-in.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/documentation/io/built-in.md b/src/documentation/io/built-in.md index 3bb53430d03..cdc57ae03ee 100644 --- a/src/documentation/io/built-in.md +++ b/src/documentation/io/built-in.md @@ -124,4 +124,8 @@ This table contains I/O transforms that are currently planned or in-progress. St RestIOJava BEAM-1946 + + TikaIOJava + BEAM-2328 + From 047a2107bdfacb5c2d89241c874ce033391e579a Mon Sep 17 00:00:00 2001 From: Ahmet Altay Date: Wed, 24 May 2017 16:16:00 -0700 Subject: [PATCH 2/2] Regenerate website --- content/documentation/io/built-in/index.html | 4 ++++ .../programming-guide/index.html | 22 +++++++++---------- .../sdks/python-custom-io/index.html | 20 ++++++++--------- .../sdks/python-type-safety/index.html | 1 - .../get-started/wordcount-example/index.html | 2 +- 5 files changed, 26 insertions(+), 23 deletions(-) diff --git a/content/documentation/io/built-in/index.html b/content/documentation/io/built-in/index.html index 79e47f741cf..6b3de1b29b8 100644 --- a/content/documentation/io/built-in/index.html +++ b/content/documentation/io/built-in/index.html @@ -255,6 +255,10 @@

In-Progress I/O Transforms

RestIOJava BEAM-1946 + + TikaIOJava + BEAM-2328 + diff --git a/content/documentation/programming-guide/index.html b/content/documentation/programming-guide/index.html index 56b54812d1e..7b27b37fc24 100644 --- a/content/documentation/programming-guide/index.html +++ b/content/documentation/programming-guide/index.html @@ -402,14 +402,14 @@

Creating a PCollection from -
p = beam.Pipeline(options=pipeline_options)
+
with beam.Pipeline(options=pipeline_options) as p:
 
-lines = (p
-         | beam.Create([
-             'To be, or not to be: that is the question: ',
-             'Whether \'tis nobler in the mind to suffer ',
-             'The slings and arrows of outrageous fortune, ',
-             'Or to take arms against a sea of troubles, ']))
+  lines = (p
+           | beam.Create([
+               'To be, or not to be: that is the question: ',
+               'Whether \'tis nobler in the mind to suffer ',
+               'The slings and arrows of outrageous fortune, ',
+               'Or to take arms against a sea of troubles, ']))
 
 
@@ -1128,10 +1128,10 @@
Passing side inputs to ParDo:
lower_bound=pvalue.AsSingleton(avg_word_len))) # Mix and match. -small_but_nontrivial = words | beam.FlatMap(filter_using_length, - lower_bound=2, - upper_bound=pvalue.AsSingleton( - avg_word_len)) +small_but_nontrivial = words | beam.FlatMap( + filter_using_length, + lower_bound=2, + upper_bound=pvalue.AsSingleton(avg_word_len)) # We can also pass side inputs to a ParDo transform, which will get passed to its process method. diff --git a/content/documentation/sdks/python-custom-io/index.html b/content/documentation/sdks/python-custom-io/index.html index d6eb9f225c2..2952ea487d8 100644 --- a/content/documentation/sdks/python-custom-io/index.html +++ b/content/documentation/sdks/python-custom-io/index.html @@ -368,8 +368,8 @@

Read transform:

-
p = beam.Pipeline(options=PipelineOptions())
-numbers = p | 'ProduceNumbers' >> beam.io.Read(CountingSource(count))
+
with beam.Pipeline(options=PipelineOptions()) as p:
+  numbers = p | 'ProduceNumbers' >> beam.io.Read(CountingSource(count))
 
@@ -512,11 +512,11 @@

W

The following code demonstrates how to write to the sink using the Write transform.

-
p = beam.Pipeline(options=PipelineOptions())
-kvs = p | 'CreateKVs' >> beam.Create(KVs)
+
with beam.Pipeline(options=PipelineOptions()) as p:
+  kvs = p | 'CreateKVs' >> beam.Create(KVs)
 
-kvs | 'WriteToSimpleKV' >> beam.io.Write(
-    SimpleKVSink('http://url_to_simple_kv/', final_table_name))
+  kvs | 'WriteToSimpleKV' >> beam.io.Write(
+      SimpleKVSink('http://url_to_simple_kv/', final_table_name))
 
@@ -569,10 +569,10 @@

p = beam.Pipeline(options=PipelineOptions())
-kvs = p | 'CreateKVs' >> beam.core.Create(KVs)
-kvs | 'WriteToSimpleKV' >> WriteToKVSink(
-    'http://url_to_simple_kv/', final_table_name)
+
with beam.Pipeline(options=PipelineOptions()) as p:
+  kvs = p | 'CreateKVs' >> beam.core.Create(KVs)
+  kvs | 'WriteToSimpleKV' >> WriteToKVSink(
+      'http://url_to_simple_kv/', final_table_name)
 
diff --git a/content/documentation/sdks/python-type-safety/index.html b/content/documentation/sdks/python-type-safety/index.html index 47395b2d020..53359ea7bc6 100644 --- a/content/documentation/sdks/python-type-safety/index.html +++ b/content/documentation/sdks/python-type-safety/index.html @@ -264,7 +264,6 @@

Runtime Type Checking

For example, the following code would pass at both pipeline construction and runtime.

p | beam.Create(['a']) | beam.Map(lambda x: 3).with_output_types(str)
-p.run()
 
diff --git a/content/get-started/wordcount-example/index.html b/content/get-started/wordcount-example/index.html index c73e22b8102..e4efeb7a193 100644 --- a/content/get-started/wordcount-example/index.html +++ b/content/get-started/wordcount-example/index.html @@ -491,7 +491,7 @@

Using Parameterizable PipelineOpt default='gs://my-bucket/input') options = PipelineOptions(argv) -p = beam.Pipeline(options=options) +with beam.Pipeline(options=options) as p: