Support Questions
Find answers, ask questions, and share your expertise

will hive alter partition impact the query being performed

Explorer

Say I Have table A with partition column P1 in HIVE External Table. I am running a complex query and while the query is running, one alter the partition P1 of Table A to point to different location. will the query execute successfully OR it will throw an error.

3 REPLIES 3

@sundaramoorthy muthusamy

it will depend on whether you have enabled concurrency or not (hive.support.concurrency), with concurrency enabled and txn manager set as DbTxManager, while the query is running it will take a write lock on table and once you fire alter table set partition location, this DDL statement will wait for query to complete and release lock to perform alter operation or will time out (controlled by hive.txn.timeout)

Explorer

Correct me if i am wrong. These properties are for the Transaction type tables. Will it impact non transaction type tables.

hive locking will effect on non-transcational table as well while these setting turned on.

; ;