Skip to content

Conversation

@srowen
Copy link
Member

@srowen srowen commented Sep 26, 2023

What changes were proposed in this pull request?

Remove Mesos resource manager support and docs, previously deprecated in Spark 3.2, for Spark 4.0.

Why are the changes needed?

Mesos is no longer supported and has been deprecated for several versions.

Does this PR introduce any user-facing change?

Other than the lack of Mesos support, no

How was this patch tested?

Existing tests.

Was this patch authored or co-authored using generative AI tooling?

No

Copy link
Contributor

@mridulm mridulm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

9 lines more, and it would have been an event 10k lines removed :-)

@LuciferYang
Copy link
Contributor

9 lines more, and it would have been an event 10k lines removed :-)

A satisfying operation, hahaha ~

@LuciferYang
Copy link
Contributor

if (state == TaskState.LOST) {
// TaskState.LOST is only used by the deprecated Mesos fine-grained scheduling mode,
// where each executor corresponds to a single task, so mark the executor as failed.
val execId = taskIdToExecutorId.getOrElse(tid, {
val errorMsg =
"taskIdToTaskSetManager.contains(tid) <=> taskIdToExecutorId.contains(tid)"
taskSet.abort(errorMsg)
throw new SparkException(
"taskIdToTaskSetManager.contains(tid) <=> taskIdToExecutorId.contains(tid)")
})
if (executorIdToRunningTaskIds.contains(execId)) {
reason = Some(
ExecutorProcessLost(
s"Task $tid was lost, so marking the executor as lost as well."))
removeExecutor(execId, reason.get)
failedExecutor = Some(execId)
}
}

Does this part need to be fixed?

@LuciferYang
Copy link
Contributor

* The reasons for this are discussed in https://github.com/mesos/spark/pull/718

In addition, does this line of comment still need to be retained?

@srowen
Copy link
Member Author

srowen commented Sep 27, 2023

I noticed the TaskState.LOST comment, but was reluctant to actually totally remove handling of this event in case the comment was wrong.
the link to the explanation in the Mesos issue is still valid, just happens to come from a really old Mesos issue on Github

@LuciferYang
Copy link
Contributor

I noticed the TaskState.LOST comment, but was reluctant to actually totally remove handling of this event in case the comment was wrong. the link to the explanation in the Mesos issue is still valid, just happens to come from a really old Mesos issue on Github

fine to me

@srowen
Copy link
Member Author

srowen commented Sep 27, 2023

It looks like the tests actually passed but showing failed - I'm not quite sure what to make of the failure in 'reporting results'.
EDIT: Oh wait now it shows passed.

@srowen srowen closed this in c596731 Sep 28, 2023
@srowen
Copy link
Member Author

srowen commented Sep 28, 2023

Merged to master

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, late LGTM.

dongjoon-hyun pushed a commit that referenced this pull request Dec 26, 2023
…il.Utils#getConfiguredLocalDirs`

### What changes were proposed in this pull request?
This PR cleans up an unused local variables from `org.apache.spark.util.Utils#getConfiguredLocalDirs` function, It is no longer used after the support for Mesos was removed in SPARK-44442 (#43135).

### Why are the changes needed?
Code clean up

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Pass GitHub Actions

### Was this patch authored or co-authored using generative AI tooling?
No

Closes #44475 from LuciferYang/utils-useless.

Lead-authored-by: yangjie01 <[email protected]>
Co-authored-by: YangJie <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
dongjoon-hyun added a commit that referenced this pull request Oct 2, 2024
…l in REST API

### What changes were proposed in this pull request?

This PR aims to make `appArgs` and `environmentVariables` fields optional in REST API.

### Why are the changes needed?

`appArgs` and `environmentVariables` became mandatory due to the Apache Mesos limitation at Spark 2.2.2. Technically, this is a revert of SPARK-22574.
- #19966

Since Apache Spark 4.0 removed Mesos support, we don't need these requirements.
- #43135

### Does this PR introduce _any_ user-facing change?

No because this is a relaxation of enforcement.

### How was this patch tested?

Pass the CIs with the revised test case.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #48316 from dongjoon-hyun/SPARK-49845.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
dongjoon-hyun added a commit that referenced this pull request Feb 12, 2025
…Impl`

### What changes were proposed in this pull request?

This PR aims to remove `TaskState.LOST` logic from `TaskSchedulerImpl` from Apache Spark 4.1.0.

https://github.com/apache/spark/blob/6440bdec8af64f0d6b55d53eacb2591eaf8eb859/core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala#L789-L790

### Why are the changes needed?

Since Apache Spark 4.0.0, `Apache Mesos` code is removed completely. Since `TaskState.LOST` is no longer used, we had better clean up this unused code to simplify the logic.

- #43135

Please note that this PR didn't aim to remove `LOST` enum value from `TaskState` because it's exposed like the following although it's `private[spark]`.
- https://spark.apache.org/docs/4.0.0-preview2/api/java/org/apache/spark/TaskState.html

![Screenshot 2025-02-12 at 13 11 03](https://github.com/user-attachments/assets/d47af16e-f7c8-44e8-8e62-b77b6f0e9eb4)

### Does this PR introduce _any_ user-facing change?

No, behavior change.

### How was this patch tested?

Pass the CIs.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #49913 from dongjoon-hyun/SPARK-51184.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants