Hi All,

I wrote a test script which always throws an exception as below :

object Test {


  def main(args: Array[String]) {
    try {

      val conf =
        new SparkConf()
          .setAppName("Test")

      throw new RuntimeException("Some Exception")

      println("all done!")
    } catch {
      case e: RuntimeException => {
        println("There is an exception in the script exiting with status 1")
        System.exit(1)
      }
    }
}

When I run this code using spark-submit I am expecting to get an exit code
of 1,
however I keep getting exit code 0.

Any ideas how I can force spark-submit to return with code 1 ?

Thanks,
Shashank

Reply via email to