-
Notifications
You must be signed in to change notification settings - Fork 9k
HDFS-17640.[ARR] RouterClientProtocol supports asynchronous rpc. #7188
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
Conversation
💔 -1 overall
This message was automatically generated. |
a285ede
to
8511acd
Compare
💔 -1 overall
This message was automatically generated. |
8511acd
to
8944771
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@Hexiaoqiao Hi, if you have time, please help to take a look at this PR, thanks! |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
RemoteMethod method = new RemoteMethod("rename", | ||
new Class<?>[] {String.class, String.class}, | ||
new RemoteParam(), dstParam); | ||
isMultiDestDirectory(src); |
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.
Duplicate name here?
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.
Addendum: What this method invoke want to do? Thanks.
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.
HI, @Hexiaoqiao, this is the asynchronous implementation corresponding to the rename method of RouterClientProtocol below. It calls isMultiDestDirectory and obtains the return value of isMultiDestDirectory through asyncApply(...) for subsequent processing.
// RouterClientProtocol#rename
RemoteMethod method = new RemoteMethod("rename",
new Class<?>[] {String.class, String.class},
new RemoteParam(), dstParam);
if (isMultiDestDirectory(src)) {
if (locs.size() != srcLocations.size()) {
throw new IOException("Rename of " + src + " to " + dst + " is not"
+ " allowed. The number of remote locations for both source and"
+ " target should be same.");
}
return rpcClient.invokeAll(locs, method);
} else {
return rpcClient.invokeSequential(locs, method, Boolean.class,
Boolean.TRUE);
}
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.
Got it, thanks. Others look good to me.
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.
LGTM. +1.
@hfutatzhanghb thanks for your contribution, and @Hexiaoqiao thanks for your review, merged. |
…che#7188) Co-authored-by: Jian Zhang <keepromise@apache.org>
…che#7188) Co-authored-by: Jian Zhang <keepromise@apache.org>
…che#7188) Co-authored-by: Jian Zhang <keepromise@apache.org>
…che#7188) Co-authored-by: Jian Zhang <keepromise@apache.org>
…che#7188) Co-authored-by: Jian Zhang <keepromise@apache.org>
Co-authored-by: Jian Zhang <keepromise@apache.org>
…che#7188) Co-authored-by: Jian Zhang <keepromise@apache.org>
…che#7188) Co-authored-by: Jian Zhang <keepromise@apache.org>
…che#7188) Co-authored-by: Jian Zhang <keepromise@apache.org>
…che#7188) Co-authored-by: Jian Zhang <keepromise@apache.org>
…che#7188) Co-authored-by: Jian Zhang <keepromise@apache.org>
Description of PR
RouterClientProtocol should support asynchronous rpc.