[ 
https://issues.apache.org/jira/browse/HADOOP-19447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17937387#comment-17937387
 ] 

ASF GitHub Bot commented on HADOOP-19447:
-----------------------------------------

hadoop-yetus commented on PR #7527:
URL: https://github.com/apache/hadoop/pull/7527#issuecomment-2743158703

   :broken_heart: **-1 overall**
   
   
   
   
   
   
   | Vote | Subsystem | Runtime |  Logfile | Comment |
   |:----:|----------:|--------:|:--------:|:-------:|
   | +0 :ok: |  reexec  |   1m  0s |  |  Docker mode activated.  |
   |||| _ Prechecks _ |
   | +1 :green_heart: |  dupname  |   0m  0s |  |  No case conflicting files 
found.  |
   | +0 :ok: |  codespell  |   0m  1s |  |  codespell was not available.  |
   | +0 :ok: |  detsecrets  |   0m  1s |  |  detect-secrets was not available.  
|
   | +1 :green_heart: |  @author  |   0m  0s |  |  The patch does not contain 
any @author tags.  |
   | +1 :green_heart: |  test4tests  |   0m  0s |  |  The patch appears to 
include 3 new or modified test files.  |
   |||| _ trunk Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |  38m 20s |  |  trunk passed  |
   | +1 :green_heart: |  compile  |  16m 51s |  |  trunk passed with JDK 
Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04  |
   | +1 :green_heart: |  compile  |  14m 39s |  |  trunk passed with JDK 
Private Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06  |
   | +1 :green_heart: |  checkstyle  |   1m 22s |  |  trunk passed  |
   | +1 :green_heart: |  mvnsite  |   1m 42s |  |  trunk passed  |
   | +1 :green_heart: |  javadoc  |   1m 15s |  |  trunk passed with JDK 
Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 48s |  |  trunk passed with JDK 
Private Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06  |
   | +1 :green_heart: |  spotbugs  |   2m 36s |  |  trunk passed  |
   | +1 :green_heart: |  shadedclient  |  37m 18s |  |  branch has no errors 
when building and testing our client artifacts.  |
   |||| _ Patch Compile Tests _ |
   | +1 :green_heart: |  mvninstall  |   0m 56s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  14m 49s |  |  the patch passed with JDK 
Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04  |
   | +1 :green_heart: |  javac  |  14m 49s |  |  the patch passed  |
   | +1 :green_heart: |  compile  |  13m 30s |  |  the patch passed with JDK 
Private Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06  |
   | +1 :green_heart: |  javac  |  13m 30s |  |  the patch passed  |
   | +1 :green_heart: |  blanks  |   0m  0s |  |  The patch has no blanks 
issues.  |
   | -0 :warning: |  checkstyle  |   1m 14s | 
[/results-checkstyle-hadoop-common-project_hadoop-common.txt](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7527/1/artifact/out/results-checkstyle-hadoop-common-project_hadoop-common.txt)
 |  hadoop-common-project/hadoop-common: The patch generated 9 new + 104 
unchanged - 0 fixed = 113 total (was 104)  |
   | +1 :green_heart: |  mvnsite  |   1m 37s |  |  the patch passed  |
   | +1 :green_heart: |  javadoc  |   1m 11s |  |  the patch passed with JDK 
Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04  |
   | +1 :green_heart: |  javadoc  |   0m 50s |  |  the patch passed with JDK 
Private Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06  |
   | -1 :x: |  spotbugs  |   2m 42s | 
[/new-spotbugs-hadoop-common-project_hadoop-common.html](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7527/1/artifact/out/new-spotbugs-hadoop-common-project_hadoop-common.html)
 |  hadoop-common-project/hadoop-common generated 1 new + 0 unchanged - 0 fixed 
= 1 total (was 0)  |
   | +1 :green_heart: |  shadedclient  |  36m  7s |  |  patch has no errors 
when building and testing our client artifacts.  |
   |||| _ Other Tests _ |
   | +1 :green_heart: |  unit  |  14m 50s |  |  hadoop-common in the patch 
passed.  |
   | +1 :green_heart: |  asflicense  |   1m  3s |  |  The patch does not 
generate ASF License warnings.  |
   |  |   | 205m 39s |  |  |
   
   
   | Reason | Tests |
   |-------:|:------|
   | SpotBugs | module:hadoop-common-project/hadoop-common |
   |  |  Should 
org.apache.hadoop.security.SecurityUtil$StandardHostResolver$StandardLoader be 
a _static_ inner class?  At SecurityUtil.java:inner class?  At 
SecurityUtil.java:[lines 636-639] |
   
   
   | Subsystem | Report/Notes |
   |----------:|:-------------|
   | Docker | ClientAPI=1.48 ServerAPI=1.48 base: 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7527/1/artifact/out/Dockerfile
 |
   | GITHUB PR | https://github.com/apache/hadoop/pull/7527 |
   | Optional Tests | dupname asflicense compile javac javadoc mvninstall 
mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets |
   | uname | Linux 7f4731c98efc 5.15.0-130-generic #140-Ubuntu SMP Wed Dec 18 
17:59:53 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux |
   | Build tool | maven |
   | Personality | dev-support/bin/hadoop.sh |
   | git revision | trunk / 7e921a1ca249ac41ab243c90adf08d923db52bd9 |
   | Default Java | Private Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06 |
   | Multi-JDK versions | 
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04 
/usr/lib/jvm/java-8-openjdk-amd64:Private 
Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06 |
   |  Test Results | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7527/1/testReport/ |
   | Max. process+thread count | 1261 (vs. ulimit of 5500) |
   | modules | C: hadoop-common-project/hadoop-common U: 
hadoop-common-project/hadoop-common |
   | Console output | 
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7527/1/console |
   | versions | git=2.25.1 maven=3.6.3 spotbugs=4.2.2 |
   | Powered by | Apache Yetus 0.14.0 https://yetus.apache.org |
   
   
   This message was automatically generated.
   
   




> Add Caching Mechanism to HostResolver to Avoid Redundant Hostname Resolutions
> -----------------------------------------------------------------------------
>
>                 Key: HADOOP-19447
>                 URL: https://issues.apache.org/jira/browse/HADOOP-19447
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: common, yarn
>            Reporter: Jiandan Yang 
>            Priority: Major
>              Labels: pull-request-available
>
> *Background:*
>  
> 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.*
>  
> *Proposal:*
>  
> Introduce a caching mechanism in HostResolver to store resolved hostnames for 
> a configurable duration. This would:
> •Reduce redundant DNS queries.
> •Improve performance for frequently used hostnames.
> •Allow configuration options for cache size and TTL (Time-to-Live).
>  
> *Suggested Implementation:*
> 1.{*}Leverage Existing CachedResolver{*}:
> The NodesListManager.CachedResolver class in Hadoop already implements a 
> caching mechanism for hostname resolution. Instead of introducing an entirely 
> new solution, we propose *extracting the caching logic from* 
> NodesListManager.CachedResolver {*}into a separate reusable utility class{*}.
> 2.{*}Create a Shared Caching Utility{*}:
> •Extract the caching logic from NodesListManager.CachedResolver.
> •Implement a new class, e.g., HostnameCache, and place it in the Hadoop 
> Common module to ensure it can be used across different components.
> 3.{*}Integrate{*} HostnameCache with *HostResolver &QualifiedHostResolver*:
> •Modify HostResolver to use HostnameCache for hostname lookups.
> •Update NodesListManager.CachedResolver to use HostnameCache instead of its 
> own internal cache.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to