hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Douglas (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (HADOOP-2723) Hadoop 2367- Does not respect JobConf.getProfileEnabled()
Date Tue, 29 Jan 2008 19:14:35 GMT

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

chris.douglas edited comment on HADOOP-2723 at 1/29/08 11:13 AM:
-----------------------------------------------------------------

Minor nit:
{code}
      if (conf.getProfileEnabled()) {
        if (conf.getProfileTaskRange(t.isMapTask()
                                     ).isIncluded(t.getPartition())) {
          File prof = TaskLog.getTaskLogFile(taskid, TaskLog.LogName.PROFILE);
          vargs.add("-agentlib:hprof=cpu=samples,heap=sites,force=n,thread=y,"
                     + "verbose=n,file=" + prof.toString());
        }
      }
{code}

Is more readable as:
{code}
      if (conf.getProfileEnabled() && conf.getProfileTaskRange(t.isMapTask()
                                     ).isIncluded(t.getPartition())) {
          File prof = TaskLog.getTaskLogFile(taskid, TaskLog.LogName.PROFILE);
          vargs.add("-agentlib:hprof=cpu=samples,heap=sites,force=n,thread=y,"
                     + "verbose=n,file=" + prof.toString());
      }
{code}

and requires fewer changed lines. Otherwise, +1 on this patch.

      was (Author: chris.douglas):
    Minor nit:
{code}
      if (conf.getProfileEnabled()) {
        if (conf.getProfileTaskRange(t.isMapTask()
                                     ).isIncluded(t.getPartition())) {
          File prof = TaskLog.getTaskLogFile(taskid, TaskLog.LogName.PROFILE);
          vargs.add("-agentlib:hprof=cpu=samples,heap=sites,force=n,thread=y,"
                     + "verbose=n,file=" + prof.toString());
        }
      }
{code}

Is more readable as:
{code}
      if (conf.getProfileEnabled() && conf.getProfileTaskRange(t.isMapTask()
                                     ).isIncluded(t.getPartition())) {
          File prof = TaskLog.getTaskLogFile(taskid, TaskLog.LogName.PROFILE);
          vargs.add("-agentlib:hprof=cpu=samples,heap=sites,force=n,thread=y,"
                     + "verbose=n,file=" + prof.toString());
      }
{code}

and requires fewer changed lines.
  
> Hadoop 2367- Does not respect JobConf.getProfileEnabled()
> ---------------------------------------------------------
>
>                 Key: HADOOP-2723
>                 URL: https://issues.apache.org/jira/browse/HADOOP-2723
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: hudson
>            Reporter: Clint Morgan
>            Assignee: Amareshwari Sri Ramadasu
>            Priority: Blocker
>             Fix For: 0.16.0
>
>         Attachments: patch-2723.txt
>
>
> Looks like it should add a guard in TaskRunner.run()
>    if (conf.getProfileEnabled()) {
>         if (conf.getProfileTaskRange(t.isMapTask()
>                                      ).isIncluded(t.getPartition())) {
>           File prof = TaskLog.getTaskLogFile(taskid, TaskLog.LogName.PROFILE);
>           vargs.add("-agentlib:hprof=cpu=samples,heap=sites,force=n,thread=y,"+
>                     "verbose=n,file="+prof.toString());
>         }
>       }
> Also, how come these conf values were not added to hadoop-default.xml?

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