@@ -22,7 +22,6 @@ import java.net.Socket
22
22
23
23
import akka .actor .ActorSystem
24
24
25
- import scala .collection .JavaConversions ._
26
25
import scala .collection .mutable
27
26
import scala .util .Properties
28
27
@@ -45,8 +44,6 @@ import org.apache.spark.storage._
45
44
import org .apache .spark .unsafe .memory .{ExecutorMemoryManager , MemoryAllocator }
46
45
import org .apache .spark .util .{RpcUtils , Utils }
47
46
48
- import scala .util .control .NonFatal
49
-
50
47
/**
51
48
* :: DeveloperApi ::
52
49
* Holds all the runtime environment objects for a running Spark instance (either master or worker),
@@ -95,8 +92,7 @@ class SparkEnv (
95
92
96
93
if (! isStopped) {
97
94
isStopped = true
98
-
99
- pythonWorkers.foreach { case (key, worker) => worker.stop()}
95
+ pythonWorkers.values.foreach(_.stop())
100
96
Option (httpFileServer).foreach(_.stop())
101
97
mapOutputTracker.stop()
102
98
shuffleManager.stop()
@@ -107,7 +103,6 @@ class SparkEnv (
107
103
outputCommitCoordinator.stop()
108
104
rpcEnv.shutdown()
109
105
110
-
111
106
// Unfortunately Akka's awaitTermination doesn't actually wait for the Netty server to shut
112
107
// down, but let's call it anyway in case it gets fixed in a later release
113
108
// UPDATE: In Akka 2.1.x, this hangs if there are remote actors, so we can't call it.
0 commit comments