Hi, all:
According to https://github.com/apache/spark/pull/2732, When a spark job fails
or exits nonzero in yarn-cluster mode, the spark-submit will get the
corresponding return code of the spark job. But I tried in spark-1.1.1 yarn
cluster, spark-submit return zero anyway.
Here is my spark code:
try { val dropTable = s"drop table $DB.$tableName"
hiveContext.hql(dropTable) val createTbl = do some thing...
hiveContext.hql(createTbl) } catch { case ex: Exception => {
Util.printLog("ERROR", s"create db error.") exit(-1) } }
Maybe I did something wrong. Is there any hint? Thanks.