[
https://issues.apache.org/jira/browse/MAPREDUCE-4105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13248762#comment-13248762
]
Tom White commented on MAPREDUCE-4105:
--------------------------------------
> The test checks that setConf() is called by inspecting the script filename is
> correct (which is passed through the conf).
I see. RackResolver.getDnsToSwitchMapping() is a new method that is just used
by the test. Generally it's not a good idea to add things that are only used by
tests, but maybe a getter is harmless. You could make it package private though
and add a comment saying it is for tests, or add @VisibleForTesting.
> The reason for adding a new test class is that RackResolver.init() is a
> static method, and it checks if it was called before and returns.
The fact that RackResolver has static state is a deeper problem, which putting
the test into another class doesn't solve. What if TestRackResolver runs before
TestRackResolverScriptBasedMapping? Can we make RackResolver non-static?
> DNSToSwitchMapping is not Configurable.
No, but ScriptBasedMapping is. You don't need to change the DNSToSwitchMapping
interface.
> Yarn RackResolver ignores rack configurations
> ---------------------------------------------
>
> Key: MAPREDUCE-4105
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4105
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Components: mrv2
> Affects Versions: 0.23.1
> Reporter: Ahmed Radwan
> Assignee: Ahmed Radwan
> Fix For: 0.23.2
>
> Attachments: MAPREDUCE-4105.patch
>
>
> Incorrect mappings because the Yarn RackResolver ignores rack configurations.
> This can be verified by inspecting the resource manager web ui that lists all
> the nodes, all of them show up with /default-rack regardless of the output
> from the script specified using net.topology.script.file.name configuration
> property.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira