diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 0d1ef36d88..1256ae5afe 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -175,6 +175,9 @@ Trunk (Unreleased) HADOOP-11495. Convert site documentation from apt to markdown (Masatake Iwasaki via aw) + HADOOP-11575. Daemon log documentation is misleading + (Naganarasimha G R via aw) + BUG FIXES HADOOP-11473. test-patch says "-1 overall" even when all checks are +1 diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/LogLevel.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/LogLevel.java index 4749ce19a6..baf71b649d 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/LogLevel.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/log/LogLevel.java @@ -38,8 +38,8 @@ @InterfaceStability.Evolving public class LogLevel { public static final String USAGES = "\nUsage: General options are:\n" - + "\t[-getlevel ]\n" - + "\t[-setlevel ]\n"; + + "\t[-getlevel ]\n" + + "\t[-setlevel ]\n"; /** * A command line implementation @@ -106,7 +106,7 @@ public void doGet(HttpServletRequest request, HttpServletResponse response if (logName != null) { out.println("

Results

"); out.println(MARKER - + "Submitted Log Name: " + logName + "
"); + + "Submitted Class Name: " + logName + "
"); Log log = LogFactory.getLog(logName); out.println(MARKER @@ -131,10 +131,10 @@ else if (log instanceof Jdk14Logger) { } static final String FORMS = "\n

Get / Set

" - + "\n
Log: " + + "\nClass Name: " + "" + "
" - + "\n
Log: " + + "\nClass Name: " + "Level: " + "" + "
"; diff --git a/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md b/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md index f0c0367c12..62235c5643 100644 --- a/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md +++ b/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md @@ -212,14 +212,16 @@ Commands useful for administrators of a hadoop cluster. ### `daemonlog` -Usage: `hadoop daemonlog -getlevel ` Usage: `hadoop daemonlog -setlevel ` +Usage: `hadoop daemonlog -getlevel ` Usage: `hadoop daemonlog -setlevel ` | COMMAND\_OPTION | Description | |:---- |:---- | -| `-getlevel` *host:port* *name* | Prints the log level of the daemon running at *host:port*. This command internally connects to http://host:port/logLevel?log=name | -| `-setlevel` *host:port* *name* *level* | Sets the log level of the daemon running at *host:port*. This command internally connects to http://host:port/logLevel?log=name | +| `-getlevel` *host:httpport* *classname* | Prints the log level of the log identified by a qualified *classname*, in the daemon running at *host:httpport*. This command internally connects to `http:///logLevel?log=` | +| `-setlevel` *host:httpport* *classname* *level* | Sets the log level of the log identified by a qualified *classname*, in the daemon running at *host:httpport*. This command internally connects to `http:///logLevel?log=&level=` | -Get/Set the log level for each daemon. +Get/Set the log level for a Log identified by a qualified class name in the daemon. + + Example: $ bin/hadoop daemonlog -setlevel 127.0.0.1:50070 org.apache.hadoop.hdfs.server.namenode.NameNode DEBUG Files ----- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/YarnCommands.apt.vm b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/YarnCommands.apt.vm index 6333d70163..67f8a581a6 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/YarnCommands.apt.vm +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-site/src/site/apt/YarnCommands.apt.vm @@ -194,24 +194,27 @@ YARN Commands Usage: --------------------------------- - yarn daemonlog -getlevel - yarn daemonlog -setlevel + yarn daemonlog -getlevel + yarn daemonlog -setlevel --------------------------------- *---------------+--------------+ || COMMAND_OPTIONS || Description | *---------------+--------------+ -| -getlevel \ \ | Prints the log level of the daemon running -| | at \. This command internally connects to -| | http://\/logLevel?log=\ +| -getlevel \ \ | Prints the log level of the log identified +| | by a qualified \, in the daemon running at \. This +| | command internally connects to http://\/logLevel?log=\ *---------------+--------------+ -| -setlevel \ \ \ | Sets the log level of the daemon -| | running at \. This command internally connects to -| | http://\/logLevel?log=\ +| -setlevel \ \ \ | Sets the log level of the log +| | identified by a qualified \ in the daemon running at \. +| | This command internally connects to http://\/logLevel?log=\&level=\ *---------------+--------------+ - Get/Set the log level for each daemon. + Get/Set the log level for a Log identified by a qualified class name in the daemon. +---- + Example: $ bin/yarn daemonlog -setlevel 127.0.0.1:8088 org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl DEBUG +---- ** <<>>