gpt4 book ai didi

hadoop - 配置单元 0.14 :can not insert data in a ACID supported table with out buckets

转载 作者:可可西里 更新时间:2023-11-01 16:26:03 25 4
gpt4 key购买 nike

hive 0.14 中,我有一个支持 ACID 事务的表。

create table HiveTest 
(EmployeeID Int,FirstName String,Designation String,
Salary Int,Department String)
clustered by (department) into 3 buckets
stored as orc TBLPROPERTIES ('transactional'='true');

OK.i可以在这个表中插入数据:

from stagingtbl 
insert into table HiveTest
select employeeid,firstname,designation,salary,department;

但是如果我不对这个表使用桶:

create table HiveTest 
(EmployeeID Int,FirstName String,Designation String,
Salary Int,Department String)
stored as orc TBLPROPERTIES ('transactional'='true');

插入数据时会出错:表未分桶。

所以我们必须在ACID事务支持中创建一个带桶的表来插入数据?
我们能否有任何其他方法在支持 ACID 的表中插入数据?

最佳答案

作为 Hive Transactions 中的限制部分状态:

  • BEGIN, COMMIT, and ROLLBACK are not yet supported. All language operations are auto-commit. The plan is to support these in a future release.
  • Only ORC file format is supported in this first release. The feature has been built such that transactions can be used by any storage format that can determine how updates or deletes apply to base records (basically, that has an explicit or implicit row id), but so far the integration work has only been done for ORC.
  • By default transactions are configured to be off. See the Configuration section below for a discussion of which values need to be set to configure it.
  • Tables must be bucketed to make use of these features. Tables in the same system not using transactions and ACID do not need to be bucketed.
  • At this time only snapshot level isolation is supported. When a given query starts it will be provided with a consistent snapshot of the data. There is no support for dirty read, read committed, repeatable read, or serializable. With the introduction of BEGIN the intention is to support snapshot isolation for the duration of transaction rather than just a single query. Other isolation levels may be added depending on user requests.
  • The existing ZooKeeper and in-memory lock managers are not compatible with transactions. There is no intention to address this issue. See Basic Design below for a discussion of how locks are stored for transactions.

关于hadoop - 配置单元 0.14 :can not insert data in a ACID supported table with out buckets,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27730734/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com