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

[#1709] feat(coordinator): Introduce pluggable ClientConfApplyManager for fetchClientConf rpc #1710

Merged
merged 5 commits into from
May 16, 2024

Conversation

zuston
Copy link
Member

@zuston zuston commented May 13, 2024

What changes were proposed in this pull request?

Introduce pluggable ClientConfApplyManager for fetchClientConf rpc

Why are the changes needed?

For #1709

Does this PR introduce any user-facing change?

Yes.

How was this patch tested?

Unit tests

Copy link

github-actions bot commented May 13, 2024

Test Results

 2 405 files  +14   2 405 suites  +14   4h 57m 34s ⏱️ +48s
   931 tests + 3     930 ✅ + 3   1 💤 ±0  0 ❌ ±0 
10 791 runs  +37  10 777 ✅ +37  14 💤 ±0  0 ❌ ±0 

Results for commit 564fb53. ± Comparison against base commit d4a5fb7.

♻️ This comment has been updated with latest results.

@@ -463,6 +464,12 @@ message AccessClusterResponse {
string uuid = 3;
}

message FetchClientConfRequest {
string user = 1;
// for the potential extension for customize delegation shuffle manager
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you elaborate more?

Copy link
Member Author

Choose a reason for hiding this comment

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

I will put more internal job properties in internal DelegationShuffleManager, and then extend the internal ClientConfStrategy to apply specific rss conf to job.

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you give more comments for this pull request?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

if (exts != null && exts.size() == 1) {
return exts.get(0);
}
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

What will it happen if we have two extensions?

Copy link
Member Author

@zuston zuston May 15, 2024

Choose a reason for hiding this comment

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

Currently, this is illegal

Copy link
Contributor

Choose a reason for hiding this comment

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

So maybe we should throw an IllegalException instead of returning null value.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@@ -351,7 +351,7 @@ public RssFetchClientConfResponse fetchClientConf(RssFetchClientConfRequest requ
rpcResponse =
blockingStub
.withDeadlineAfter(request.getTimeoutMs(), TimeUnit.MILLISECONDS)
.fetchClientConf(Empty.getDefaultInstance());
.fetchClientConfV2(request.toProto());
Copy link
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 v2?

Copy link
Member Author

Choose a reason for hiding this comment

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

fetchClientConf uses the empty request, it's hard to extend for this PR.

}

public boolean isEmpty() {
return user == null && properties == null;
Copy link
Contributor

Choose a reason for hiding this comment

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

What will it happen if properties is empty?

Copy link
Member Author

Choose a reason for hiding this comment

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

It will return the conf directly to be compatible with the previous logic from older client.

Copy link
Contributor

Choose a reason for hiding this comment

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

user == null && CollectionUtils.isEmpty(properties)?

Copy link
Member Author

@zuston zuston May 15, 2024

Choose a reason for hiding this comment

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

Map could not be checked in CollectionUtils.

Copy link
Contributor

Choose a reason for hiding this comment

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

user == null && (properties == null || properties.isEmpty())?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

Choose a reason for hiding this comment

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

Map could not be checked in CollectionUtils.

Maybe we can use MapUtils.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh yes. Let's reserve this in this PR.

@zuston zuston merged commit 93f4347 into apache:master May 16, 2024
41 checks passed
zuston added a commit to zuston/incubator-uniffle that referenced this pull request May 27, 2024
…Strategy` for `fetchClientConf` rpc (apache#1710)

Introduce pluggable ClientConfApplyManager for fetchClientConf rpc

For apache#1709

Yes.

Unit tests
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.

None yet

3 participants