hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amar Kamat (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-3140) JobTracker should not try to promote a (map) task if it does not write to DFS at all
Date Thu, 03 Apr 2008 11:46:24 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-3140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585060#action_12585060
] 

Amar Kamat commented on HADOOP-3140:
------------------------------------

Looks like we can optimize it further. For checking whether the task output dir is empty or
not we can do the following
{code}
if (taskOutputPath != null) {
            // Get the file-system for the task output directory
            FileSystem fs = taskOutputPath.getFileSystem(conf);
            // Check if it exists
            if (fs.exists(taskOutputPath)) {
              // Get the summary for the folder
              ContentSummary summary = fs.getContentSummary(taskOutputPath);
              // Check if the directory contains some data
              // i.e total-files + total-folders - 1(itself)
              if ((summary.getFileCount() + summary.getDirectoryCount() - 1)  >  0) {
                shouldBePromoted = true;
              }
            }
          }
{code}
I have tested {{fs.getContentSummary()}} via the DFSClient and it works as expected. Comments?

> JobTracker should not try to promote a (map) task if it does not write to DFS at all
> ------------------------------------------------------------------------------------
>
>                 Key: HADOOP-3140
>                 URL: https://issues.apache.org/jira/browse/HADOOP-3140
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: mapred
>            Reporter: Runping Qi
>            Assignee: Amar Kamat
>             Fix For: 0.17.0
>
>         Attachments: HADOOP-3140-v1.patch
>
>
> In most cases, map tasks do not write to dfs.
> Thus, when they complete, they should not be put into commit_pending queue at all.
> This will improve the task promotion significantly.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message