我正在尝试使用beeline运行此命令。
create table <table_1> like <table_2>
,但看来我的Hive已配置为以ACID模式运行。因此,此查询失败,显示为
错误:编译语句时出错:失败:SemanticException [错误10265]:ACID表上不允许使用此命令 使用非ACID交易管理器。失败的命令:创建表 像(state = 42000,code = 10265)
在不更改任何全局配置的情况下,使用ACID事务管理器运行beeline查询的正确语法是什么?
我的beeline命令是:
beeline -u <jdbc_con> -e "create table <table_1> like <table_2>";
我想我应该使用
hive>set hive.support.concurrency = true;
hive>set hive.enforce.bucketing = true;
hive>set hive.exec.dynamic.partition.mode = nonstrict;
hive>set hive.txn.manager = org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
hive>set hive.compactor.initiator.on = true;
hive>set hive.compactor.worker.threads = a positive number on at least one instance of the Thrift metastore service;
但是我应该如何将它包括在beeline中? 当我尝试
beeline -u $jdbc_con -e "set hive.support.concurrency = true; create table <table_1>_test like <table_2>";
似乎无法以这种方式更改这些参数。
错误:处理语句时出错:无法修改 hive.support.concurrency在运行时。它不在参数列表中 允许在运行时进行修改(状态= 42000,代码= 1)
感谢您的帮助。
答案 0 :(得分:0)
您可以如下设置蜂巢属性并从蜂路线运行蜂巢查询:
beeline -u $jdbc_con \
--hiveconf "hive.support.concurrency=true" \
--hiveconf "hive.enforce.bucketing=true" \
-e "create table <table_1>_test like <table_2>"
希望这会有所帮助。