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

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

                Author: ASF GitHub Bot
            Created on: 17/Aug/20 17:56
            Start Date: 17/Aug/20 17:56
    Worklog Time Spent: 10m 
      Work Description: ibzib commented on a change in pull request #12157:
URL: https://github.com/apache/beam/pull/12157#discussion_r471663049



##########
File path: 
runners/spark/src/main/java/org/apache/beam/runners/spark/translation/SparkStreamingTranslationContext.java
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.beam.runners.spark.translation;
+
+import org.apache.beam.runners.fnexecution.provisioning.JobInfo;
+import org.apache.beam.runners.spark.SparkPipelineOptions;
+import org.apache.spark.api.java.JavaSparkContext;
+import org.apache.spark.streaming.Duration;
+import org.apache.spark.streaming.api.java.JavaStreamingContext;
+import org.joda.time.Instant;
+
+/**
+ * Translation context used to lazily store Spark data sets during portable 
pipeline translation and
+ * compute them after translation.
+ */
+public class SparkStreamingTranslationContext extends SparkTranslationContext {
+  private final JavaStreamingContext streamingContext;
+  private final Instant firstTimestamp;
+
+  public SparkStreamingTranslationContext(
+      JavaSparkContext jsc, SparkPipelineOptions options, JobInfo jobInfo) {
+    super(jsc, options, jobInfo);
+    Duration batchDuration = new Duration(options.getBatchIntervalMillis());
+    this.streamingContext = new JavaStreamingContext(jsc, batchDuration);
+    this.firstTimestamp = new Instant();
+  }
+
+  public JavaStreamingContext getStreamingContext() {

Review comment:
       Ah okay. Disregard then.




----------------------------------------------------------------
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: 471588)
    Time Spent: 3h  (was: 2h 50m)

> Spark portable runner: Streaming mode
> -------------------------------------
>
>                 Key: BEAM-7587
>                 URL: https://issues.apache.org/jira/browse/BEAM-7587
>             Project: Beam
>          Issue Type: Wish
>          Components: runner-spark
>            Reporter: Kyle Weaver
>            Assignee: Anna Qin
>            Priority: P2
>              Labels: portability-spark
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> So far all work on the Spark portable runner has been in batch mode. This is 
> intended as an uber-issue for tracking progress on adding support for 
> streaming.
> -It might be advantageous to wait for the structured streaming (non-portable) 
> runner to be completed (to some reasonable extent) before undertaking this, 
> rather than using the DStream API.- Since work on the structured streaming 
> runner is blocked by SPARK-26655, we should implement this using DStreams 
> instead.



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

Reply via email to