I run spark jobs via YARN using Spark submit, after my spark job that doesn't do the job still shows SUCCEED status instead of FAILED . How can I return the exit code as a failure status from code to YARN?
How can we send information about the code of another application code from the code?
I do not think you can do this. I experienced the same behavior withspark-1.6.2, but after analyzing the failures, I don’t see an obvious way to send a “bad” exit code from my application.
,
System.exit(1);
, @gsamaras . , , try catch.
try{ } catch { case e: Exception => { log.error("Error " + e) throw e; } }