LuciferYang commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1109442822


##########
core/src/main/scala/org/apache/spark/ExecutorAllocationClient.scala:
##########
@@ -111,21 +111,24 @@ private[spark] trait ExecutorAllocationClient {
    * @param executorId identifiers of executor to decommission
    * @param decommissionInfo information about the decommission (reason, host 
loss)
    * @param adjustTargetNumExecutors if we should adjust the target number of 
executors.
-   * @param triggeredByExecutor whether the decommission is triggered at 
executor.
-   *                            (TODO: add a new type like 
`ExecutorDecommissionInfo` for the
-   *                            case where executor is decommissioned at 
executor first, so we
-   *                            don't need this extra parameter.)
    * @return whether the request is acknowledged by the cluster manager.
    */
   final def decommissionExecutor(
       executorId: String,
-      decommissionInfo: ExecutorDecommissionInfo,
-      adjustTargetNumExecutors: Boolean,
-      triggeredByExecutor: Boolean = false): Boolean = {
-    val decommissionedExecutors = decommissionExecutors(
-      Array((executorId, decommissionInfo)),
-      adjustTargetNumExecutors = adjustTargetNumExecutors,
-      triggeredByExecutor = triggeredByExecutor)
+      decommissionInfo: DecommissionInfo,
+      adjustTargetNumExecutors: Boolean): Boolean = {
+    val decommissionedExecutors = decommissionInfo match {
+      case _: ExecutorDecommissionInfo =>
+        decommissionExecutors(

Review Comment:
   OK, I see



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to