[#1554] feat(spark): Fetch dynamic client conf as early as possible by EnricoMi · Pull Request #1557 · apache/uniffle · GitHub
Skip to content

[#1554] feat(spark): Fetch dynamic client conf as early as possible#1557

Merged
zuston merged 8 commits into
apache:masterfrom
G-Research-Forks:dynamic-client-conf
Mar 14, 2024
Merged

[#1554] feat(spark): Fetch dynamic client conf as early as possible#1557
zuston merged 8 commits into
apache:masterfrom
G-Research-Forks:dynamic-client-conf

Conversation

@EnricoMi

@EnricoMi EnricoMi commented Mar 5, 2024

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Fetches dynamic client config as early as possible, to be able to use dynamic client config to create the shuffle client with updated config.

Why are the changes needed?

Providing config or the shuffle client via coordinator is operationally useful as cluster-wide settings can be deployed through the cluster and changed over time. Clients and apps do not need to change configs.

Fixes Spark part of #1554

Does this PR introduce any user-facing change?

More configs can be provided via coordinators.

How was this patch tested?

Existing and follow-up unit tests.

@github-actions

github-actions Bot commented Mar 5, 2024

Copy link
Copy Markdown

conf.set(RssSparkConfig.RSS_DYNAMIC_CLIENT_CONF_ENABLED.key(), "false");
conf.set(RssSparkConfig.RSS_ACCESS_ID.key(), "mockId");
conf.set(RssSparkConfig.RSS_ENABLED.key(), "true");
conf.set(RssSparkConfig.RSS_STORAGE_TYPE.key(), "MEMORY_LOCALFILE");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we need to add this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This test further down asserts an exception is thrown. Moving RssSparkShuffleUtils.validateRssClientConf(sparkConf) up in the RssShuffleManager constructor throws a different exception if the storage type is not set.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Coordinator can apply the storage type to the client. Will this pull request affect this feature.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This test calls into new RssShuffleManager(sparkConf, false), which mimics creating the shuffle manager on an executor, and executors do not fetch dynamic config, so the given sparkConf must have the storage type set for the test.

The logic of applying config is unchanged, this only happens earlier. I presume there are tests for this use case, which should check the desired behaviour is preserved.

Comment thread client-spark/spark3/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java Outdated
Comment thread client-spark/spark3/src/main/java/org/apache/spark/shuffle/RssShuffleManager.java Outdated
@zuston

zuston commented Mar 6, 2024

Copy link
Copy Markdown
Member

And I think the PR title is not proper for this change, which don't reflect the feature of overwriting the existing client conf.

@codecov-commenter

codecov-commenter commented Mar 6, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 92.30769% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 54.94%. Comparing base (9737d57) to head (33ac575).

Files Patch % Lines
...org/apache/spark/shuffle/RssSparkShuffleUtils.java 80.00% 0 Missing and 1 partial ⚠️
...uniffle/shuffle/manager/RssShuffleManagerBase.java 95.23% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1557      +/-   ##
============================================
+ Coverage     53.96%   54.94%   +0.98%     
- Complexity     2858     2862       +4     
============================================
  Files           438      418      -20     
  Lines         24793    22455    -2338     
  Branches       2109     2111       +2     
============================================
- Hits          13379    12339    -1040     
+ Misses        10576     9348    -1228     
+ Partials        838      768      -70     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EnricoMi

EnricoMi commented Mar 6, 2024

Copy link
Copy Markdown
Contributor Author

... overwriting the existing client conf.

this is not new, this existed before

@EnricoMi EnricoMi force-pushed the dynamic-client-conf branch from b687162 to 5d5cd9d Compare March 6, 2024 07:20
@EnricoMi EnricoMi force-pushed the dynamic-client-conf branch from 187ed27 to d97f826 Compare March 7, 2024 10:44
zuston
zuston previously approved these changes Mar 13, 2024

@zuston zuston left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.

@zuston

zuston commented Mar 13, 2024

Copy link
Copy Markdown
Member

Could you help resolve the conflict? @EnricoMi

@EnricoMi EnricoMi force-pushed the dynamic-client-conf branch from cc564bb to 33ac575 Compare March 13, 2024 10:13
@EnricoMi

Copy link
Copy Markdown
Contributor Author

@zuston zuston merged commit de50442 into apache:master Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants