You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/03/22 21:55:28 UTC

[GitHub] [beam] boyuanzz commented on a change in pull request #14297: [BEAM-12021] Add Pubsub overrides before portable proto translation in Dataflow

boyuanzz commented on a change in pull request #14297:
URL: https://github.com/apache/beam/pull/14297#discussion_r599098960



##########
File path: runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java
##########
@@ -454,6 +454,17 @@ protected DataflowRunner(DataflowPipelineOptions options) {
     this.ptransformViewsWithNonDeterministicKeyCoders = new HashSet<>();
   }
 
+  /** For portable jobs, Dataflow still requires an override of the PubsubIO transforms. */
+  private List<PTransformOverride> getPortableOverrides() {
+    return ImmutableList.of(
+        PTransformOverride.of(

Review comment:
       We should also check `hasExperiment(options, "enable_custom_pubsub_source")`

##########
File path: runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java
##########
@@ -454,6 +454,17 @@ protected DataflowRunner(DataflowPipelineOptions options) {
     this.ptransformViewsWithNonDeterministicKeyCoders = new HashSet<>();
   }
 
+  /** For portable jobs, Dataflow still requires an override of the PubsubIO transforms. */
+  private List<PTransformOverride> getPortableOverrides() {
+    return ImmutableList.of(
+        PTransformOverride.of(
+            PTransformMatchers.classEqualTo(PubsubUnboundedSource.class),
+            new DataflowReadFromPubsubSourceForRunnerV2OverrideFactory()),
+        PTransformOverride.of(

Review comment:
       We should also check `hasExperiment(options, "enable_custom_pubsub_sink")`




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org