You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Joep Rottinghuis (JIRA)" <ji...@apache.org> on 2013/01/11 23:12:12 UTC

[jira] [Created] (MAPREDUCE-4939) Faulty getLocations input split passed on blindly to topology script

Joep Rottinghuis created MAPREDUCE-4939:
-------------------------------------------

             Summary: Faulty getLocations input split passed on blindly to topology script
                 Key: MAPREDUCE-4939
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4939
             Project: Hadoop Map/Reduce
          Issue Type: Bug
    Affects Versions: 0.20.205.0, 2.0.3-alpha
            Reporter: Joep Rottinghuis


When users implement a (faulty) InputSplit that returns splits that do not map to hostnames, they get passed on to the topology script.

Call stack on 0.20 equivalent code:
o.a.h.net.NetworkTopology.add
o.a.h.mapred.JobTracker.addHostToNodeMapping
o.a.h.mapred.JobTracker.resolveAndAddToTopology
o.a.h.mapred.JobInProgress.createCache
o.a.h.mapred.JobInProgress.initTasks
o.apache.hadoop.mapred.JobTracker.initJob

The CachedDNSToSwitchMapping wraps RawScriptBasedMapping (if a topology script is configured).

The arguments (input splits) are simply passed to the topology script as arguments without any further checks.
The input split could incorrectly return a comma separated list of hosts, or in the worst case something like
{noformat}
topology fake-hostname; rm -rf *
{noformat}

In 2.0 something similar happens in ScriptBasedMapping.runResolveCommand.
That method should check the input values before executing the command.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira