心无闸念 2020-07-01 11:24 采纳率: 25%
浏览 1237
已采纳

用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

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

  • 写回答

2条回答 默认 最新

  • 浴火_凤凰 2020-07-01 12:12
    关注

    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>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 关于大棚监测的pcb板设计
  • ¥20 sim800c模块 at指令及平台
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计