查询返回非零代码:1,原因:hive配置hive.root.logger不存在

时间:2016-04-17 23:48:54

标签: hadoop hive

我正在尝试运行HiveCLI(bin / hive),并且以下错误不允许Hive启动:

Query returned non-zero code: 1, cause: hive configuration hive.root.logger does not exists.

这是整个调试消息:

Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/MyName/Tools/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Java HotSpot(TM) 64-Bit Server VM warning: Using the ParNew young collector with the Serial old collector is deprecated and will likely be removed in a future release
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/MyName/Tools/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
16/04/17 19:04:41 WARN conf.HiveConf: HiveConf of name hive.root.logger does not exist
16/04/17 19:04:41 [main]: WARN conf.HiveConf: HiveConf of name hive.root.logger does not exist

Logging initialized using configuration in file:/home/MyName/Tools/hive/conf/hive-log4j.properties
16/04/17 19:04:41 [main]: INFO SessionState: 
Logging initialized using configuration in file:/home/MyName/Tools/hive/conf/hive-log4j.properties
16/04/17 19:04:41 [main]: WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
16/04/17 19:04:41 [main]: INFO metastore.HiveMetaStore: 0: Opening raw store with implemenation class:org.apache.hadoop.hive.metastore.ObjectStore
16/04/17 19:04:41 [main]: INFO metastore.ObjectStore: ObjectStore, initialize called
16/04/17 19:04:43 [main]: WARN conf.HiveConf: HiveConf of name hive.root.logger does not exist
16/04/17 19:04:43 [main]: INFO metastore.ObjectStore: Setting MetaStore object pin classes with hive.metastore.cache.pinobjtypes="Table,StorageDescriptor,SerDeInfo,Partition,Database,Type,FieldSchema,Order"
16/04/17 19:04:44 [main]: INFO metastore.MetaStoreDirectSql: Using direct SQL, underlying DB is DERBY
16/04/17 19:04:44 [main]: INFO metastore.ObjectStore: Initialized ObjectStore
16/04/17 19:04:45 [main]: INFO metastore.HiveMetaStore: Added admin role in metastore
16/04/17 19:04:45 [main]: INFO metastore.HiveMetaStore: Added public role in metastore
16/04/17 19:04:45 [main]: INFO metastore.HiveMetaStore: No user is added in admin role, since config is empty
16/04/17 19:04:45 [main]: INFO metastore.HiveMetaStore: 0: get_all_databases
16/04/17 19:04:45 [main]: INFO HiveMetaStore.audit: ugi=MyName  ip=unknown-ip-addr  cmd=get_all_databases   
16/04/17 19:04:45 [main]: INFO metastore.HiveMetaStore: 0: get_functions: db=default pat=*
16/04/17 19:04:45 [main]: INFO HiveMetaStore.audit: ugi=MyName  ip=unknown-ip-addr  cmd=get_functions: db=default pat=* 
16/04/17 19:04:45 [main]: INFO session.SessionState: Created local directory: /home/MyName/Tools/hive/tmp/cc9ad134-429c-4223-804e-d8ca1cfcbde8_resources
16/04/17 19:04:46 [main]: INFO session.SessionState: Created HDFS directory: /tmp/hive/MyName/cc9ad134-429c-4223-804e-d8ca1cfcbde8
16/04/17 19:04:46 [main]: INFO session.SessionState: Created local directory: /home/MyName/Tools/hive/MyName/cc9ad134-429c-4223-804e-d8ca1cfcbde8
16/04/17 19:04:46 [main]: INFO session.SessionState: Created HDFS directory: /tmp/hive/MyName/cc9ad134-429c-4223-804e-d8ca1cfcbde8/_tmp_space.db
16/04/17 19:04:46 [main]: INFO SessionState: Added [/home/MyName/Tools/hive/lib/json-serde.jar] to class path
16/04/17 19:04:46 [main]: INFO SessionState: Added resources: [/home/MyName/Tools/hive/lib/json-serde.jar]
16/04/17 19:04:46 [main]: INFO SessionState: Added [/home/MyName/Tools/hive/lib/json-udf.jar] to class path
16/04/17 19:04:46 [main]: INFO SessionState: Added resources: [/home/MyName/Tools/hive/lib/json-udf.jar]
Query returned non-zero code: 1, cause: hive configuration hive.root.logger does not exists.

任何人都知道它会是什么?

1 个答案:

答案 0 :(得分:0)

问题是使用此命令在〜/ .hiverc中的文件:SET hive.root.logget=DEBUG。删除该行,Hive运行没有问题。