Transactions and locks
ACID (Atomicity, Consistency, Isolation, and Durability) is a long-expected Hive feature, and builds a foundation for relational databases; it has been available since Hive v0.14.0.Full ACID support in Hive is implemented through row-level transactions and locks. This makes it possible for Hive to deal with use cases such as concurrent read/write, data cleaning, data modification, complex ETL/SCD (Slow Changing Dimensions), streaming data ingest, bulk data merge, and so on. In this section, we'll introduce them in more detail.
Transactions
For now, all transactions in HQL are auto-committed without supporting BEGIN
, COMMIT
, and ROLLBACK
, like as with relational databases. Also, the table that has a transaction feature enabled has to be a bucket table with the ORC
file format. The following configuration parameters must be set appropriately in hive-site.xml
or beeline connection string to turn on transaction support:
> SET hive.support.concurrency = true; > SET hive...