qq_22272937
心无闸念
采纳率45.5%
2020-07-01 11:24

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

5
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

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

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • kingwolf_JavaScript 浴火_凤凰 9月前

    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>
    
    点赞 评论 复制链接分享