trait ExecutorAllocationClient {
def getExecutorIds(): Seq[String]
def requestTotalExecutors(numExecutors: Int, localityAwareTasks: Int, hostToLocalTaskCount: Map[String, Int]): Boolean
def requestExecutors(numAdditionalExecutors: Int): Boolean
def killExecutor(executorId: String): Boolean
def killExecutors(executorIds: Seq[String]): Seq[String]
def killExecutorsOnHost(host: String): Boolean
}
ExecutorAllocationClient
ExecutorAllocationClient
is a contract for clients to communicate with a cluster manager to request or kill executors.
ExecutorAllocationClient Contract
Note
|
ExecutorAllocationClient is a private[spark] contract.
|
Method | Description |
---|---|
Finds identifiers of the executors in use. Used when |
|
Updates the cluster manager with the exact number of executors desired. It returns whether the request has been acknowledged by the cluster manager ( Used when:
|
|
Requests additional executors from a cluster manager and returns whether the request has been acknowledged by the cluster manager ( Used when |
|
Requests a cluster manager to kill a single executor that is no longer in use and returns whether the request has been acknowledged by the cluster manager ( The default implementation simply calls killExecutors (with a single-element collection of executors to kill). Used when:
|
|
Requests that a cluster manager to kill one or many executors that are no longer in use and returns whether the request has been acknowledged by the cluster manager ( Interestingly, it is only used for killExecutor. |
|
Used exclusively when |