You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "smallzhongfeng (via GitHub)" <gi...@apache.org> on 2023/02/10 04:24:03 UTC

[GitHub] [spark] smallzhongfeng opened a new pull request, #39962: [SPARK-42392] Add a new case of TriggeredByExecutorDecommissionInfo to remove unnecessary param

smallzhongfeng opened a new pull request, #39962:
URL: https://github.com/apache/spark/pull/39962

   
   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   For todo `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`, I add a new case class named TriggeredByExecutorDecommissionInfo.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Remove unnecessary param.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   No.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   Fix uts.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] smallzhongfeng commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "smallzhongfeng (via GitHub)" <gi...@apache.org>.
smallzhongfeng commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1109353784


##########
core/src/main/scala/org/apache/spark/scheduler/ExecutorDecommissionInfo.scala:
##########
@@ -25,7 +25,19 @@ package org.apache.spark.scheduler
  *                shuffle data might be lost even if the external shuffle service is enabled.
  */
 private[spark]
-case class ExecutorDecommissionInfo(message: String, workerHost: Option[String] = None)
+abstract class DecommissionInfo

Review Comment:
   OK, sounds good!



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1110022491


##########
core/src/main/scala/org/apache/spark/scheduler/ExecutorDecommissionInfo.scala:
##########
@@ -17,6 +17,9 @@
 
 package org.apache.spark.scheduler
 
+private[spark]
+sealed abstract class DecommissionInfo

Review Comment:
   abstract class? trait?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1109442046


##########
core/src/main/scala/org/apache/spark/scheduler/ExecutorDecommissionInfo.scala:
##########
@@ -25,7 +25,19 @@ package org.apache.spark.scheduler
  *                shuffle data might be lost even if the external shuffle service is enabled.
  */
 private[spark]
-case class ExecutorDecommissionInfo(message: String, workerHost: Option[String] = None)
+abstract class DecommissionInfo
+
+private[spark]
+case class ExecutorDecommissionInfo(

Review Comment:
   fine to me, it's good to be able to distinguish them clearly
   
   



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] github-actions[bot] closed pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param
URL: https://github.com/apache/spark/pull/39962


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1108460868


##########
core/src/main/scala/org/apache/spark/scheduler/ExecutorDecommissionInfo.scala:
##########
@@ -25,7 +25,19 @@ package org.apache.spark.scheduler
  *                shuffle data might be lost even if the external shuffle service is enabled.
  */
 private[spark]
-case class ExecutorDecommissionInfo(message: String, workerHost: Option[String] = None)
+abstract class DecommissionInfo

Review Comment:
   If all subclasses must to be defined in this file, maybe `sealed`?



##########
core/src/main/scala/org/apache/spark/scheduler/ExecutorDecommissionInfo.scala:
##########
@@ -25,7 +25,19 @@ package org.apache.spark.scheduler
  *                shuffle data might be lost even if the external shuffle service is enabled.
  */
 private[spark]
-case class ExecutorDecommissionInfo(message: String, workerHost: Option[String] = None)
+abstract class DecommissionInfo
+
+private[spark]
+case class ExecutorDecommissionInfo(

Review Comment:
   hmm... Who triggered this? And I think we should  add some comments for these two new classes
   
   



##########
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:
   A little confused. Seems `decommissionExecutors` don't use `triggeredByExecutor` flag?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1109351592


##########
core/src/main/scala/org/apache/spark/scheduler/ExecutorDecommissionInfo.scala:
##########
@@ -25,7 +25,19 @@ package org.apache.spark.scheduler
  *                shuffle data might be lost even if the external shuffle service is enabled.
  */
 private[spark]
-case class ExecutorDecommissionInfo(message: String, workerHost: Option[String] = None)
+abstract class DecommissionInfo
+
+private[spark]
+case class ExecutorDecommissionInfo(

Review Comment:
   Could we also rename this one to `TriggeredByXXXDecommissionInfo`?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] smallzhongfeng commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "smallzhongfeng (via GitHub)" <gi...@apache.org>.
smallzhongfeng commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1109359222


##########
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:
   Actually `triggeredByExecutor` was used in `ExecutorAllocationClient` 's implementation class `CoarseGrainedSchedulerBackend` and `KubernetesClusterSchedulerBackend`. We can see this https://github.com/apache/spark/blob/9f7582c8cbeae70c31c183567bf5320d1c3210fe/core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala#L555



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] smallzhongfeng commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "smallzhongfeng (via GitHub)" <gi...@apache.org>.
smallzhongfeng commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1111057261


