Skip to content

[SPARK-32643][CORE][K8s] Consolidate state decommissioning in the TaskSchedulerImpl realm - #29452

Closed
agrawaldevesh wants to merge 9 commits into
apache:masterfrom
agrawaldevesh:consolidate_decom_state
Closed

[SPARK-32643][CORE][K8s] Consolidate state decommissioning in the TaskSchedulerImpl realm#29452
agrawaldevesh wants to merge 9 commits into
apache:masterfrom
agrawaldevesh:consolidate_decom_state

Conversation

@agrawaldevesh

Copy link
Copy Markdown

What changes were proposed in this pull request?

The decommissioning state is a bit fragment across two places in the TaskSchedulerImpl:

#29014 stored the incoming decommission info messages in TaskSchedulerImpl.executorsPendingDecommission.
While #28619 was storing just the executor end time in the map TaskSetManager.tidToExecutorKillTimeMapping (which in turn is contained in TaskSchedulerImpl).
While the two states are not really overlapping, it's a bit of a code hygiene concern to save this state in two places.

With #29422, TaskSchedulerImpl is emerging as the place where all decommissioning book keeping is kept within the driver. So consolidate the information in tidToExecutorKillTimeMapping into executorsPendingDecommission.

However, in order to do so, we need to walk away from keeping the raw ExecutorDecommissionInfo messages and instead keep another class ExecutorDecommissionState. This decoupling will allow the RPC message class ExecutorDecommissionInfo to evolve independently from the book keeping ExecutorDecommissionState.

Why are the changes needed?

This is just a code cleanup. These two features were added independently and its time to consolidate their state for good hygiene.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing tests.

@agrawaldevesh

agrawaldevesh commented Aug 18, 2020

Copy link
Copy Markdown
Author

cc: @holdenk and @prakharjain09 ... This PR simply does some state cleanup/consolidation without making any semantic changes. I would be grateful for your review. I have also created a Jira associated with this. Thanks !

Also @Ngone51 and @cloud-fan

@SparkQA

Copy link
Copy Markdown

Test build #127518 has finished for PR 29452 at commit 61ac7b8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class ExecutorDecommissionState(message: String,

@Ngone51

Copy link
Copy Markdown
Member

@agrawaldevesh Could you please add the [CORE] tag in the PR title like other PRs?

@agrawaldeveshagrawaldevesh changed the title [SPARK-32643] Consolidate state decommissioning in the TaskSchedulerImpl realm[SPARK-32643][CORE] Consolidate state decommissioning in the TaskSchedulerImpl realmAug 18, 2020
@SparkQA

Copy link
Copy Markdown

Test build #127522 has finished for PR 29452 at commit 97ad7fe.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class ExecutorDecommissionState(message: String,

@agrawaldevesh
agrawaldeveshforce-pushed the consolidate_decom_state branch from 97ad7fe to 7449fa2CompareAugust 18, 2020 15:59
Comment threadcore/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala Outdated
@SparkQA

Copy link
Copy Markdown

Test build #127590 has finished for PR 29452 at commit 7449fa2.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class ExecutorDecommissionState(

Comment threadcore/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala Outdated
@agrawaldevesh
agrawaldeveshforce-pushed the consolidate_decom_state branch from 7449fa2 to 6a5be83CompareAugust 19, 2020 06:28
@SparkQA

Copy link
Copy Markdown

Test build #127625 has finished for PR 29452 at commit 6a5be83.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Comment threadcore/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala Outdated
Comment threadcore/src/main/scala/org/apache/spark/scheduler/TaskSetManager.scala Outdated
@agrawaldevesh
agrawaldeveshforce-pushed the consolidate_decom_state branch from 6a5be83 to 9222f05CompareAugust 19, 2020 06:54
@SparkQA

Copy link
Copy Markdown

Test build #127627 has finished for PR 29452 at commit 9222f05.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan

Copy link
Copy Markdown
Contributor

retest this please

@SparkQA

Copy link
Copy Markdown

Test build #127629 has finished for PR 29452 at commit 9222f05.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@agrawaldevesh
agrawaldeveshforce-pushed the consolidate_decom_state branch from 9222f05 to ebd8408CompareAugust 19, 2020 16:30
@SparkQA

Copy link
Copy Markdown

Test build #127654 has finished for PR 29452 at commit ebd8408.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@holdenk

Copy link
Copy Markdown
Contributor

Can we tag this PR with Kubernetes (add [K8S] to the title) so it runs the K8s integration tests?

@agrawaldeveshagrawaldevesh changed the title [SPARK-32643][CORE] Consolidate state decommissioning in the TaskSchedulerImpl realm[SPARK-32643][CORE][K8S] Consolidate state decommissioning in the TaskSchedulerImpl realmAug 19, 2020
@agrawaldeveshagrawaldevesh changed the title [SPARK-32643][CORE][K8S] Consolidate state decommissioning in the TaskSchedulerImpl realm[SPARK-32643][CORE][K8s] Consolidate state decommissioning in the TaskSchedulerImpl realmAug 19, 2020
@agrawaldevesh
agrawaldeveshforce-pushed the consolidate_decom_state branch from ebd8408 to 3541ba9CompareAugust 19, 2020 22:16
@SparkQA

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/32287/

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/32287/

@SparkQA

Copy link
Copy Markdown

Test build #127895 has finished for PR 29452 at commit 9389ed5.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/32531/

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/32531/

@SparkQA

Copy link
Copy Markdown

Test build #127905 has finished for PR 29452 at commit 6b9ded4.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@agrawaldevesh

Copy link
Copy Markdown
Author

retest this please

@agrawaldevesh

Copy link
Copy Markdown
Author

jenkins retest this please

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/32539/

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/32539/

@SparkQA

Copy link
Copy Markdown

Test build #127913 has finished for PR 29452 at commit 6b9ded4.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@agrawaldevesh
agrawaldeveshforce-pushed the consolidate_decom_state branch from 6b9ded4 to 29fe131CompareAugust 26, 2020 07:07
@SparkQA

Copy link
Copy Markdown

Test build #127917 has finished for PR 29452 at commit 29fe131.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@agrawaldevesh

Copy link
Copy Markdown
Author

Hi @holdenk, This PR is back in your court to review again. @Ngone51 is fine with the new set of changes. If it looks good, please feel free to merge it in. Thank you !

@holdenk

Copy link
Copy Markdown
Contributor

Jenkins retest this please

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/32559/

@SparkQA

Copy link
Copy Markdown

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/32559/

@holdenk

Copy link
Copy Markdown
Contributor

This looks good to me I'm going to go ahead and merge this.

@SparkQA

Copy link
Copy Markdown

Test build #127933 has finished for PR 29452 at commit 29fe131.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@agrawaldevesh

Copy link
Copy Markdown
Author

Thank you @holdenk for shepherding this all the way through !

@holdenk

Copy link
Copy Markdown
Contributor

Thanks for working on this so much! I’m really excited to launch this feature in 3.1 👍

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@agrawaldevesh@SparkQA@Ngone51@cloud-fan@holdenk@tgravescs@dagrawal3409