GitHub user wangyum opened a pull request: https://github.com/apache/spark/pull/19670
[SPARK-22454][CORE] ExternalShuffleClient.close() should check clientFactory null ## What changes were proposed in this pull request? `ExternalShuffleClient.close()` should check `clientFactory` null. otherwise it will throw NPE sometimes: ``` 17/11/06 20:08:05 ERROR Utils: Uncaught exception in thread main java.lang.NullPointerException at org.apache.spark.network.shuffle.ExternalShuffleClient.close(ExternalShuffleClient.java:152) at org.apache.spark.storage.BlockManager.stop(BlockManager.scala:1407) at org.apache.spark.SparkEnv.stop(SparkEnv.scala:89) at org.apache.spark.SparkContext$$anonfun$stop$11.apply$mcV$sp(SparkContext.scala:1849) ``` ## How was this patch tested? manual tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/wangyum/spark SPARK-22454 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/19670.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 #19670 ---- commit fba4c8a7c5a343ffc1693de8994099a2aeecbd43 Author: Yuming Wang <wgy...@gmail.com> Date: 2017-11-06T12:12:00Z ExternalShuffleClient.close() should check null ---- --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org