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