Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1538] feat(spark): report blockIds to spark driver optionally #1677

Merged
merged 11 commits into from
May 11, 2024

Conversation

zuston
Copy link
Member

@zuston zuston commented May 7, 2024

What changes were proposed in this pull request?

Support report blockIds from shuffle-servers to spark driver optionally

Why are the changes needed?

Fix: #1538

Does this PR introduce any user-facing change?

Yes. rss.client.blockId.selfManagedEnabled is introduced, default value is false.

How was this patch tested?

Integration tests.

Copy link

github-actions bot commented May 7, 2024

Test Results

 2 391 files  ±0   2 391 suites  ±0   4h 57m 52s ⏱️ + 16m 22s
   926 tests ±0     925 ✅ ±0   1 💤 ±0  0 ❌ ±0 
10 726 runs  ±0  10 712 ✅ ±0  14 💤 ±0  0 ❌ ±0 

Results for commit 55a0fe0. ± Comparison against base commit ae72831.

♻️ This comment has been updated with latest results.

import org.apache.uniffle.common.util.RssUtils;

/** The class is to manage the shuffle data blockIds in spark driver side. */
public class BlockIdManager {
Copy link
Contributor

Choose a reason for hiding this comment

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

I have a little concern about performance. We ever stored all block ids in one shuffle server. It has poor performance. Because bitmap has poor performance.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I will try this and apply this into production to check the performance

@@ -37,6 +37,12 @@

public class RssSparkConfig {

public static final ConfigOption<Boolean> RSS_CLIENT_BLOCK_ID_SELF_MANAGED_ENABLED =
ConfigOptions.key("rss.client.blockId.selfManagedEnabled")
Copy link
Contributor

Choose a reason for hiding this comment

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

selfManagementEnabled?

Copy link
Member Author

Choose a reason for hiding this comment

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

selfmanaged is adjective. Here the noun is more proper. 👍

Copy link
Contributor

@jerqi jerqi May 10, 2024

Choose a reason for hiding this comment

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

Maybe we should remove client word to align other blockId config options.

Except, I'm a little worried about the config options about Uniffle. Because there are some less elegant issues. client seems extra. Don't use camel style. Proper segments.

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe we should remove client word to align other blockId config options.

Done

Except, I'm a little worried about the config options about Uniffle. Because there are some less elegant issues. client seems extra. Don't use camel style. Proper segments.

This could be optimized because we have the discard mechanism in configOption, that need to be detailed in doc.

@@ -244,7 +244,7 @@ public int compare(String o1, String o2) {
.get(RSS_CLIENT_BLOCK_ID_SELF_MANAGED_ENABLED);
if (ClientType.GRPC == clientType && !blockIdSelfManagedEnabled) {
// TODO skip validating for GRPC_NETTY, needs to mock ShuffleServerNettyHandler
// TODO: skip validating when blockId is managed in spark driver side.
// skip validating when blockId is managed in spark driver side.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you can remove the TODO in the 246 line, too.

Copy link
Member Author

Choose a reason for hiding this comment

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

No. todo in 246 is reasonable.

@jerqi
Copy link
Contributor

jerqi commented May 10, 2024

You need to add a document for this.

@zuston
Copy link
Member Author

zuston commented May 10, 2024

You need to add a document for this.

Yes I will if you have other comments.

jerqi
jerqi previously approved these changes May 10, 2024
Copy link
Contributor

@jerqi jerqi left a comment

Choose a reason for hiding this comment

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

LGTM, wait for your performance report.

@zuston
Copy link
Member Author

zuston commented May 10, 2024

LGTM, wait for your performance report.

This should wait some time 😁

@zuston zuston requested a review from jerqi May 11, 2024 02:06
@zuston
Copy link
Member Author

zuston commented May 11, 2024

Minor update. PTAL @jerqi

Copy link
Contributor

@jerqi jerqi left a comment

Choose a reason for hiding this comment

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

Wait for the performance report.

@zuston
Copy link
Member Author

zuston commented May 11, 2024

Wait for the performance report.

I think I will merge this. When this feature is appied in our internal cluster, the performance report will be attached.

@jerqi
Copy link
Contributor

jerqi commented May 11, 2024

Wait for the performance report.

I think I will merge this. When this feature is appied in our internal cluster, the performance report will be attached.

Ok for me, too.

@zuston zuston merged commit 313d4e0 into apache:master May 11, 2024
41 checks passed
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.

[FEATURE] Optional blockIds report from remote shuffle-server to individual spark driver
2 participants