用beeline/hive操作时,如何关闭打印多余的info?

0: jdbc:hive2://server1:10000> show databases;
INFO  : Compiling command(queryId=hadoop_20200701111232_955f6ec9-8731-440c-868e-f0d660120360): show databases
INFO  : Concurrency mode is disabled, not creating a lock manager
INFO  : Semantic Analysis Completed (retrial = false)
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:database_name, type:string, comment:from deserializer)], properties:null)
INFO  : Completed compiling command(queryId=hadoop_20200701111232_955f6ec9-8731-440c-868e-f0d660120360); Time taken: 0.176 seconds
INFO  : Concurrency mode is disabled, not creating a lock manager
INFO  : Executing command(queryId=hadoop_20200701111232_955f6ec9-8731-440c-868e-f0d660120360): show databases
INFO  : Starting task [Stage-0:DDL] in serial mode
INFO  : Completed executing command(queryId=hadoop_20200701111232_955f6ec9-8731-440c-868e-f0d660120360); Time taken: 0.027 seconds
INFO  : OK
INFO  : Concurrency mode is disabled, not creating a lock manager
+----------------+
| database_name  |
+----------------+
| default        |
| test1          |
| test2          |
+----------------+


类似于这种,很多info,目前查到的方法是在启动beeline的时候,加上

--hiveconf hive.server2.logging.operation.level=NONE

有没有可以永久关闭的方法?

a) 在使用beeline时加入以下设置即可--hiveconf hive.server2.logging.operation.level=NONE

b) 或者在hive-site.xml中加入如下配置也可以禁用在beeline中显示额外信息

<property>
    <name>hive.server2.logging.operation.enabled</name>
    <value>true</value>
  </property>
  <property>
    <name>hive.server2.logging.operation.log.location</name>
    <value>/opt/log/hive/operation_logs</value>
  </property>

将 hive.server2.logging.operation.level=NONE写入到hive-site.xml中,name为hive.server2.logging.operation.level,value为NONE