Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use runningExecutors as a set.
  • Loading branch information
jinxing committed Mar 12, 2018
commit 049ed495bb8c7da05f034300237cf9360bc0848d
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ private[yarn] class YarnAllocator(
private val releasedContainers = Collections.newSetFromMap[ContainerId](
new ConcurrentHashMap[ContainerId, java.lang.Boolean])

private val runningExecutors = new java.util.concurrent.ConcurrentHashMap[String, Unit]()
private val runningExecutors = Collections.newSetFromMap[String](
new ConcurrentHashMap[String, java.lang.Boolean]())

private val numExecutorsStarting = new AtomicInteger(0)

Expand Down Expand Up @@ -501,7 +502,7 @@ private[yarn] class YarnAllocator(
s"for executor with ID $executorId")

def updateInternalState(): Unit = synchronized {
runningExecutors.put(executorId, Unit)
runningExecutors.add(executorId)
numExecutorsStarting.decrementAndGet()
executorIdToContainer(executorId) = container
containerIdToExecutorId(container.getId) = executorId
Expand Down