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

Ravi Gummadi commented on MAPREDUCE-2928:
-----------------------------------------

One minor comment:

{noformat}
+          int numFailures = lastNumFailures;
+          localStorage.checkDirs();
           lastCheckDirsTime = now;
-          // If any of the good disks failed, re-init the task tracker
-          if (localStorage.isDiskFailed()) {
+          lastNumFailures = localStorage.numFailures();
+          // Re-init the task tracker if there were any new failures
+          if (numFailures < lastNumFailures) {
{noformat}
can be cleaner/understandable the following way --- so that lastNumFailures 
represents previous value of number of failures instead of current number of 
failures when we do the comparison ?
{noformat}
+          localStorage.checkDirs();
           lastCheckDirsTime = now;
-          // If any of the good disks failed, re-init the task tracker
-          if (localStorage.isDiskFailed()) {
+          int numFailures = localStorage.numFailures();
+          // Re-init the task tracker if there were any new failures
+          if (numFailures > lastNumFailures) {
+            lastNumFailures = numFailures;
{noformat}
\\
\\
\\
Related to this patch(and MR-3011):
May be in a separate JIRA, we can add LocalStorage.checkBadLocalDirs() call to 
TT.initialize() that can do disk-health-check of bad local dirs and add dirs to 
the good local dirs list if they become good. For this, LocalStorage needs to 
maintain bad dirs list also.

> MR-2413 improvements
> --------------------
>
>                 Key: MAPREDUCE-2928
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2928
>             Project: Hadoop Map/Reduce
>          Issue Type: Sub-task
>          Components: tasktracker
>            Reporter: Eli Collins
>            Assignee: Eli Collins
>             Fix For: 0.20.205.0
>
>         Attachments: mapreduce-2928-1.patch, mapreduce-2928-2.patch
>
>
> Tracks improvements to MR-2413. See [this 
> comment|https://issues.apache.org/jira/browse/MAPREDUCE-2413?focusedCommentId=13095073&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13095073].

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to