-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-17761. [ARR] RouterNetworkTopologyServlet adapts to async router rpc. #7533
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
e538f20
to
af2df38
Compare
@KeeProMise Could you please help review this pr when have free time? |
🎊 +1 overall
This message was automatically generated. |
The checkstyle problem was caused by #7535 , which has been reverted. ![]() |
🎊 +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.
Hi @hfutatzhanghb Thanks for your contribution. Leave some comments.
.../main/java/org/apache/hadoop/hdfs/server/federation/router/RouterNetworkTopologyServlet.java
Show resolved
Hide resolved
...t/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterNetworkTopologyServlet.java
Outdated
Show resolved
Hide resolved
🎊 +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.
LGTM! hi @slfan1989 If you have time, please help review the unit test.
@KeeProMise Thank you for inviting me to review this PR! I will check the related unit tests as soon as possible. We are in the process of upgrading the HDFS Router to JUnit5, and one PR has already been merged, while another PR (#7531) has been approved. Once #7531 is merged, I plan to monitor it for 1-2 days to ensure everything is working correctly, and then we will merge this PR. Therefore, the merge of this PR may be delayed until this weekend or early next week. cc: @hfutatzhanghb |
No problems! Thanks @slfan1989 @KeeProMise . |
820b870
to
85f28de
Compare
🎊 +1 overall
This message was automatically generated. |
...t/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterNetworkTopologyServlet.java
Show resolved
Hide resolved
} | ||
} | ||
|
||
class RouterServerHelper implements BeforeEachCallback, AfterAllCallback { |
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 have a question. Shouldn't RouterServerHelper be extracted from this class and made into a separate utility class?
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, @slfan1989 . Actually, I'd ever consider this way, but i found each test class have its own initialize logic. For example, some test class may need mkdis or addMountPoints which is unused for other test class. What's your opinions?
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 believe the current changes in this PR are acceptable, but it would be better to extract RouterServerHelper
to avoid potential code redundancy.
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.
Maybe we can merge this firstly and i will try to extract common logic in #7470 ?
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 Do you have any other suggestions? We can take a look at the details in #7470 first. If you think there are no issues, we can merge this PR anytime. Thanks again!
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 @slfan1989 LGTM.
@hfutatzhanghb Thanks for your contribution, @slfan1989 thanks for your review. merged! |
Thanks all for reviewing and merging!!! |
… rpc. (apache#7533). Contributed by hfutatzhanghb. Reviewed-by: Jian Zhang <[email protected]> Reviewed-by: Shilun Fan <[email protected]>
Description of PR
RouterNetworkTopologyServlet adapts to async router rpc.
Currently, we will get NPE when request RouterNetworkTopologyServlet using async router rpc. Logs as below:
How was this patch tested?
Add an unit test.