Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jul 15, 2025

What changes were proposed in this pull request?

This PR aims to add a config value validation for spark.history.retainedApplications

Why are the changes needed?

To prevent a misleading situation from the beginning.

For example, in case of spark.history.retainedApplications=0, Apache Spark shows a job list, but unable to show a job with Too many redirects... messages. Although this is not a Spark job, a user may be confused that this is a Spark bug.

Screenshot 2025-07-15 at 13 31 29 Screenshot 2025-07-15 at 13 34 23

Does this PR introduce any user-facing change?

No. Previously, SHS didn't work correctly already.

How was this patch tested?

Pass the CIs.

Since this is a check at SparkConf level, the failure happens before SparkHistory server is created. So, we cannot add a test case for this one to HistoryServerSuite.

We can test it manually like the following. SparkHistoryServer stops at the beginning.

25/07/15 13:43:00 INFO FsHistoryProvider: History server ui acls disabled; users with admin permissions: ; groups with admin permissions:
Exception in thread "main" org.apache.spark.SparkIllegalArgumentException: [INVALID_CONF_VALUE.REQUIREMENT] The value '0' in the config "spark.history.retainedApplications" is invalid. The number of applications to retain should be a positive integer. SQLSTATE: 22022

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

No.

@github-actions github-actions bot added the CORE label Jul 15, 2025
@dongjoon-hyun
Copy link
Member Author

cc @peter-toth

@dongjoon-hyun
Copy link
Member Author

Thank you, @peter-toth !

@dongjoon-hyun
Copy link
Member Author

Since this is a simple config value check, I'll merge this for Apache Spark 4.1.0-preview2.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-52808 branch July 15, 2025 22:52
Sign up for free to 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.

2 participants