hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Joseph Evans (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-3404) Speculative Execution: speculative map tasks launched even if -Dmapreduce.map.speculative=false
Date Wed, 14 Dec 2011 19:29:31 GMT

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

Robert Joseph Evans commented on MAPREDUCE-3404:
------------------------------------------------

I have a couple of comments.

# In your test TestSpeculativeExecution.java line 65 (I think) and also later in the file,
there is some code commented out.  It should probably just be deleted. 
# In the mapper code that checks for the first attempt of the first mapper, I would prefer
to see it not do a string comparison as that value could change in the future.  I would rather
see it check the individual parts of the ID though the APIs it provides.
# Why are you calling Thread.currentThread() right before the call to sleep()?  this should
probably be deleted.
# It looks like there might be some tabs in the patch.  Please replace them with spaces.
# The boolean expression {code}
          (   ( conf.getBoolean(MRJobConfig.MAP_SPECULATIVE, false)
                && (tType == null || tType == TaskType.MAP) )
           || ( conf.getBoolean(MRJobConfig.REDUCE_SPECULATIVE, false)
              && (tType == null || tType == TaskType.REDUCE))           ) ) {
{code} is so complex that you needed comment to explain what it was doing.  Also those conf
values are not going to change from the time that the AM is launched.  Could you please cache
them.  I think it would clean up the expression a lot.
# When will tType be null? and why do we want to pass it on to the Speculator when it is?
 I dug and it looks like it is null when the event type is JOB_CREATE or ATTEMPT_STATUS_UPDATE,
but it would be good to document that in the javadocs for the Speculator interface (So that
others can override that functionality in the future).  It would also be cleaner imo to have
the tType == null check be in a different place form the tType == Map or tType == REDUCE.
 But I really don't care so long as there is a comment explaining what is happening.

                
> Speculative Execution: speculative map tasks launched even if -Dmapreduce.map.speculative=false
> -----------------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-3404
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-3404
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: job submission, mrv2
>    Affects Versions: 0.23.0
>         Environment: Hadoop version is: Hadoop 0.23.0.1110031628
> 10 node test cluster
>            Reporter: patrick white
>            Assignee: Eric Payne
>            Priority: Critical
>         Attachments: MAPREDUCE-3404.1.txt
>
>
> When forcing a mapper to take significantly longer than other map tasks, speculative
map tasks are
> launched even if the mapreduce.job.maps.speculative.execution parameter is set to 'false'.
> Testcase: ran default WordCount job with spec execution set to false for both map and
reduce but still saw a fifth mapper
> task launch, ran job as follows:
> hadoop --config <config>  jar   /tmp/testphw/wordcount.jar   WordCount  
> -Dmapreduce.job.maps.speculative.execution=false  -Dmapreduce.job.reduces.speculative.execution=false

> /tmp/test_file_of_words* /tmp/file_of_words.out
> Input data was 4 text files >hdfs blocksize, with same word pattern plus one diff
text line in each file, fourth
> file was 4 times as large as others:
> hadoop --config <config>  fs -ls  /tmp
> Found 5 items
> drwxr-xr-x   - user hdfs          0 2011-10-20 16:17 /tmp/file_of_words.out
> -rw-r--r--   3 user hdfs   62800021 2011-10-20 14:45 /tmp/test_file_of_words1
> -rw-r--r--   3 user hdfs   62800024 2011-10-20 14:46 /tmp/test_file_of_words2
> -rw-r--r--   3 user hdfs   62800024 2011-10-20 14:46 /tmp/test_file_of_words3
> -rw-r--r--   3 user hdfs  271708312 2011-10-20 15:50 /tmp/test_file_of_words4
> Job launched 5 mappers despite spec exec set to false, output snippet:
>         org.apache.hadoop.mapreduce.JobCounter
>                 NUM_FAILED_MAPS=1
>                 TOTAL_LAUNCHED_MAPS=5
>                 TOTAL_LAUNCHED_REDUCES=1
>                 RACK_LOCAL_MAPS=5
>                 SLOTS_MILLIS_MAPS=273540
>                 SLOTS_MILLIS_REDUCES=212876
> Reran same case as above only set both spec exec params to 'true', same results only
this time the fifth task being
> launched is expected since spec exec = true.
> job run:
> hadoop --config <config>  jar   /tmp/testphw/wordcount.jar   WordCount  
> -Dmapreduce.job.maps.speculative.execution=true  -Dmapreduce.job.reduces.speculative.execution=true

> /tmp/test_file_of_words* /tmp/file_of_words.out
> output snippet:
>         org.apache.hadoop.mapreduce.JobCounter
>                 NUM_FAILED_MAPS=1
>                 TOTAL_LAUNCHED_MAPS=5
>                 TOTAL_LAUNCHED_REDUCES=1
>                 RACK_LOCAL_MAPS=5
>                 SLOTS_MILLIS_MAPS=279653
>                 SLOTS_MILLIS_REDUCES=211474

--
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

        

Mime
View raw message