【问题标题】:hive beeline use ACID transaction managerHive Beeline 使用 ACID 事务管理器
【发布时间】:2019-02-22 14:40:32
【问题描述】:

我正在尝试使用直线运行此命令。

create table <table_1> like <table_2>

但似乎我的 Hive 配置为在 ACID 模式下运行。所以这个查询失败了

错误:编译语句时出错:FAILED: SemanticException [错误 10265]:在 ACID 表上不允许使用此命令 使用非 ACID 事务管理器。失败的命令:创建表 喜欢(状态=42000,代码=10265)

在不更改任何全局配置的情况下,使用 ACID 事务管理器运行直线查询的正确语法是什么?

我的直线命令是:

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 在运行时。它不在参数列表中 运行时允许修改(state=42000,code=1)

感谢您的帮助。

【问题讨论】:

    标签: hive hortonworks-data-platform beeline


    【解决方案1】:

    您可以设置 hive 属性并从直线运行 hive 查询,如下所示:

    beeline -u $jdbc_con \
    --hiveconf "hive.support.concurrency=true" \
    --hiveconf "hive.enforce.bucketing=true" \
    -e "create table <table_1>_test like <table_2>"
    

    希望这有帮助。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多