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



##########
File path: 
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java
##########
@@ -1454,6 +1480,37 @@ protected String getKindString() {
     }
   }
 
+  private static class DataflowReadFromPubsubForRunnerV2
+      extends PTransform<PBegin, PCollection<PubsubMessage>> {
+
+    private final PubsubUnboundedSource transform;
+
+    public DataflowReadFromPubsubForRunnerV2(PubsubUnboundedSource transform) {
+      this.transform = transform;
+    }
+
+    PubsubUnboundedSource getOverriddenTransform() {
+      return this.transform;
+    }
+
+    @Override
+    public PCollection<PubsubMessage> expand(PBegin input) {
+      Coder coder = PubsubMessageProtoCoder.of();

Review comment:
       I would image the expansion here looks like: 
   ```java
   return input.apply(new DataflowPubSubSourceRunnerv2())
   .apply(MapElements() {bytes -> new PubSubMessage()})
   ```




----------------------------------------------------------------
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:
[email protected]


Reply via email to