Skip to content
Closed
Changes from all commits
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
[SPARK-6891] Fix the bug that ExecutorAllocationManager will request …
…negative number executors
  • Loading branch information
ArcherShao committed Apr 24, 2015
commit 1693b54f209a17ebb6bed449f81840737f97366a
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ private[spark] class ExecutorAllocationManager(
* The number of executors we would have if the cluster manager were to fulfill all our existing
* requests.
*/
private def targetNumExecutors(): Int =
numExecutorsPending + executorIds.size - executorsPendingToRemove.size
private def targetNumExecutors(): Int = math.max(numExecutorsPending + executorIds.size -
executorsPendingToRemove.size, minNumExecutors)

/**
* The maximum number of executors we would need under the current load to satisfy all running
Expand Down