HADOOP-19447. Add Caching Mechanism to HostResolver to Avoid Redundant Hostname Resolutions#7527
Conversation
…t Hostname Resolutions
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
@slfan1989 @TaoYang526 Could you help review this PR? |
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/ExpiringCache.java
Outdated
Show resolved
Hide resolved
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
@slfan1989 I have updated PR based on your suggestion, and using guava‘s LoadingCache significantly simplifys the code and improve readability. |
...common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeys.java
Outdated
Show resolved
Hide resolved
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java
Outdated
Show resolved
Hide resolved
|
🎊 +1 overall
This message was automatically generated. |
|
@yangjiandan Thank you for your contribution. I will review this PR tomorrow. |
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java
Outdated
Show resolved
Hide resolved
|
🎊 +1 overall
This message was automatically generated. |
|
@slfan1989 @TaoYang526 Thanks again for your feedback! |
|
+1 LGTM |
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java
Show resolved
Hide resolved
...common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/CommonConfigurationKeys.java
Show resolved
Hide resolved
|
🎊 +1 overall
This message was automatically generated. |
|
Hi, @slfan1989, just checking in. |
|
@yangjiandan Thanks for the contribution! LGTM. |
|
Hi, @slfan1989 and @TaoYang526 Thanks a lot for your review and the +1! |
@TaoYang526 Do you have any other suggestions? |
|
@slfan1989 No more suggestions from my side. |
|
Hi, @slfan1989 @TaoYang526, |
|
@yangjiandan Thanks for the contribution! @TaoYang526 Thanks for the review! |
Description of PR
Currently, the two implementations of org.apache.hadoop.security.SecurityUtil.HostResolver, StandardHostResolver and QualifiedHostResolver in Hadoop performs hostname resolution each time it is called. Each heartbeat between the AM and RM causes the RM to invoke the HostResolver#getByName method once. In large-scale clusters running numerous applications, this results in a high frequency of redundant hostname resolutions.
see HADOOP-19447
How was this patch tested?
current UT and newly developed UT