Github user tgravescs commented on the pull request:

    https://github.com/apache/spark/pull/6409#issuecomment-105937766
  
    Ok, so now I remember on this.  I intentionally didn't handle this case as 
its really hard to be able to cleanup in this case but still not cleanup when 
you want retries.  Note that MapReduce on yarn and others on yarn have this 
same issue.
    
    The reason is because the way yarn kills you.  It first sends a sigterm, 
then waits 250ms (or configurable time) it sends sigkill.  The Application 
Master doesn't know why it was killed.  You could attempt to contact the RM to 
get the application status in the shutdown hook, but if you are using default 
timeout its very unlikely you will have time.  Really yarn needs a cleanup task 
that runs after the application master is killed but that isn't supported at 
this point.
    
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to