aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorShixiong Zhu <shixiong@databricks.com>2016-02-02 21:13:54 -0800
committerReynold Xin <rxin@databricks.com>2016-02-02 21:13:54 -0800
commit335f10edad8c759bad3dbd0660ed4dd5d70ddd8b (patch)
tree997aac293bb3f2f7bc565693e5800f13ab31db2c /core
parent0557146619868002e2f7ec3c121c30bbecc918fc (diff)
downloadspark-335f10edad8c759bad3dbd0660ed4dd5d70ddd8b.tar.gz
spark-335f10edad8c759bad3dbd0660ed4dd5d70ddd8b.tar.bz2
spark-335f10edad8c759bad3dbd0660ed4dd5d70ddd8b.zip
[SPARK-7997][CORE] Add rpcEnv.awaitTermination() back to SparkEnv
`rpcEnv.awaitTermination()` was not added in #10854 because some Streaming Python tests hung forever. This patch fixed the hung issue and added rpcEnv.awaitTermination() back to SparkEnv. Previously, Streaming Kafka Python tests shutdowns the zookeeper server before stopping StreamingContext. Then when stopping StreamingContext, KafkaReceiver may be hung due to https://issues.apache.org/jira/browse/KAFKA-601, hence, some thread of RpcEnv's Dispatcher cannot exit and rpcEnv.awaitTermination is hung.The patch just changed the shutdown order to fix it. Author: Shixiong Zhu <shixiong@databricks.com> Closes #11031 from zsxwing/awaitTermination.
Diffstat (limited to 'core')
-rw-r--r--core/src/main/scala/org/apache/spark/SparkEnv.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/src/main/scala/org/apache/spark/SparkEnv.scala b/core/src/main/scala/org/apache/spark/SparkEnv.scala
index 12c7b2048a..9461afdc54 100644
--- a/core/src/main/scala/org/apache/spark/SparkEnv.scala
+++ b/core/src/main/scala/org/apache/spark/SparkEnv.scala
@@ -91,6 +91,7 @@ class SparkEnv (
metricsSystem.stop()
outputCommitCoordinator.stop()
rpcEnv.shutdown()
+ rpcEnv.awaitTermination()
// Note that blockTransferService is stopped by BlockManager since it is started by it.