[ 
https://issues.apache.org/jira/browse/SPARK-3732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14152912#comment-14152912
 ] 

Sean Owen commented on SPARK-3732:
----------------------------------

FWIW, I was also surprised in the past that there is no way to submit a job 
programmatically. That would be great for embedding Spark. 

An option seems like big overkill here. System.exit() is not a great idea in 
general and I agree that removing it is better. I can confirm that the JVM exit 
status is 0 on success and 1 on exception anyway, so this doesn't even change 
semantics. That is, you still get exit status 1 if an exception is thrown. The 
stack trace is also printed, so the printing the exception is also redundant 
and the try block can go.

> Yarn Client: Add option to NOT System.exit() at end of main()
> -------------------------------------------------------------
>
>                 Key: SPARK-3732
>                 URL: https://issues.apache.org/jira/browse/SPARK-3732
>             Project: Spark
>          Issue Type: Improvement
>    Affects Versions: 1.1.0
>            Reporter: Sotos Matzanas
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> We would like to add the ability to create and submit Spark jobs 
> programmatically via Scala/Java. We have found a way to hack this and submit 
> jobs via Yarn, but since 
> org.apache.spark.deploy.yarn.Client.main()
> exits with either 0 or 1 in the end, this will mean exit of our own program. 
> We would like to add an optional spark conf param to NOT exit at the end of 
> the main



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to