Skip to content

[AMORO-4542][AMS] Support configurable Spark optimizer application names - #4544

Open
Jetiaime wants to merge 1 commit into
apache:masterfrom
Jetiaime:spark-optimizer-app-name-pr
Open

Jetiaime wants to merge 1 commit into
apache:masterfrom
Jetiaime:spark-optimizer-app-name-pr

Conversation

@Jetiaime

Copy link
Copy Markdown

Why are the changes needed?

Closes #4542.

The AMS Spark container and the Spark driver currently choose their names independently. Use the existing Spark option so a configured name is visible consistently at submission and in the Spark driver.

Brief change log

  • Resolve spark.app.name using the existing group-over-container precedence and pass it once. Preserve argument boundaries for spaces and quotes, and reject multiline names.
  • Have the Spark driver honor the supplied name. Without an AMS override, use the driver's existing amoro-spark-optimizer-<resource-id> template. This replaces the old AMS-generated default that also contained the group name.
  • Leave Kubernetes driver pod naming unchanged. Do not change proxy-user arguments, YARN application ID extraction, or optimizer release logic.

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible
  • Add screenshots for manual tests if appropriate
  • Run test locally before making a pull request

9 targeted test cases passed on JDK 11 (four new tests and five existing container tests). The main regression also fails when compiled against the unchanged upstream launcher and passes with this patch. The corresponding Maven validate and whitespace checks also passed. Screenshots are not applicable.

./mvnw -o -B -ntp -pl amoro-ams,amoro-optimizer/amoro-optimizer-spark -am -Pskip-dashboard-build -Dtest=TestSparkOptimizerContainer,TestSparkOptimizerContainerApplicationName -Dsurefire.failIfNoSpecifiedTests=false test

No live cluster run was performed on this split branch.

Documentation

  • Does this pull request introduce a new feature? Yes.
  • If yes, how is the feature documented? Docs, in the optimizer management guide.

@github-actions github-actions Bot added type:docs Improvements or additions to documentation module:ams-server Ams server module module:ams-optimizer AMS optimizer module labels Nov 26, 2026

This branch has not been deployed

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

Labels

module:ams-optimizer AMS optimizer module module:ams-server Ams server module type:docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement]: Support configurable Spark optimizer application names

1 participant