Add unresolved local service address recovery #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Sometimes after a deploy, resource managers get stuck in a state where they can't support specific job types that require HDFS delegation. It manifests into this error in those jobs:
Recycling the resource managers seems to resolve the condition.
See also: https://git.hubteam.com/HubSpot/HadoopPlanning/issues/326
Solution
My intuition of the problem here is that domain name in these objects isn't resolving at the time of creation. We have no explanation for that condition currently, but this code gives us a way to confirm or deny that while also improving the situation for customers. We reconstruct the
InetSocketAddress
to force resolution of the domain name so thegetAddress()
call doesn't return null. Also provide logging to gather data on how often this happens and if this recovers as expected.Testing
We will want to test this in a few clusters to verify no regressions, but otherwise this should be benign.