Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to hide INFO & WARN while hive execution

avatar
Explorer

Hi -

I have configured and running HIVE in windows. Everything works well, but when I query any command in hive window. I am prompted with many INFO & WARN message.

Even If I run SHOW DATABASE; I get many info as below.

17/05/15 14:04:06 INFO metastore.ObjectStore: Initialized ObjectStore 17/05/15 14:04:06 INFO sqlstd.SQLStdHiveAccessController: Created SQLStdHiveAccessController for session context : HiveAuthzSessio ntext [sessionString=adc50d5a-a598-4454-8769-0b74bd7ad69c, clientType=HIVESERVER2] 17/05/15 14:04:06 INFO exec.DDLTask: results : 2 17/05/15 14:04:06 INFO ql.Driver: Completed executing command(queryId=svarun_20170515140405_dbd1b920-39ad-45fd-93c0-7a1bf4ac96f8); me taken: 0.066 seconds OK 17/05/15 14:04:06 INFO ql.Driver: OK 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Updating thread name to adc50d5a-a598-4454-8769-0b74bd7ad69c main 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Resetting thread name to main 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Updating thread name to adc50d5a-a598-4454-8769-0b74bd7ad69c Thread-8 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Resetting thread name to Thread-8.java:62) 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Updating thread name to adc50d5a-a598-4454-8769-0b74bd7ad69c main 17/05/15 14:04:06 INFO Configuration.deprecation: mapred.input.dir is deprecated. Instead, use mapreduce.input.fileinputformat.inp ir at com.sun.proxy.$Proxy23.ExecuteStatement(Unknown Source) 17/05/15 14:04:06 INFO mapred.FileInputFormat: Total input paths to process : 1va:308) 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Resetting thread name to main88) 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Updating thread name to adc50d5a-a598-4454-8769-0b74bd7ad69c main 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Resetting thread name to main default at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:886) my_db at org.apache.hive.beeline.cli.HiveCli.runWithArgs(HiveCli.java:35) 2 rows selected (0.596 seconds)ine.cli.HiveCli.main(HiveCli.java:29) 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Updating thread name to adc50d5a-a598-4454-8769-0b74bd7ad69c main 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Resetting thread name to main 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Updating thread name to adc50d5a-a598-4454-8769-0b74bd7ad69c main 17/05/15 14:04:06 INFO conf.HiveConf: Using the default value passed in for log id: adc50d5a-a598-4454-8769-0b74bd7ad69c 17/05/15 14:04:06 INFO session.SessionState: Resetting thread name to mainn_20170515140231_01575edd-1876-49f0-aa2b-76b9c567a1d1);

Can any one help out on how to hide or off this?

Thanks

9 REPLIES 9

avatar
Guru

From Hive doc https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Cli

Logging

Hive uses log4j for logging. These logs are not emitted to the standard output by default but are instead captured to a log file specified by Hive's log4j properties file. By default Hive will use hive-log4j.default in the conf/ directory of the Hive installation which writes out logs to /tmp/<userid>/hive.log and uses the WARN level.

It is often desirable to emit the logs to the standard output and/or change the logging level for debugging purposes. These can be done from the command line as follows:

 $HIVE_HOME/bin/hive --hiveconf hive.root.logger=INFO,console

hive.root.logger specifies the logging level as well as the log destination. Specifying console as the target sends the logs to the standard error (instead of the log file).

See Hive Logging in Getting Started for more information.

avatar
Explorer

Greg -

Thanks for your quick reply. I did try this command, but it don't work still.

hive --hiveconf hive.root.logger=INFO,console

Any other way ?

avatar
Guru

Hmmm, did I notice you are on windows? What version HDP, 2.4?

avatar
Explorer

Yeah - its windows and Hadoop 2.7.1

to add on -- Beeline version 2.1.1 by Apache Hive

avatar
@Varun Singh

Try launching the beeline command as "beeline --silent=true".

avatar
Explorer
@Sindhu

thanks for the update. But is this like when we try exporting the result to some log file ?

avatar
@Varun Singh

Are you trying to redirect the output of Hive logging from console?

Refer Hive logging.

avatar
Explorer

No i am not trying to do any logging.

Also I was trying to execute beeline --silent=true in hive but it didnt work. Any though ?

avatar
New Contributor

Hi Friends,

I was looking for the same thing and found setting which can help you.

<p> set hive.server2.logging.operation.level=NONE; </p>

Thanks & Regards,

Kamleshkumar Gujarathi