[jira] [Updated] (MAPREDUCE-4607) Race condition in ReduceTask completion can result in Task being incorrectly failed

2012-09-11 Thread Tom White (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom White updated MAPREDUCE-4607:
-

   Resolution: Fixed
Fix Version/s: 2.0.3-alpha
 Hadoop Flags: Reviewed
   Status: Resolved  (was: Patch Available)

I just committed this. Thanks Bikas!

> Race condition in ReduceTask completion can result in Task being incorrectly 
> failed
> ---
>
> Key: MAPREDUCE-4607
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4607
> Project: Hadoop Map/Reduce
>  Issue Type: Bug
>Affects Versions: 2.0.0-alpha
>Reporter: Bikas Saha
>Assignee: Bikas Saha
> Fix For: 2.0.3-alpha
>
> Attachments: MAPREDUCE-4607.1.patch, MAPREDUCE-4607.2.patch, 
> MAPREDUCE-4607.3.patch, MAPREDUCE-4607.4.patch, MAPREDUCE-4607.patch
>
>
> Problem reported by chackaravarthy in MAPREDUCE-4252
> This problem has been handled when speculative task launched for map task and 
> other attempt got failed (not killed)
> Can the similar kind of scenario can happen in case of reduce task?
> Consider the following scenario for reduce task in case of speculation (one 
> attempt got killed):
> 1. A task attempt is started.
> 2. A speculative task attempt for the same task is started.
> 3. The first task attempt completes and causes the task to transition to 
> SUCCEEDED.
> 4. Then speculative task attempt will be killed because of the completion of 
> first attempt.
> As a result, internal error will be thrown from this attempt 
> (TaskImpl.MapRetroactiveKilledTransition) and hence task attempt failure 
> leads to job failure.
> TaskImpl.MapRetroactiveKilledTransition
> if (!TaskType.MAP.equals(task.getType())) {
> LOG.error("Unexpected event for REDUCE task " + event.getType());
> task.internalError(event.getType());
>   }
> So, do we need to have following code in MapRetroactiveKilledTransition also 
> just like in MapRetroactiveFailureTransition.
> if (event instanceof TaskTAttemptEvent) {
> TaskTAttemptEvent castEvent = (TaskTAttemptEvent) event;
> if (task.getState() == TaskState.SUCCEEDED &&
> !castEvent.getTaskAttemptID().equals(task.successfulAttempt)) {
>   // don't allow a different task attempt to override a previous
>   // succeeded state
>   return TaskState.SUCCEEDED;
> }
>   }
> please check whether this is a valid case and give your suggestion.

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


[jira] [Updated] (MAPREDUCE-4607) Race condition in ReduceTask completion can result in Task being incorrectly failed

2012-09-10 Thread Bikas Saha (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bikas Saha updated MAPREDUCE-4607:
--

Status: Patch Available  (was: Open)

> Race condition in ReduceTask completion can result in Task being incorrectly 
> failed
> ---
>
> Key: MAPREDUCE-4607
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4607
> Project: Hadoop Map/Reduce
>  Issue Type: Bug
>Affects Versions: 2.0.0-alpha
>Reporter: Bikas Saha
>Assignee: Bikas Saha
> Attachments: MAPREDUCE-4607.1.patch, MAPREDUCE-4607.2.patch, 
> MAPREDUCE-4607.3.patch, MAPREDUCE-4607.4.patch, MAPREDUCE-4607.patch
>
>
> Problem reported by chackaravarthy in MAPREDUCE-4252
> This problem has been handled when speculative task launched for map task and 
> other attempt got failed (not killed)
> Can the similar kind of scenario can happen in case of reduce task?
> Consider the following scenario for reduce task in case of speculation (one 
> attempt got killed):
> 1. A task attempt is started.
> 2. A speculative task attempt for the same task is started.
> 3. The first task attempt completes and causes the task to transition to 
> SUCCEEDED.
> 4. Then speculative task attempt will be killed because of the completion of 
> first attempt.
> As a result, internal error will be thrown from this attempt 
> (TaskImpl.MapRetroactiveKilledTransition) and hence task attempt failure 
> leads to job failure.
> TaskImpl.MapRetroactiveKilledTransition
> if (!TaskType.MAP.equals(task.getType())) {
> LOG.error("Unexpected event for REDUCE task " + event.getType());
> task.internalError(event.getType());
>   }
> So, do we need to have following code in MapRetroactiveKilledTransition also 
> just like in MapRetroactiveFailureTransition.
> if (event instanceof TaskTAttemptEvent) {
> TaskTAttemptEvent castEvent = (TaskTAttemptEvent) event;
> if (task.getState() == TaskState.SUCCEEDED &&
> !castEvent.getTaskAttemptID().equals(task.successfulAttempt)) {
>   // don't allow a different task attempt to override a previous
>   // succeeded state
>   return TaskState.SUCCEEDED;
> }
>   }
> please check whether this is a valid case and give your suggestion.

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


[jira] [Updated] (MAPREDUCE-4607) Race condition in ReduceTask completion can result in Task being incorrectly failed

2012-09-10 Thread Bikas Saha (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bikas Saha updated MAPREDUCE-4607:
--

Attachment: MAPREDUCE-4607.4.patch

Attaching patch with mock task changed.

> Race condition in ReduceTask completion can result in Task being incorrectly 
> failed
> ---
>
> Key: MAPREDUCE-4607
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4607
> Project: Hadoop Map/Reduce
>  Issue Type: Bug
>Affects Versions: 2.0.0-alpha
>Reporter: Bikas Saha
>Assignee: Bikas Saha
> Attachments: MAPREDUCE-4607.1.patch, MAPREDUCE-4607.2.patch, 
> MAPREDUCE-4607.3.patch, MAPREDUCE-4607.4.patch, MAPREDUCE-4607.patch
>
>
> Problem reported by chackaravarthy in MAPREDUCE-4252
> This problem has been handled when speculative task launched for map task and 
> other attempt got failed (not killed)
> Can the similar kind of scenario can happen in case of reduce task?
> Consider the following scenario for reduce task in case of speculation (one 
> attempt got killed):
> 1. A task attempt is started.
> 2. A speculative task attempt for the same task is started.
> 3. The first task attempt completes and causes the task to transition to 
> SUCCEEDED.
> 4. Then speculative task attempt will be killed because of the completion of 
> first attempt.
> As a result, internal error will be thrown from this attempt 
> (TaskImpl.MapRetroactiveKilledTransition) and hence task attempt failure 
> leads to job failure.
> TaskImpl.MapRetroactiveKilledTransition
> if (!TaskType.MAP.equals(task.getType())) {
> LOG.error("Unexpected event for REDUCE task " + event.getType());
> task.internalError(event.getType());
>   }
> So, do we need to have following code in MapRetroactiveKilledTransition also 
> just like in MapRetroactiveFailureTransition.
> if (event instanceof TaskTAttemptEvent) {
> TaskTAttemptEvent castEvent = (TaskTAttemptEvent) event;
> if (task.getState() == TaskState.SUCCEEDED &&
> !castEvent.getTaskAttemptID().equals(task.successfulAttempt)) {
>   // don't allow a different task attempt to override a previous
>   // succeeded state
>   return TaskState.SUCCEEDED;
> }
>   }
> please check whether this is a valid case and give your suggestion.

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


[jira] [Updated] (MAPREDUCE-4607) Race condition in ReduceTask completion can result in Task being incorrectly failed

2012-09-08 Thread Bikas Saha (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bikas Saha updated MAPREDUCE-4607:
--

Status: Open  (was: Patch Available)

> Race condition in ReduceTask completion can result in Task being incorrectly 
> failed
> ---
>
> Key: MAPREDUCE-4607
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4607
> Project: Hadoop Map/Reduce
>  Issue Type: Bug
>Affects Versions: 2.0.0-alpha
>Reporter: Bikas Saha
>Assignee: Bikas Saha
> Attachments: MAPREDUCE-4607.1.patch, MAPREDUCE-4607.2.patch, 
> MAPREDUCE-4607.3.patch, MAPREDUCE-4607.patch
>
>
> Problem reported by chackaravarthy in MAPREDUCE-4252
> This problem has been handled when speculative task launched for map task and 
> other attempt got failed (not killed)
> Can the similar kind of scenario can happen in case of reduce task?
> Consider the following scenario for reduce task in case of speculation (one 
> attempt got killed):
> 1. A task attempt is started.
> 2. A speculative task attempt for the same task is started.
> 3. The first task attempt completes and causes the task to transition to 
> SUCCEEDED.
> 4. Then speculative task attempt will be killed because of the completion of 
> first attempt.
> As a result, internal error will be thrown from this attempt 
> (TaskImpl.MapRetroactiveKilledTransition) and hence task attempt failure 
> leads to job failure.
> TaskImpl.MapRetroactiveKilledTransition
> if (!TaskType.MAP.equals(task.getType())) {
> LOG.error("Unexpected event for REDUCE task " + event.getType());
> task.internalError(event.getType());
>   }
> So, do we need to have following code in MapRetroactiveKilledTransition also 
> just like in MapRetroactiveFailureTransition.
> if (event instanceof TaskTAttemptEvent) {
> TaskTAttemptEvent castEvent = (TaskTAttemptEvent) event;
> if (task.getState() == TaskState.SUCCEEDED &&
> !castEvent.getTaskAttemptID().equals(task.successfulAttempt)) {
>   // don't allow a different task attempt to override a previous
>   // succeeded state
>   return TaskState.SUCCEEDED;
> }
>   }
> please check whether this is a valid case and give your suggestion.

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


[jira] [Updated] (MAPREDUCE-4607) Race condition in ReduceTask completion can result in Task being incorrectly failed

2012-09-06 Thread Tom White (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tom White updated MAPREDUCE-4607:
-

Attachment: MAPREDUCE-4607.patch

Bikas, I'm attaching a patch based on yours to show what I meant. The default 
mockTask is still a map type, but the two cases where a reduce type is needed 
just replaces the mockTask with a new instance.

Let me know if you think this looks OK.

> Race condition in ReduceTask completion can result in Task being incorrectly 
> failed
> ---
>
> Key: MAPREDUCE-4607
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4607
> Project: Hadoop Map/Reduce
>  Issue Type: Bug
>Affects Versions: 2.1.0-alpha
>Reporter: Bikas Saha
>Assignee: Bikas Saha
> Attachments: MAPREDUCE-4607.1.patch, MAPREDUCE-4607.2.patch, 
> MAPREDUCE-4607.3.patch, MAPREDUCE-4607.patch
>
>
> Problem reported by chackaravarthy in MAPREDUCE-4252
> This problem has been handled when speculative task launched for map task and 
> other attempt got failed (not killed)
> Can the similar kind of scenario can happen in case of reduce task?
> Consider the following scenario for reduce task in case of speculation (one 
> attempt got killed):
> 1. A task attempt is started.
> 2. A speculative task attempt for the same task is started.
> 3. The first task attempt completes and causes the task to transition to 
> SUCCEEDED.
> 4. Then speculative task attempt will be killed because of the completion of 
> first attempt.
> As a result, internal error will be thrown from this attempt 
> (TaskImpl.MapRetroactiveKilledTransition) and hence task attempt failure 
> leads to job failure.
> TaskImpl.MapRetroactiveKilledTransition
> if (!TaskType.MAP.equals(task.getType())) {
> LOG.error("Unexpected event for REDUCE task " + event.getType());
> task.internalError(event.getType());
>   }
> So, do we need to have following code in MapRetroactiveKilledTransition also 
> just like in MapRetroactiveFailureTransition.
> if (event instanceof TaskTAttemptEvent) {
> TaskTAttemptEvent castEvent = (TaskTAttemptEvent) event;
> if (task.getState() == TaskState.SUCCEEDED &&
> !castEvent.getTaskAttemptID().equals(task.successfulAttempt)) {
>   // don't allow a different task attempt to override a previous
>   // succeeded state
>   return TaskState.SUCCEEDED;
> }
>   }
> please check whether this is a valid case and give your suggestion.

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


[jira] [Updated] (MAPREDUCE-4607) Race condition in ReduceTask completion can result in Task being incorrectly failed

2012-09-05 Thread Bikas Saha (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bikas Saha updated MAPREDUCE-4607:
--

Status: Patch Available  (was: Open)

> Race condition in ReduceTask completion can result in Task being incorrectly 
> failed
> ---
>
> Key: MAPREDUCE-4607
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4607
> Project: Hadoop Map/Reduce
>  Issue Type: Bug
>Affects Versions: 2.1.0-alpha
>Reporter: Bikas Saha
>Assignee: Bikas Saha
> Attachments: MAPREDUCE-4607.1.patch, MAPREDUCE-4607.2.patch, 
> MAPREDUCE-4607.3.patch
>
>
> Problem reported by chackaravarthy in MAPREDUCE-4252
> This problem has been handled when speculative task launched for map task and 
> other attempt got failed (not killed)
> Can the similar kind of scenario can happen in case of reduce task?
> Consider the following scenario for reduce task in case of speculation (one 
> attempt got killed):
> 1. A task attempt is started.
> 2. A speculative task attempt for the same task is started.
> 3. The first task attempt completes and causes the task to transition to 
> SUCCEEDED.
> 4. Then speculative task attempt will be killed because of the completion of 
> first attempt.
> As a result, internal error will be thrown from this attempt 
> (TaskImpl.MapRetroactiveKilledTransition) and hence task attempt failure 
> leads to job failure.
> TaskImpl.MapRetroactiveKilledTransition
> if (!TaskType.MAP.equals(task.getType())) {
> LOG.error("Unexpected event for REDUCE task " + event.getType());
> task.internalError(event.getType());
>   }
> So, do we need to have following code in MapRetroactiveKilledTransition also 
> just like in MapRetroactiveFailureTransition.
> if (event instanceof TaskTAttemptEvent) {
> TaskTAttemptEvent castEvent = (TaskTAttemptEvent) event;
> if (task.getState() == TaskState.SUCCEEDED &&
> !castEvent.getTaskAttemptID().equals(task.successfulAttempt)) {
>   // don't allow a different task attempt to override a previous
>   // succeeded state
>   return TaskState.SUCCEEDED;
> }
>   }
> please check whether this is a valid case and give your suggestion.

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


[jira] [Updated] (MAPREDUCE-4607) Race condition in ReduceTask completion can result in Task being incorrectly failed

2012-09-05 Thread Bikas Saha (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bikas Saha updated MAPREDUCE-4607:
--

Attachment: MAPREDUCE-4607.3.patch

> Race condition in ReduceTask completion can result in Task being incorrectly 
> failed
> ---
>
> Key: MAPREDUCE-4607
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4607
> Project: Hadoop Map/Reduce
>  Issue Type: Bug
>Affects Versions: 2.1.0-alpha
>Reporter: Bikas Saha
>Assignee: Bikas Saha
> Attachments: MAPREDUCE-4607.1.patch, MAPREDUCE-4607.2.patch, 
> MAPREDUCE-4607.3.patch
>
>
> Problem reported by chackaravarthy in MAPREDUCE-4252
> This problem has been handled when speculative task launched for map task and 
> other attempt got failed (not killed)
> Can the similar kind of scenario can happen in case of reduce task?
> Consider the following scenario for reduce task in case of speculation (one 
> attempt got killed):
> 1. A task attempt is started.
> 2. A speculative task attempt for the same task is started.
> 3. The first task attempt completes and causes the task to transition to 
> SUCCEEDED.
> 4. Then speculative task attempt will be killed because of the completion of 
> first attempt.
> As a result, internal error will be thrown from this attempt 
> (TaskImpl.MapRetroactiveKilledTransition) and hence task attempt failure 
> leads to job failure.
> TaskImpl.MapRetroactiveKilledTransition
> if (!TaskType.MAP.equals(task.getType())) {
> LOG.error("Unexpected event for REDUCE task " + event.getType());
> task.internalError(event.getType());
>   }
> So, do we need to have following code in MapRetroactiveKilledTransition also 
> just like in MapRetroactiveFailureTransition.
> if (event instanceof TaskTAttemptEvent) {
> TaskTAttemptEvent castEvent = (TaskTAttemptEvent) event;
> if (task.getState() == TaskState.SUCCEEDED &&
> !castEvent.getTaskAttemptID().equals(task.successfulAttempt)) {
>   // don't allow a different task attempt to override a previous
>   // succeeded state
>   return TaskState.SUCCEEDED;
> }
>   }
> please check whether this is a valid case and give your suggestion.

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


[jira] [Updated] (MAPREDUCE-4607) Race condition in ReduceTask completion can result in Task being incorrectly failed

2012-09-05 Thread Bikas Saha (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bikas Saha updated MAPREDUCE-4607:
--

Status: Open  (was: Patch Available)

> Race condition in ReduceTask completion can result in Task being incorrectly 
> failed
> ---
>
> Key: MAPREDUCE-4607
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4607
> Project: Hadoop Map/Reduce
>  Issue Type: Bug
>Affects Versions: 2.1.0-alpha
>Reporter: Bikas Saha
>Assignee: Bikas Saha
> Attachments: MAPREDUCE-4607.1.patch, MAPREDUCE-4607.2.patch
>
>
> Problem reported by chackaravarthy in MAPREDUCE-4252
> This problem has been handled when speculative task launched for map task and 
> other attempt got failed (not killed)
> Can the similar kind of scenario can happen in case of reduce task?
> Consider the following scenario for reduce task in case of speculation (one 
> attempt got killed):
> 1. A task attempt is started.
> 2. A speculative task attempt for the same task is started.
> 3. The first task attempt completes and causes the task to transition to 
> SUCCEEDED.
> 4. Then speculative task attempt will be killed because of the completion of 
> first attempt.
> As a result, internal error will be thrown from this attempt 
> (TaskImpl.MapRetroactiveKilledTransition) and hence task attempt failure 
> leads to job failure.
> TaskImpl.MapRetroactiveKilledTransition
> if (!TaskType.MAP.equals(task.getType())) {
> LOG.error("Unexpected event for REDUCE task " + event.getType());
> task.internalError(event.getType());
>   }
> So, do we need to have following code in MapRetroactiveKilledTransition also 
> just like in MapRetroactiveFailureTransition.
> if (event instanceof TaskTAttemptEvent) {
> TaskTAttemptEvent castEvent = (TaskTAttemptEvent) event;
> if (task.getState() == TaskState.SUCCEEDED &&
> !castEvent.getTaskAttemptID().equals(task.successfulAttempt)) {
>   // don't allow a different task attempt to override a previous
>   // succeeded state
>   return TaskState.SUCCEEDED;
> }
>   }
> please check whether this is a valid case and give your suggestion.

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


[jira] [Updated] (MAPREDUCE-4607) Race condition in ReduceTask completion can result in Task being incorrectly failed

2012-08-31 Thread Bikas Saha (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bikas Saha updated MAPREDUCE-4607:
--

Status: Patch Available  (was: Open)

> Race condition in ReduceTask completion can result in Task being incorrectly 
> failed
> ---
>
> Key: MAPREDUCE-4607
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4607
> Project: Hadoop Map/Reduce
>  Issue Type: Bug
>Affects Versions: 2.1.0-alpha
>Reporter: Bikas Saha
>Assignee: Bikas Saha
> Attachments: MAPREDUCE-4607.1.patch, MAPREDUCE-4607.2.patch
>
>
> Problem reported by chackaravarthy in MAPREDUCE-4252
> This problem has been handled when speculative task launched for map task and 
> other attempt got failed (not killed)
> Can the similar kind of scenario can happen in case of reduce task?
> Consider the following scenario for reduce task in case of speculation (one 
> attempt got killed):
> 1. A task attempt is started.
> 2. A speculative task attempt for the same task is started.
> 3. The first task attempt completes and causes the task to transition to 
> SUCCEEDED.
> 4. Then speculative task attempt will be killed because of the completion of 
> first attempt.
> As a result, internal error will be thrown from this attempt 
> (TaskImpl.MapRetroactiveKilledTransition) and hence task attempt failure 
> leads to job failure.
> TaskImpl.MapRetroactiveKilledTransition
> if (!TaskType.MAP.equals(task.getType())) {
> LOG.error("Unexpected event for REDUCE task " + event.getType());
> task.internalError(event.getType());
>   }
> So, do we need to have following code in MapRetroactiveKilledTransition also 
> just like in MapRetroactiveFailureTransition.
> if (event instanceof TaskTAttemptEvent) {
> TaskTAttemptEvent castEvent = (TaskTAttemptEvent) event;
> if (task.getState() == TaskState.SUCCEEDED &&
> !castEvent.getTaskAttemptID().equals(task.successfulAttempt)) {
>   // don't allow a different task attempt to override a previous
>   // succeeded state
>   return TaskState.SUCCEEDED;
> }
>   }
> please check whether this is a valid case and give your suggestion.

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


[jira] [Updated] (MAPREDUCE-4607) Race condition in ReduceTask completion can result in Task being incorrectly failed

2012-08-31 Thread Bikas Saha (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bikas Saha updated MAPREDUCE-4607:
--

Attachment: MAPREDUCE-4607.2.patch

> Race condition in ReduceTask completion can result in Task being incorrectly 
> failed
> ---
>
> Key: MAPREDUCE-4607
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4607
> Project: Hadoop Map/Reduce
>  Issue Type: Bug
>Affects Versions: 2.1.0-alpha
>Reporter: Bikas Saha
>Assignee: Bikas Saha
> Attachments: MAPREDUCE-4607.1.patch, MAPREDUCE-4607.2.patch
>
>
> Problem reported by chackaravarthy in MAPREDUCE-4252
> This problem has been handled when speculative task launched for map task and 
> other attempt got failed (not killed)
> Can the similar kind of scenario can happen in case of reduce task?
> Consider the following scenario for reduce task in case of speculation (one 
> attempt got killed):
> 1. A task attempt is started.
> 2. A speculative task attempt for the same task is started.
> 3. The first task attempt completes and causes the task to transition to 
> SUCCEEDED.
> 4. Then speculative task attempt will be killed because of the completion of 
> first attempt.
> As a result, internal error will be thrown from this attempt 
> (TaskImpl.MapRetroactiveKilledTransition) and hence task attempt failure 
> leads to job failure.
> TaskImpl.MapRetroactiveKilledTransition
> if (!TaskType.MAP.equals(task.getType())) {
> LOG.error("Unexpected event for REDUCE task " + event.getType());
> task.internalError(event.getType());
>   }
> So, do we need to have following code in MapRetroactiveKilledTransition also 
> just like in MapRetroactiveFailureTransition.
> if (event instanceof TaskTAttemptEvent) {
> TaskTAttemptEvent castEvent = (TaskTAttemptEvent) event;
> if (task.getState() == TaskState.SUCCEEDED &&
> !castEvent.getTaskAttemptID().equals(task.successfulAttempt)) {
>   // don't allow a different task attempt to override a previous
>   // succeeded state
>   return TaskState.SUCCEEDED;
> }
>   }
> please check whether this is a valid case and give your suggestion.

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


[jira] [Updated] (MAPREDUCE-4607) Race condition in ReduceTask completion can result in Task being incorrectly failed

2012-08-30 Thread Bikas Saha (JIRA)

 [ 
https://issues.apache.org/jira/browse/MAPREDUCE-4607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bikas Saha updated MAPREDUCE-4607:
--

Attachment: MAPREDUCE-4607.1.patch

Attaching patch with the proposed fix.

> Race condition in ReduceTask completion can result in Task being incorrectly 
> failed
> ---
>
> Key: MAPREDUCE-4607
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-4607
> Project: Hadoop Map/Reduce
>  Issue Type: Bug
>Affects Versions: 2.1.0-alpha
>Reporter: Bikas Saha
>Assignee: Bikas Saha
> Attachments: MAPREDUCE-4607.1.patch
>
>
> Problem reported by chackaravarthy in MAPREDUCE-4252
> This problem has been handled when speculative task launched for map task and 
> other attempt got failed (not killed)
> Can the similar kind of scenario can happen in case of reduce task?
> Consider the following scenario for reduce task in case of speculation (one 
> attempt got killed):
> 1. A task attempt is started.
> 2. A speculative task attempt for the same task is started.
> 3. The first task attempt completes and causes the task to transition to 
> SUCCEEDED.
> 4. Then speculative task attempt will be killed because of the completion of 
> first attempt.
> As a result, internal error will be thrown from this attempt 
> (TaskImpl.MapRetroactiveKilledTransition) and hence task attempt failure 
> leads to job failure.
> TaskImpl.MapRetroactiveKilledTransition
> if (!TaskType.MAP.equals(task.getType())) {
> LOG.error("Unexpected event for REDUCE task " + event.getType());
> task.internalError(event.getType());
>   }
> So, do we need to have following code in MapRetroactiveKilledTransition also 
> just like in MapRetroactiveFailureTransition.
> if (event instanceof TaskTAttemptEvent) {
> TaskTAttemptEvent castEvent = (TaskTAttemptEvent) event;
> if (task.getState() == TaskState.SUCCEEDED &&
> !castEvent.getTaskAttemptID().equals(task.successfulAttempt)) {
>   // don't allow a different task attempt to override a previous
>   // succeeded state
>   return TaskState.SUCCEEDED;
> }
>   }
> please check whether this is a valid case and give your suggestion.

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