-
Notifications
You must be signed in to change notification settings - Fork 9k
HDFS-17733. [ARR] Optimize isMultiDestDirectory method using AsyncUtil class #7415
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. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@Hexiaoqiao @KeeProMise Sir, cc when you have free time, thanks. |
@Override | ||
public boolean isMultiDestDirectory(String src) throws IOException { | ||
try { | ||
asyncComplete(false); |
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, @hfutatzhanghb don’t need to add this here. If the code inside the asyncTry block executes without any exceptions, a CompletableFuture containing true or false will definitely be set to the thread-local variable. If the asyncTry block throws an UnresolvedPathException, it can be caught by asyncCatch and a CompletableFuture containing false will be set to the thread-local variable. If the asyncTry block throws any other exception, a CompletableFuture containing that exception will be set to the thread-local variable for the outer method to handle, which is consistent with the original synchronous logic.
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.
@KeeProMise very nice suggestion, thanks for reviewing. have fixed.
718d1c2
to
aaa360e
Compare
aaa360e
to
b4ffc60
Compare
💔 -1 overall
This message was automatically generated. |
.../server/federation/router/async/TestRouterAsyncRPCMultipleDestinationMountTableResolver.java
Outdated
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@slfan1989 Hi,Sir. Build met below problem when i add java document to class. It is the same with #7280 . Maybe we should fix this build problem. What's your opinons? Thanks. Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:javadoc-no-fork (default-cli) on project hadoop-hdfs-rbf: An error has occurred in Javadoc report generation:
[ERROR] Exit code: 1 - javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module. |
💔 -1 overall
This message was automatically generated. |
@hfutatzhanghb Thank you for the feedback on this issue. I will continue to follow up on it. I have encountered this before, and it was fixed in the last 1-2 days. Personally, I feel it might be due to the ARR feature merge, but this should be a minor issue. |
Okay, Sir. And i will attempt to remove the javadoc of class TestRouterAsyncRPCMultipleDestinationMountTableResolver and see whether it can build successfully or not. Thanks a lot. |
@hfutatzhanghb I noticed the following error
|
Oh. Got it. Thanks a lot. Sir. |
should remove the comment. |
@KeeProMise Thanks sir, have fixed. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
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.
@hfutatzhanghb LGTM!
Hi, @Hexiaoqiao if you have time, please help to take a look at this PR, 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.
LGTM for most part, just leave some nit comments inline. Will +1 once confirm. Thanks.
.../server/federation/router/async/TestRouterAsyncRPCMultipleDestinationMountTableResolver.java
Show resolved
Hide resolved
.../server/federation/router/async/TestRouterAsyncRPCMultipleDestinationMountTableResolver.java
Show resolved
Hide resolved
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.
🎊 +1 overall
This message was automatically generated. |
Hi, @Hexiaoqiao |
Committed to trunk. Thanks @hfutatzhanghb . |
…l class (apache#7415). Contributed by hfutatzhanghb. Reviewed-by: Jian Zhang <[email protected]> Signed-off-by: He Xiaoqiao <[email protected]>
Description of PR
Optimize isMultiDestDirectory method using AsyncUtil class
How was this patch tested?
add unit tests.