Instantiate runner briefly in Pipeline

Today, some runners mutate the PipelineOptions in critical ways
when they are built, and BigQueryIO depends, during construction,
on options that are sometimes the subject of those mutations.

Changes to BigQueryIO and runners will likely fix this, but this
commit unbreaks a postcommit build.


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

Branch: refs/heads/gearpump-runner
Commit: 78b257237e3fa02d868c8a3a0ed898de4c59fd0b
Parents: 6d9b239
Author: Kenneth Knowles <[email protected]>
Authored: Mon May 1 09:57:06 2017 -0700
Committer: Kenneth Knowles <[email protected]>
Committed: Tue May 2 14:01:15 2017 -0700

----------------------------------------------------------------------
 sdks/java/core/src/main/java/org/apache/beam/sdk/Pipeline.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam/blob/78b25723/sdks/java/core/src/main/java/org/apache/beam/sdk/Pipeline.java
----------------------------------------------------------------------
diff --git a/sdks/java/core/src/main/java/org/apache/beam/sdk/Pipeline.java 
b/sdks/java/core/src/main/java/org/apache/beam/sdk/Pipeline.java
index d4c46cc..ab8906a 100644
--- a/sdks/java/core/src/main/java/org/apache/beam/sdk/Pipeline.java
+++ b/sdks/java/core/src/main/java/org/apache/beam/sdk/Pipeline.java
@@ -148,6 +148,9 @@ public class Pipeline {
    * @return The newly created pipeline.
    */
   public static Pipeline create(PipelineOptions options) {
+    // TODO: fix runners that mutate PipelineOptions in this method, then 
remove this line
+    PipelineRunner.fromOptions(options);
+
     Pipeline pipeline = new Pipeline(options);
     LOG.debug("Creating {}", pipeline);
     return pipeline;

Reply via email to