hive> set hiveconf:hive.root.logger=DEBUG,console;
复制代码
这样你在进入CLI的时候将会得到一些类似下面的调试信息:
[wyp@l-datalog5.data.cn1 /home/q/hive-0.11.0-bin/conf]$ hive
................................为了篇幅,省略了很多............................
13/12/25 15:14:54 DEBUG parse.VariableSubstitution: Substitution is on: hive
................................为了篇幅,省略了很多............................
13/12/25 15:14:54 DEBUG security.Groups: Creating new Groups object
13/12/25 15:14:54 DEBUG util.NativeCodeLoader: Trying to load the c...
library for your platform... using builtin-java classes where applicable
13/12/25 15:14:54 DEBUG security.JniBasedUnixGroupsMappingWithFallback:
Falling back to shell based
13/12/25 15:14:54 DEBUG security.JniBasedUnixGroupsMappingWithFallback:
Group mapping impl=org.apache.hadoop.security.ShellBasedUnixGroupsMapping
13/12/25 15:14:54 DEBUG security.UserGroupInformation: hadoop login
13/12/25 15:14:54 DEBUG security.UserGroupInformation: using local
user:UnixPrincipal: wyp
13/12/25 15:14:54 DEBUG security.UserGroupInformation:
UGI loginUser:yangping.wu (auth:SIMPLE)
................................为了篇幅,省略了很多............................
下面举个日志调试的例子,在没有修改日志输出级别之前,有下面的查询所有表的HQL如下:
hive> show tables;
FAILED: Error in metadata: java.lang.RuntimeException: Unable to instantiate
org.apache.hadoop.hive.metastore.HiveMetaStoreClient
FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask
hive>
hive> show tables;
................................为了篇幅,省略了很多............................
13/12/25 15:23:58 INFO metastore.ObjectStore: ObjectStore, initialize called
13/12/25 15:23:58 ERROR Datastore.Schema: Failed initialising database.
Access denied for user 'datalog5'@'l-datalog5.data.cn1' (using password: YES)
org.datanucleus.exceptions.NucleusDataStoreException:
Access denied for user 'datalog5'@'l-datalog5.data.cn1' (using password: YES)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl
$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:536)
at org.datanucleus.store.rdbms.RDBMSStoreManager.<init>
(RDBMSStoreManager.java:290)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
................................为了篇幅,省略了很多............................