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)

Reply via email to