[ https://issues.apache.org/jira/browse/BEAM-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15815614#comment-15815614 ]
ASF GitHub Bot commented on BEAM-1256: -------------------------------------- GitHub user amitsela opened a pull request: https://github.com/apache/beam/pull/1758 [BEAM-1256] SparkPipelineResult.StreamingMode should not return null … …on awaitTermination() Be sure to do all of the following to help us incorporate your contribution quickly and easily: - [ ] Make sure the PR title is formatted like: `[BEAM-<Jira issue #>] Description of pull request` - [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable Travis-CI on your fork and ensure the whole test matrix passes). - [ ] Replace `<Jira issue #>` in the title with the actual Jira issue number, if there is one. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.txt). --- You can merge this pull request into a Git repository by running: $ git pull https://github.com/amitsela/beam BEAM-1256 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/beam/pull/1758.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1758 ---- commit 7af52a1a60e37dbf52cf1d78dbc9ede0cb7eba84 Author: Sela <ans...@paypal.com> Date: 2017-01-10T17:37:20Z [BEAM-1256] SparkPipelineResult.StreamingMode should not return null on awaitTermination() ---- > 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)