You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by bc...@apache.org on 2016/06/14 00:41:37 UTC
[1/2] incubator-beam git commit: Fix AutoComplete example streaming
configuration
Repository: incubator-beam
Updated Branches:
refs/heads/master 915bc198d -> 522762452
Fix AutoComplete example streaming configuration
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/e60e3e6d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/e60e3e6d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/e60e3e6d
Branch: refs/heads/master
Commit: e60e3e6de85a022d4669333c544b0b86145d0d55
Parents: 915bc19
Author: Scott Wegner <sw...@google.com>
Authored: Mon Jun 13 11:05:00 2016 -0700
Committer: bchambers <bc...@google.com>
Committed: Mon Jun 13 17:17:22 2016 -0700
----------------------------------------------------------------------
.../java/org/apache/beam/examples/complete/AutoComplete.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/e60e3e6d/examples/java/src/main/java/org/apache/beam/examples/complete/AutoComplete.java
----------------------------------------------------------------------
diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/AutoComplete.java b/examples/java/src/main/java/org/apache/beam/examples/complete/AutoComplete.java
index ac8384b..d725e0a 100644
--- a/examples/java/src/main/java/org/apache/beam/examples/complete/AutoComplete.java
+++ b/examples/java/src/main/java/org/apache/beam/examples/complete/AutoComplete.java
@@ -31,6 +31,7 @@ import org.apache.beam.sdk.io.TextIO;
import org.apache.beam.sdk.options.Default;
import org.apache.beam.sdk.options.Description;
import org.apache.beam.sdk.options.PipelineOptionsFactory;
+import org.apache.beam.sdk.options.Validation;
import org.apache.beam.sdk.transforms.Count;
import org.apache.beam.sdk.transforms.DoFn;
import org.apache.beam.sdk.transforms.Filter;
@@ -416,6 +417,7 @@ public class AutoComplete {
*/
private static interface Options extends ExamplePubsubTopicOptions, ExampleBigQueryTableOptions {
@Description("Input text file")
+ @Validation.Required
String getInputFile();
void setInputFile(String value);
@@ -494,7 +496,9 @@ public class AutoComplete {
.to(tableRef)
.withSchema(FormatForBigquery.getSchema())
.withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_IF_NEEDED)
- .withWriteDisposition(BigQueryIO.Write.WriteDisposition.WRITE_TRUNCATE));
+ .withWriteDisposition(options.isStreaming()
+ ? BigQueryIO.Write.WriteDisposition.WRITE_APPEND
+ : BigQueryIO.Write.WriteDisposition.WRITE_TRUNCATE));
}
// Run the pipeline.
[2/2] incubator-beam git commit: This closes #445
Posted by bc...@apache.org.
This closes #445
Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/52276245
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/52276245
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/52276245
Branch: refs/heads/master
Commit: 5227624526334ef18dc2109978f309af2a7d3521
Parents: 915bc19 e60e3e6
Author: bchambers <bc...@google.com>
Authored: Mon Jun 13 17:17:27 2016 -0700
Committer: bchambers <bc...@google.com>
Committed: Mon Jun 13 17:17:27 2016 -0700
----------------------------------------------------------------------
.../java/org/apache/beam/examples/complete/AutoComplete.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------