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

Sandy Ryza commented on MAPREDUCE-5692:
---------------------------------------

The patch looks good to me other than a couple small things:

{code}
+        task.eventHandler.handle(new TaskAttemptKillEvent(attemptID,
+          SPECULATION + task.commitAttempt + " committed first!"));
{code}
Second line should be indented four spaces past the first line.  This applies 
to a few places.

{code}
-    job.setSpeculativeExecution(false);
{code}
Why is this necessary?

{code}
+  private static TaskAttempt[] makeFirstAttemptWin(
+    EventHandler appEventHandler, Task speculatedTask)
+  {
{code}
Curly brace should go on same line as method definition

{code}
+    TaskAttempt[] ta;// finish 1st TA, 2nd will be killed
+    final Iterator<TaskAttempt> it = speculatedTask.getAttempts().
+      values().iterator();
+    ta = new TaskAttempt[] { it.next(), it.next()};
{code}
can use toArray here?



> Add explicit diagnostics when a task attempt is killed due to speculative 
> execution
> -----------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-5692
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5692
>             Project: Hadoop Map/Reduce
>          Issue Type: Improvement
>          Components: mrv2
>    Affects Versions: 2.2.0
>            Reporter: Gera Shegalov
>            Assignee: Gera Shegalov
>         Attachments: MAPREDUCE-5692.v01.patch
>
>
> We need to clearly indicate when a task attempt is killed because another 
> task attempt succeeded first when speculative execution is enabled.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to