[SPARK-3293] yarn's web show "SUCCEEDED" when the driver throw a exception in yarn-client

@mateiz @pwendell  is there anything in spark that we can/should use  where we consider the application in a final state (either success or failure) such that we wouldn't want to retry it?    On MR there is explicit states for finishing and it also has checks for the committed output.   Spark I don't think is quite as straight forward.  Do we have any guidance on what an application should do on error and success?

ie can we say if sc.stop() is called then it finished cleanly, or perhaps if System.exit(0) is called. Should we be peaking at the metrics or something to see if any jobs failed with the application. thoughts?