Community Articles
Find and share helpful community-sourced technical articles
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)

It would sometimes be useful to adjust the log level when executing hbase client commands from command line without having to restart components. This article explains how that can be achieved:

You can set DEBUG level for any client hbase command by exporting the following environment variable before it is executed:


For example:

# export HBASE_ROOT_LOGGER=hbase.root.logger=DEBUG,console

# hbase hbck
2016-12-24 15:18:03,240 DEBUG [main] util.Shell: setsid exited with exit code 0
2016-12-24 15:18:03,363 DEBUG [main] lib.MutableMetricsFactory: field org.apache.hadoop.metrics2.lib.MutableRate$UgiMetrics.loginSuccess with annotation @org.apache.hadoop.metrics2.annotation.Metric(always=false, about=, sampleName=Ops, type=DEFAULT, value=[Rate of successful kerberos logins and latency (milliseconds)], valueName=Time)
2016-12-24 15:18:03,373 DEBUG [main] lib.MutableMetricsFactory: field org.apache.hadoop.metrics2.lib.MutableRate$UgiMetrics.loginFailure with annotation @org.apache.hadoop.metrics2.annotation.Metric(always=false, about=, sampleName=Ops, type=DEFAULT, value=[Rate of failed kerberos logins and latency (milliseconds)], valueName=Time)
2016-12-24 15:18:03,373 DEBUG [main] lib.MutableMetricsFactory: field org.apache.hadoop.metrics2.lib.MutableRate$UgiMetrics.getGroups with annotation @org.apache.hadoop.metrics2.annotation.Metric(always=false, about=, sampleName=Ops, type=DEFAULT, value=[GetGroups], valueName=Time)
2016-12-24 15:18:03,375 DEBUG [main] impl.MetricsSystemImpl: UgiMetrics, User and group related metrics
2016-12-24 15:18:03,407 DEBUG [main] security.SecurityUtil: Setting to true
2016-12-24 15:18:03,443 DEBUG [main] security.Groups:  Creating new Groups object
2016-12-24 15:18:03,447 DEBUG [main] util.NativeCodeLoader: Trying to load the custom-built native-hadoop library...
2016-12-24 15:18:03,447 DEBUG [main] util.NativeCodeLoader: Loaded the native-hadoop library
2016-12-24 15:18:03,452 DEBUG [main] security.JniBasedUnixGroupsMapping: Using JniBasedUnixGroupsMapping for Group resolution
2016-12-24 15:18:03,452 DEBUG [main] security.JniBasedUnixGroupsMappingWithFallback: Group mapping
2016-12-24 15:18:03,542 DEBUG [main] security.Groups: Group mapping; cacheTimeout=300000; warningDeltaMs=5000
2016-12-24 15:18:03,644 DEBUG [main] security.UserGroupInformation: hadoop login
2016-12-24 15:18:03,647 DEBUG [main] security.UserGroupInformation: hadoop login commit
2016-12-24 15:18:03,649 DEBUG [main] security.UserGroupInformation: using kerberos user:hbase/dghdp253.openstacklocal@HWX.COM
2016-12-24 15:18:03,649 DEBUG [main] security.UserGroupInformation: Using user: "hbase/dghdp253.openstacklocal@HWX.COM" with name hbase/dghdp253.openstacklocal@HWX.COM
2016-12-24 15:18:03,650 DEBUG [main] security.UserGroupInformation: User entry: "hbase/dghdp253.openstacklocal@HWX.COM"
2016-12-24 15:18:03,653 DEBUG [main] security.UserGroupInformation: UGI loginUser:hbase/dghdp253.openstacklocal@HWX.COM (auth:KERBEROS)

Note, the following log levels are supported: ALL DEBUG ERROR FATAL INFO OFF TRACE TRACE_INT WARN

Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎12-24-2016 03:19 PM
Updated by:
Top Kudoed Authors