This is an automated email from the ASF dual-hosted git repository. jshao pushed a commit to branch branch-0.5.0 in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
commit 59856687f8e17b20f206815cbcf31bbbaacf4292 Author: roryqi <jerqi1242949...@gmail.com> AuthorDate: Wed Jun 22 14:50:40 2022 +0800 [Bugfix] [0.5] Fix spark2 executor stop NPE problem (#188) backport 0.5.0 ### What changes were proposed in this pull request? We need to judge heartbeatExecutorService whether is null when we will stop it. ### Why are the changes needed? #177 pr introduce this problem, when we run Spark applications on our cluster, the executor will throw NPE when method `stop` is called. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Manual test --- .../src/main/java/org/apache/spark/shuffle/RssShuffleManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client-spark/spark2/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java b/client-spark/spark2/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java index f1f2a36..2970489 100644 --- a/client-spark/spark2/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java +++ b/client-spark/spark2/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java @@ -370,7 +370,9 @@ public class RssShuffleManager implements ShuffleManager { @Override public void stop() { - heartBeatScheduledExecutorService.shutdownNow(); + if (heartBeatScheduledExecutorService != null) { + heartBeatScheduledExecutorService.shutdownNow(); + } threadPoolExecutor.shutdownNow(); shuffleWriteClient.close(); }