Skip to content

Conversation

@pgandhi999
Copy link

If you run a spark job without creating the SparkSession or SparkContext, the spark job logs says it succeeded but yarn says it fails and retries 3 times. Also, since, Application Master unregisters with Resource Manager and exits successfully, it deletes the spark staging directory, so when yarn makes subsequent retries, it fails to find the staging directory and thus, the retries fail.

Added a flag to check whether user has initialized SparkContext. If it is true, we let Application Master unregister with Resource Manager else, we do not let AM unregister with RM.

How was this patch tested?

Manually tested the fix.
Before:
screen shot-before

After:
screen shot-after

Please review http://spark.apache.org/contributing.html before opening a pull request.

pgandhi and others added 8 commits July 21, 2017 16:00
Added the case ExecutorLostFailure which was previously not there, thus, the default case would be executed in which case, task would be marked as completed.
Apache Spark Pull Request - July 26, 2017
…es not create SparkContext

Added a flag to check whether user has initialized Spark Context. If it is true, then we let Application Master unregister with Resource Manager else we do not.
… that does not create SparkContext"

This reverts commit f454c89.

"Merged another issue to this one by mistake"
Added a flag to check whether user has initialized SparkContext. If it is true, we let Application Master unregister with Resource Manager else, we do not let AM unregister with RM.
@tgravescs
Copy link
Contributor

ok to test

@SparkQA
Copy link

SparkQA commented Jul 27, 2017

Test build #80005 has finished for PR 18741 at commit 0e4228c.

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

@tgravescs
Copy link
Contributor

+1

@asfgit asfgit closed this in 69ab0e4 Jul 28, 2017
@pgandhi999 pgandhi999 changed the title [Spark-21541][YARN]: Spark Logs show incorrect job status for a job that does not create SparkContext [SPARK-21541][YARN]: Spark Logs show incorrect job status for a job that does not create SparkContext Jul 28, 2017
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.

3 participants