zoukankan      html  css  js  c++  java
  • inceptor es表插入成功,返回报错you should set transaction.type before any DCL statement

    finebi下用星环的连接驱动去写inceptor es表,发现插入能成功,但是返回一个报错:

    Caused by: java.sql.SQLException: Error to commit.

     at org.apache.hive.jdbc.HiveConnection.commit(HiveConnection.java:869)

     at com.fr.third.alibaba.druid.pool.DruidPooledConnection.commit(DruidPooledConnection.java:742)

     ... 60 more

    Caused by: java.sql.SQLException: EXECUTION FAILED: Task DCL error HiveException: [Error 20132] Error, you should set transaction.type before any DCL statement

     at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:250)

     at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:234)

     at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:408)

     at org.apache.hive.jdbc.HiveConnection.commit(HiveConnection.java:866)

    you should set transaction.type before any DCL statement  在连接url上添加,比如:jdbc:hive2://bd-namenode02-jd:10000/qqdz_report?transaction.type=inceptor;principal=hive/bd-namenode02-jd@TDH

    用这个测试报这个错:

    url这么写就可以了:jdbc:hive2://bd-namenode02-jd:10000/qqdz_report;principal=hive/bd-namenode02-jd@TDH?transaction.type=inceptor

  • 相关阅读:
    git切换仓库 小记
    修改prometheus默认端口,修改grafana默认端口
    Redisson报错
    Windows IDEA Community 报错
    Debouncer防抖代码
    IDEA通用配置
    Jackson通用工具类
    SpringBoot接入两套kafka集群
    博客园什么时候有的高低贵贱制度???
    致已经逝去的2020和已经到来的2021
  • 原文地址:https://www.cnblogs.com/qfdy123/p/12532912.html
Copyright © 2011-2022 走看看