You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Amit Sela (JIRA)" <ji...@apache.org> on 2017/01/10 17:36:58 UTC
[jira] [Created] (BEAM-1256) SparkPipelineResult.StreamingMode
should not return null on awaitTermination()
Amit Sela created BEAM-1256:
-------------------------------
Summary: SparkPipelineResult.StreamingMode should not return null on awaitTermination()
Key: BEAM-1256
URL: https://issues.apache.org/jira/browse/BEAM-1256
Project: Beam
Issue Type: Bug
Components: runner-spark
Reporter: Amit Sela
Assignee: Amit Sela
Priority: Minor
Currently, {{SparkPipelineResult.StreamingMode}} will return {{null}} if {{JavaStreamingContext#awaitTerminationOrTimeout(Long)}} returns {{false}}.
This is wrong because this will always return {{false}} and so {{null}} because Spark's {{ContextWaiter}} will only return {{true}} if the context was stopped and this only happens after calling "awaitTermination".
Following Spark code:
awaitTermination returns the [state of stopped|https://github.com/apache/spark/blob/branch-1.6/streaming/src/main/scala/org/apache/spark/streaming/ContextWaiter.scala#L74]
But can only stopped via [notifyStopped|https://github.com/apache/spark/blob/branch-1.6/streaming/src/main/scala/org/apache/spark/streaming/ContextWaiter.scala#L44]
Which is only called by [StreamingContext#stop()|https://github.com/apache/spark/blob/branch-1.6/streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala#L714]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)