beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amit Sela (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BEAM-1256) SparkPipelineResult.StreamingMode should not return null on awaitTermination()
Date Tue, 10 Jan 2017 17:36:58 GMT
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)

Mime
View raw message