##########
core/src/main/scala/org/apache/spark/scheduler/ExecutorDecommissionInfo.scala:
##########
@@ -17,6 +17,9 @@
 
 package org.apache.spark.scheduler
 
+private[spark]
+sealed abstract class DecommissionInfo

Review Comment:
   It should not be necessary. After all, the case class here only needs to inherit this class `DecommissionInfo`. If the case class need multiple inheritance, it is more appropriate to use the trait here.



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] smallzhongfeng commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "smallzhongfeng (via GitHub)" <gi...@apache.org>.
smallzhongfeng commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1109349715


##########
core/src/main/scala/org/apache/spark/scheduler/ExecutorDecommissionInfo.scala:
##########
@@ -25,7 +25,19 @@ package org.apache.spark.scheduler
  *                shuffle data might be lost even if the external shuffle service is enabled.
  */
 private[spark]
-case class ExecutorDecommissionInfo(message: String, workerHost: Option[String] = None)
+abstract class DecommissionInfo
+
+private[spark]
+case class ExecutorDecommissionInfo(

Review Comment:
   `Executor` will triggered this. Maybe we can see this comment https://github.com/apache/spark/blob/1c0bd1f9f813a341bbfdecb2c5ccde7fbc1bac2d/core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedClusterMessage.scala#L109



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1109351592


##########
core/src/main/scala/org/apache/spark/scheduler/ExecutorDecommissionInfo.scala:
##########
@@ -25,7 +25,19 @@ package org.apache.spark.scheduler
  *                shuffle data might be lost even if the external shuffle service is enabled.
  */
 private[spark]
-case class ExecutorDecommissionInfo(message: String, workerHost: Option[String] = None)
+abstract class DecommissionInfo
+
+private[spark]
+case class ExecutorDecommissionInfo(

Review Comment:
   Could we also rename this one to `TriggeredByXXXDecommissionInfo`? Is it possible?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1109377288


##########
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:
   cc @pan3793 FYI



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] smallzhongfeng commented on pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "smallzhongfeng (via GitHub)" <gi...@apache.org>.
smallzhongfeng commented on PR #39962:
URL: https://github.com/apache/spark/pull/39962#issuecomment-1432589195

   Gentle ping. @LuciferYang @Ngone51 @dongjoon-hyun @HyukjinKwon :-)


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] github-actions[bot] commented on pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #39962:
URL: https://github.com/apache/spark/pull/39962#issuecomment-1567617027

   We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] smallzhongfeng commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "smallzhongfeng (via GitHub)" <gi...@apache.org>.
smallzhongfeng commented on code in PR #39962:
URL: https://github.com/apache/spark/pull/39962#discussion_r1109403857


##########
core/src/main/scala/org/apache/spark/scheduler/ExecutorDecommissionInfo.scala:
##########
@@ -25,7 +25,19 @@ package org.apache.spark.scheduler
  *                shuffle data might be lost even if the external shuffle service is enabled.
  */
 private[spark]
-case class ExecutorDecommissionInfo(message: String, workerHost: Option[String] = None)
+abstract class DecommissionInfo
+
+private[spark]
+case class ExecutorDecommissionInfo(

Review Comment:
   Yes, how about `ExecutorTriggerExecutorDecommissionInfo` and `DriverTriggerExecutorDecommissionInfo`? Or could you give me a better opinion ?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] smallzhongfeng commented on pull request #39962: [SPARK-42392][CORE] Add a new case of TriggeredByExecutorDecommissionInfo to remove unnecessary param

Posted by "smallzhongfeng (via GitHub)" <gi...@apache.org>.
smallzhongfeng commented on PR #39962:
URL: https://github.com/apache/spark/pull/39962#issuecomment-1425315289

   Could you help me review this? @HyukjinKwon @LuciferYang @Ngone51 Thanks a lot. :-) 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a diff in pull request #39962: [SPARK-42392][CORE] Add a new case of `TriggeredByExecutorDecommissionInfo` to remove unnecessary param

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org