Skip to content

Commit

Permalink
[SPARK-9767] Remove ConnectionManager.
Browse files Browse the repository at this point in the history
We introduced the Netty network module for shuffle in Spark 1.2, and has turned it on by default for 3 releases. The old ConnectionManager is difficult to maintain. If we merge the patch now, by the time it is released, it would be 1 yr for which ConnectionManager is off by default. It's time to remove it.

Author: Reynold Xin <rxin@databricks.com>

Closes #8161 from rxin/SPARK-9767.
  • Loading branch information
rxin committed Sep 7, 2015
1 parent 871764c commit 5ffe752
Show file tree
Hide file tree
Showing 21 changed files with 651 additions and 3,855 deletions.
11 changes: 1 addition & 10 deletions core/src/main/scala/org/apache/spark/SparkEnv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import org.apache.spark.broadcast.BroadcastManager
import org.apache.spark.metrics.MetricsSystem
import org.apache.spark.network.BlockTransferService
import org.apache.spark.network.netty.NettyBlockTransferService
import org.apache.spark.network.nio.NioBlockTransferService
import org.apache.spark.rpc.{RpcEndpointRef, RpcEndpoint, RpcEnv}
import org.apache.spark.rpc.akka.AkkaRpcEnv
import org.apache.spark.scheduler.{OutputCommitCoordinator, LiveListenerBus}
Expand Down Expand Up @@ -326,15 +325,7 @@ object SparkEnv extends Logging {

val shuffleMemoryManager = ShuffleMemoryManager.create(conf, numUsableCores)

val blockTransferService =
conf.get("spark.shuffle.blockTransferService", "netty").toLowerCase match {
case "netty" =>
new NettyBlockTransferService(conf, securityManager, numUsableCores)
case "nio" =>
logWarning("NIO-based block transfer service is deprecated, " +
"and will be removed in Spark 1.6.0.")
new NioBlockTransferService(conf, securityManager)
}
val blockTransferService = new NettyBlockTransferService(conf, securityManager, numUsableCores)

val blockManagerMaster = new BlockManagerMaster(registerOrLookupEndpoint(
BlockManagerMaster.DRIVER_ENDPOINT_NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ class NettyBlockTransferService(conf: SparkConf, securityManager: SecurityManage
}

override def close(): Unit = {
server.close()
clientFactory.close()
if (server != null) {
server.close()
}
if (clientFactory != null) {
clientFactory.close()
}
}
}
175 changes: 0 additions & 175 deletions core/src/main/scala/org/apache/spark/network/nio/BlockMessage.scala

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5ffe752

Please sign in to comment.