-
Notifications
You must be signed in to change notification settings - Fork 134
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
Conversation
…anager for fetchClientConf rpc
proto/src/main/proto/Rss.proto
Outdated
@@ -463,6 +464,12 @@ message AccessClusterResponse { | |||
string uuid = 3; | |||
} | |||
|
|||
message FetchClientConfRequest { | |||
string user = 1; | |||
// for the potential extension for customize delegation shuffle manager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate more?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, this is illegal
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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())?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
…Strategy` for `fetchClientConf` rpc (apache#1710) Introduce pluggable ClientConfApplyManager for fetchClientConf rpc For apache#1709 Yes. Unit tests
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