Skip to content

[SPARK-16095][YARN] Yarn cluster mode should report correct state to SparkLauncher#13962

Closed
renozhang wants to merge 5 commits intoapache:masterfrom
renozhang:SPARK-16095-spark-launcher-wrong-state
Closed

[SPARK-16095][YARN] Yarn cluster mode should report correct state to SparkLauncher#13962
renozhang wants to merge 5 commits intoapache:masterfrom
renozhang:SPARK-16095-spark-launcher-wrong-state

Conversation

@renozhang
Copy link
Contributor

What changes were proposed in this pull request?

Yarn cluster mode should return correct state for SparkLauncher

How was this patch tested?

unit test

@SparkQA
Copy link

SparkQA commented Jun 29, 2016

Test build #61438 has finished for PR 13962 at commit 28b2906.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

}
}

private object YarnClusterDriver extends Logging with Matchers {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In current YarnClusterDriver, it already has failures but not failed the test.
On line 340: calling sc.parallelize() after sc.stop() will fail app with error

ApplicationMaster: Final app status: FAILED, exitCode: 15, (reason: User class threw exception: java.lang.IllegalStateException: Cannot call methods on a stopped SparkContext.

@SparkQA
Copy link

SparkQA commented Jun 29, 2016

Test build #61442 has finished for PR 13962 at commit 92ec204.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@renozhang renozhang changed the title [SPARK-16095][YARN][WIP] Yarn cluster mode should return correct state for SparkLauncher [SPARK-16095][YARN] Yarn cluster mode should return correct state for SparkLauncher Jun 29, 2016
@renozhang renozhang changed the title [SPARK-16095][YARN] Yarn cluster mode should return correct state for SparkLauncher [SPARK-16095][YARN] Yarn cluster mode should report correct state to SparkLauncher Jun 29, 2016
@SparkQA
Copy link

SparkQA commented Jun 29, 2016

Test build #61474 has finished for PR 13962 at commit 5687d78.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@jerryshao
Copy link
Contributor

Looks good to me, CC @vanzin about Launcher thing.

case YarnApplicationState.FINISHED =>
reportLauncherState(SparkAppHandle.State.FINISHED)
report.getFinalApplicationStatus match {
case FinalApplicationStatus.FAILED =>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about also handling KILLED? In case the app is killed via YARN UI / CLI.

@SparkQA
Copy link

SparkQA commented Jul 1, 2016

Test build #61619 has finished for PR 13962 at commit d734186.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@renozhang
Copy link
Contributor Author

renozhang commented Jul 1, 2016

@vanzin I've updated code and comments.
Please take a look, thanks a lot.

@vanzin
Copy link
Contributor

vanzin commented Jul 1, 2016

LGTM. Merging to master / 2.0 (fix is simple enough and I'd rather have the whole 2.x line behave the same here).

asfgit pushed a commit that referenced this pull request Jul 1, 2016
…SparkLauncher

## What changes were proposed in this pull request?
Yarn cluster mode should return correct state for SparkLauncher

## How was this patch tested?
unit test

Author: peng.zhang <peng.zhang@xiaomi.com>

Closes #13962 from renozhang/SPARK-16095-spark-launcher-wrong-state.

(cherry picked from commit bad0f7d)
Signed-off-by: Marcelo Vanzin <vanzin@cloudera.com>
@asfgit asfgit closed this in bad0f7d Jul 1, 2016
zzcclp added a commit to zzcclp/spark that referenced this pull request Jul 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants