-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
HDFS-17333. DFSClient supports lazy resolution from hostname to IP. #6430
Conversation
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
@Hexiaoqiao hi, could you please help to review, thanks a lot! |
Can anyone help review it? Thanks. |
Hi @tasanuma @Hexiaoqiao @zhangshuyan0, |
Hi @tasanuma @Hexiaoqiao @zhangshuyan0, @slfan1989 |
@KeeProMise Sorry for being very late. This is a nice feature and the PR looks pretty good to me. It's been a long time since Jenkins last ran, so I've triggered it to run again. If there are no issues, I'll merge this PR. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@tasanuma Hi, thank you for reviewing this PR. I don't think the issues in unit testing and spotbugs are related to my code. Could you please help me review it 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.
LGTM.
I made a slight change to the title to avoid including symbols, then merged it. |
@tasanuma Thanks for your review and merge it! |
…6430) Signed-off-by: Takanobu Asanuma <[email protected]> (cherry picked from commit a6aa292)
Description of PR
see also: HDFS-17333
Currently, When the dfsclient initializes, it will resolve all hosts of all namservices:
at DFSUtilClient#getAddresses(conf, null, addressKey)
at AbstractNNFailoverProxyProvider#getProxyAddresses(URI uri, String addressKey)
If the current environment where the dfsClient is located causes resolution of host->ip to be very slow, the existing logic will undoubtedly take a long time when there are too many nameservices.
Now, each dfsclient only needs the IPs of all namenodes of a certain nameservice at most. A better situation is that if the namenode selected by dfsclient for the first time can provide the required services normally, then the client only needs to know the IP of this namenode. Therefore, it is not necessary to resolve all namenodes of all nameservices in the configuration file, when the dfsclient initializes.
This patch supports lazy resolution of host->ip, which will only be resolved when the host needs to be accessed.
How was this patch tested?
new ut TestConfiguredFailoverProxyProvider#testLazyResolved() and TestDFSUtil#testLazyResolved()
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?