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

Ahmed Radwan commented on MAPREDUCE-4105:
-----------------------------------------

I see your point and agree that  ScriptBasedMapping is configurable because it 
has The AbstractDNSToSwitchMapping as a superclass which implements both 
DNSToSwitchMapping and Configurable interfaces. 

But the RackResolver uses the DNSToSwitchMapping interface to create the new 
DNSToSwitchMapping:

{code}
Constructor<? extends DNSToSwitchMapping> dnsToSwitchMappingConstructor
                       = dnsToSwitchMappingClass.getConstructor();
DNSToSwitchMapping newInstance =
    dnsToSwitchMappingConstructor.newInstance();
{code}

This is why I needed to add the setConf() method to the DNSSwitchMapping 
interface to just keep using the interface instead of tying RackResolver to a 
specific implementation of this interface. Alternatively I can make 
DNSToSwitchMapping extends Configurable (which will require adding the 
getConf() method to a couple of places). What do you think?
                
> 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, MAPREDUCE-4105_rev2.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

        

Reply via email to