This is documentation for MapR Version 5.0. You can also refer to MapR documentation for the latest release.

Skip to end of metadata
Go to start of metadata

The hadoop daemonlog command gets and sets the log level for each daemon.

Hadoop daemons all produce logfiles that you can use to learn about what is happening on the system. You can use the hadoop daemonlog command to temporarily change the log level of a component when debugging the system.

Syntax

hadoop daemonlog
    -getlevel | -setlevel
    <host>:<port>
    <name>
    [ <level> ]

Parameters

The following command options are supported for hadoop daemonlog command:

Parameter

Description

-getlevel <host:port><name>

Prints the log level of the daemon running at the specified host and port, by querying

http://<host>:<port>/logLevel?log=<name>

  • <host>: The host on which to get the log level.
  • <port>: The port by which to get the log level.
  • <name>: The daemon on which to get the log level. Usually the fully qualified classname of the daemon doing the logging.
    For example, org.apache.hadoop.mapred.JobTracker for the JobTracker daemon.

-setlevel <host:port> <name> <level>

Sets the log level of the daemon running at the specified host and port, by
querying

http://<host>:<port>/logLevel?log=<name>
* <host>: The host on which to set the log level.

  • <port>: The port by which to set the log level.
  • <name>: The daemon on which to set the log level.
  • <level: The log level to set the daemon.

Examples

Getting the log levels of a daemon

To get the log level for each daemon enter a command such as the following:

Setting the log level of a daemon

To temporarily set the log level for a daemon enter a command such as the following:

Using this method, the log level is automatically reset when the daemon is restarted.

To make the change to log level of a daemon persistent, enter a command such as the following:

  • No labels