hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira AJISAKA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7984) Add hadoop --loglevel option to change log level
Date Wed, 08 Oct 2014 11:23:35 GMT

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

Akira AJISAKA commented on HADOOP-7984:
---------------------------------------

Thanks [~cnauroth] and [~aw] for testing!
v4 patch already includes the change.
{code}
diff --git hadoop-yarn-project/hadoop-yarn/conf/yarn-env.cmd hadoop-yarn-project/hadoop-yarn/conf/yarn-env.cmd
index 3329f8f..d863c1e 100644
--- hadoop-yarn-project/hadoop-yarn/conf/yarn-env.cmd
+++ hadoop-yarn-project/hadoop-yarn/conf/yarn-env.cmd
@@ -42,7 +42,7 @@ if not defined YARN_POLICYFILE (
 )
 
 if not defined YARN_ROOT_LOGGER (
-  set YARN_ROOT_LOGGER=INFO,console
+  set YARN_ROOT_LOGGER=%HADOOP_LOGLEVEL%,console
 )
{code}
bq. One thing that I'm sort of wondering about... should we protect users from giving bad
values? i.e., 'warn' vs WARN?
I'm thinking it's not necessarily required to protect users from giving bad values, however,
it's a good idea. I'll appreciate someone file a jira to do this.

I'll prepare the patch for branch-2. Thanks again.

> Add hadoop --loglevel option to change log level
> ------------------------------------------------
>
>                 Key: HADOOP-7984
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7984
>             Project: Hadoop Common
>          Issue Type: New Feature
>          Components: scripts
>            Reporter: Eli Collins
>            Assignee: Akira AJISAKA
>            Priority: Minor
>              Labels: newbie
>         Attachments: HADOOP-7984-branch-2.patch, HADOOP-7984.3.patch, HADOOP-7984.4.patch,
HADOOP-7984.patch, HADOOP-7984.patch
>
>
> It would be helpful if bin/hadoop had --loglevel option to change the log level. Currently
users need to set an env variable or prefix the command (eg "HADOOP_ROOT_LOGGER=DEBUG,console
hadoop distcp") which isn't very user friendly.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message