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

  • 相关阅读:
    C# 反射
    jquery 循环绑定click的问题
    socket 编程
    EF code first出现错误:列名 Discriminator 无效
    C# 两个类是否继承关系
    C# MD5,hmacSHA1
    文件分块上传
    读写CSV到DataTable
    ajax 提交数组 泛型集合(嵌套集合)
    Json中Date映射到model
  • 原文地址:https://www.cnblogs.com/qfdy123/p/12532912.html
Copyright © 2011-2022 走看看