diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2012-11-08 09:53:40 -0800 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2012-11-08 09:53:40 -0800 |
commit | 66cbdee941ee12eac5eea38709d542938bba575a (patch) | |
tree | 037f44bca78805841d44940d355b2cc33a7b2d9b | |
parent | 809b2bb1fe92c8ce733ce082c5f6e31316e05a61 (diff) | |
download | spark-66cbdee941ee12eac5eea38709d542938bba575a.tar.gz spark-66cbdee941ee12eac5eea38709d542938bba575a.tar.bz2 spark-66cbdee941ee12eac5eea38709d542938bba575a.zip |
Fix for connections not being reused (from Josh Rosen)
-rw-r--r-- | core/src/main/scala/spark/network/ConnectionManager.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/scala/spark/network/ConnectionManager.scala b/core/src/main/scala/spark/network/ConnectionManager.scala index da39108164..642fa4b525 100644 --- a/core/src/main/scala/spark/network/ConnectionManager.scala +++ b/core/src/main/scala/spark/network/ConnectionManager.scala @@ -304,7 +304,8 @@ private[spark] class ConnectionManager(port: Int) extends Logging { connectionRequests += newConnection newConnection } - val connection = connectionsById.getOrElse(connectionManagerId, startNewConnection()) + val lookupKey = ConnectionManagerId.fromSocketAddress(connectionManagerId.toSocketAddress) + val connection = connectionsById.getOrElse(lookupKey, startNewConnection()) message.senderAddress = id.toSocketAddress() logDebug("Sending [" + message + "] to [" + connectionManagerId + "]") /*connection.send(message)*/ |