beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhalp...@apache.org
Subject [1/2] incubator-beam git commit: [BEAM-433] Remove references to DataflowPipelineOptions
Date Wed, 27 Jul 2016 21:33:10 GMT
Repository: incubator-beam
Updated Branches:
  refs/heads/master 2cbac53c5 -> c6e748c09


[BEAM-433] Remove references to DataflowPipelineOptions


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

Branch: refs/heads/master
Commit: c11ebf70a9749f5099c1e0cd55bd6f0da40a8402
Parents: 2cbac53
Author: Pei He <peihe@google.com>
Authored: Wed Jul 27 12:29:44 2016 -0700
Committer: Dan Halperin <dhalperi@google.com>
Committed: Wed Jul 27 14:33:04 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/beam/examples/common/PubsubFileInjector.java | 4 ++--
 .../org/apache/beam/examples/complete/TopWikipediaSessions.java  | 4 +---
 2 files changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/c11ebf70/examples/java/src/main/java/org/apache/beam/examples/common/PubsubFileInjector.java
----------------------------------------------------------------------
diff --git a/examples/java/src/main/java/org/apache/beam/examples/common/PubsubFileInjector.java
b/examples/java/src/main/java/org/apache/beam/examples/common/PubsubFileInjector.java
index 82d58b6..15eda06 100644
--- a/examples/java/src/main/java/org/apache/beam/examples/common/PubsubFileInjector.java
+++ b/examples/java/src/main/java/org/apache/beam/examples/common/PubsubFileInjector.java
@@ -17,12 +17,12 @@
  */
 package org.apache.beam.examples.common;
 
-import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions;
 import org.apache.beam.sdk.Pipeline;
 import org.apache.beam.sdk.io.TextIO;
 import org.apache.beam.sdk.options.Description;
 import org.apache.beam.sdk.options.PipelineOptions;
 import org.apache.beam.sdk.options.PipelineOptionsFactory;
+import org.apache.beam.sdk.options.PubsubOptions;
 import org.apache.beam.sdk.options.Validation;
 import org.apache.beam.sdk.transforms.DoFn;
 import org.apache.beam.sdk.transforms.IntraBundleParallelization;
@@ -85,7 +85,7 @@ public class PubsubFileInjector {
     @Override
     public void startBundle(Context context) {
       this.pubsub =
-          Transport.newPubsubClient(context.getPipelineOptions().as(DataflowPipelineOptions.class))
+          Transport.newPubsubClient(context.getPipelineOptions().as(PubsubOptions.class))
               .build();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/c11ebf70/examples/java/src/main/java/org/apache/beam/examples/complete/TopWikipediaSessions.java
----------------------------------------------------------------------
diff --git a/examples/java/src/main/java/org/apache/beam/examples/complete/TopWikipediaSessions.java
b/examples/java/src/main/java/org/apache/beam/examples/complete/TopWikipediaSessions.java
index 80b3ade..f8af02a 100644
--- a/examples/java/src/main/java/org/apache/beam/examples/complete/TopWikipediaSessions.java
+++ b/examples/java/src/main/java/org/apache/beam/examples/complete/TopWikipediaSessions.java
@@ -17,7 +17,6 @@
  */
 package org.apache.beam.examples.complete;
 
-import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions;
 import org.apache.beam.sdk.Pipeline;
 import org.apache.beam.sdk.coders.TableRowJsonCoder;
 import org.apache.beam.sdk.io.TextIO;
@@ -207,9 +206,8 @@ public class TopWikipediaSessions {
     Options options = PipelineOptionsFactory.fromArgs(args)
         .withValidation()
         .as(Options.class);
-    DataflowPipelineOptions dataflowOptions = options.as(DataflowPipelineOptions.class);
 
-    Pipeline p = Pipeline.create(dataflowOptions);
+    Pipeline p = Pipeline.create(options);
 
     double samplingThreshold = 0.1;
 


Mime
View raw message