[SPARK-15541] Casting ConcurrentHashMap to ConcurrentMap (master branch)
## What changes were proposed in this pull request? Casting ConcurrentHashMap to ConcurrentMap allows to run code compiled with Java 8 on Java 7 ## How was this patch tested? Compilation. Existing automatic tests Author: Maciej Brynski <maciej.brynski@adpilot.pl> Closes #14459 from maver1ck/spark-15541-master.
This commit is contained in:
parent
dd8514fa20
commit
511dede111
|
@ -17,7 +17,7 @@
|
|||
|
||||
package org.apache.spark.rpc.netty
|
||||
|
||||
import java.util.concurrent.{ConcurrentHashMap, LinkedBlockingQueue, ThreadPoolExecutor, TimeUnit}
|
||||
import java.util.concurrent.{ConcurrentHashMap, ConcurrentMap, LinkedBlockingQueue, ThreadPoolExecutor, TimeUnit}
|
||||
import javax.annotation.concurrent.GuardedBy
|
||||
|
||||
import scala.collection.JavaConverters._
|
||||
|
@ -42,8 +42,10 @@ private[netty] class Dispatcher(nettyEnv: NettyRpcEnv) extends Logging {
|
|||
val inbox = new Inbox(ref, endpoint)
|
||||
}
|
||||
|
||||
private val endpoints = new ConcurrentHashMap[String, EndpointData]
|
||||
private val endpointRefs = new ConcurrentHashMap[RpcEndpoint, RpcEndpointRef]
|
||||
private val endpoints: ConcurrentMap[String, EndpointData] =
|
||||
new ConcurrentHashMap[String, EndpointData]
|
||||
private val endpointRefs: ConcurrentMap[RpcEndpoint, RpcEndpointRef] =
|
||||
new ConcurrentHashMap[RpcEndpoint, RpcEndpointRef]
|
||||
|
||||
// Track the receivers whose inboxes may contain messages.
|
||||
private val receivers = new LinkedBlockingQueue[EndpointData]
|
||||
|
|
Loading…
Reference in a new issue