Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hive/impala metadata refresh

Does REFRESH table command refresh the metadata in Impala when a partition location is changed in Hive?

I am changing the Hive table partition location using

ALTER TABLE db.table partition(key=value1, key2=value2) set location='path'

After that, I am running REFRESH db.table in Impala which is not updating metadata. If I run INVALIDATE METADATA it is working.

like image 464
user12192155 Avatar asked May 19 '26 02:05

user12192155


2 Answers

There is Impala JIRA-4364 open for that. However its been in product backlog since 2017, so currently INVALIDATE METADATA is the only workaround.

UPDATE: This has been fixed in Impala 4.0 (see same JIRA link above).

like image 199
mazaneicha Avatar answered May 20 '26 15:05

mazaneicha


Please make sure you perform msck repair after loading into the Hive partition instance.

Afterwards, you can invalidate the metadata for the DB in which the table resides in Impala shell/UI

like image 27
dragonachu Avatar answered May 20 '26 17:05

dragonachu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!