GitHub user devaraj-kavali opened a pull request: https://github.com/apache/spark/pull/22623
[SPARK-25636][CORE] spark-submit swallows the failure reason when there ## What changes were proposed in this pull request? Cause of the error is wrapped with SparkException, now finding the cause from the wrapped exception and throwing the cause instead of the wrapped exception. ## How was this patch tested? Verified it manually by checking the cause of the error, it gives the error as shown below. ### Without the PR change ``` [apache-spark]$ ./bin/spark-submit --verbose --master spark://****** .... Error: Exception thrown in awaitResult: Run with --help for usage help or --verbose for debug output ``` ### With the PR change ``` [apache-spark]$ ./bin/spark-submit --verbose --master spark://****** .... Exception in thread "main" java.io.IOException: Failed to connect to ****** at org.apache.spark.network.client.TransportClientFactory.createClient(TransportClientFactory.java:245) .... Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: ****** .... ... 1 more Caused by: java.net.ConnectException: Connection refused ... 11 more ``` You can merge this pull request into a Git repository by running: $ git pull https://github.com/devaraj-kavali/spark SPARK-25636 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/22623.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #22623 ---- commit dfba5925666fc8919e3e4bc1edca57c8a92ed7b0 Author: Devaraj K <devaraj@...> Date: 2018-10-03T21:26:20Z [SPARK-25636][CORE] spark-submit swallows the failure reason when there is an error connecting to master ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org