apache/spark — pull request #3508 by SaintBacchus (2014-11-28 12:10:42+00:00)
Title: [YARN][SPARK-3293]Fix yarn's web show "SUCCEEDED" when the driver throw a exception in yarn-client

spark has five exit situations:
1.system.exit(0) - succeeds
2.clean exit main -succeeds
3.sc.stop - succeeds
4.system.exit(1) - failed
5.exception - failed
But now yarn-client's ExecutorLauncher is not care about this and just report Ok when driver is down.
So I catch this five situations in driver and send the relevant status to ExecutorLauncher to reply the AM status.
In addition, ExecutorLauncher does not need retry if it report the failed status because this driver has been ended before the sencond ExecutorLauncher launched.