[ 
https://issues.apache.org/jira/browse/BEAM-10670?focusedWorklogId=496123&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-496123
 ]

ASF GitHub Bot logged work on BEAM-10670:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Oct/20 19:18
            Start Date: 06/Oct/20 19:18
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on a change in pull request #13018:
URL: https://github.com/apache/beam/pull/13018#discussion_r500538346



##########
File path: 
runners/spark/src/main/java/org/apache/beam/runners/spark/translation/streaming/StreamingTransformTranslator.java
##########
@@ -115,6 +119,31 @@ public String toNativeString() {
     };
   }
 
+  private static TransformEvaluator<Impulse> impulse() {
+    return new TransformEvaluator<Impulse>() {
+      @Override
+      public void evaluate(Impulse transform, EvaluationContext context) {
+        ClassTag<WindowedValue<byte[]>> classTag = 
ClassTag$.MODULE$.apply(WindowedValue.class);
+        JavaRDD<WindowedValue<byte[]>> rdd =
+            context
+                .getSparkContext()
+                .parallelize(
+                    
Collections.singletonList(WindowedValue.valueInGlobalWindow(new byte[0])));
+        ConstantInputDStream<WindowedValue<byte[]>> inputStream =
+            new ConstantInputDStream<>(context.getStreamingContext().ssc(), 
rdd.rdd(), classTag);
+        JavaDStream<WindowedValue<byte[]>> stream = new 
JavaDStream<>(inputStream, classTag);
+        UnboundedDataset<byte[]> output =
+            new UnboundedDataset<>(stream, 
Collections.singletonList(inputStream.id()));
+        context.putDataset(transform, output);
+      }
+
+      @Override
+      public String toNativeString() {
+        return "sparkContext.<impulse>()";

Review comment:
       s/sparkContext/streamingContext just for convention. I applied this 
change on merge.




----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 496123)
    Time Spent: 29.5h  (was: 29h 20m)

> Make non-portable Splittable DoFn the only option when executing Java "Read" 
> transforms
> ---------------------------------------------------------------------------------------
>
>                 Key: BEAM-10670
>                 URL: https://issues.apache.org/jira/browse/BEAM-10670
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Luke Cwik
>            Assignee: Luke Cwik
>            Priority: P2
>          Time Spent: 29.5h
>  Remaining Estimate: 0h
>
> All runners seem to be capable of migrating to splittable DoFn for 
> non-portable execution except for Dataflow runner v1 which will internalize 
> the current primitive read implementation that is shared across runner 
> implementations.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to