I try to query hbase data through hive (I'm using cloudera). I did a fiew hive external table pointing to hbase but the thing is Cloudera's Impala doesn't have an access to all those tables. All hive external tables appear in the metastore manager but when I do a simple "show tables" in Impala, I see that 3 tables are missing. Would it be a privileges problem ? I see that in the metastore manager that the 3 tables missing are readable by everybody so...
Asked
Active
Viewed 2.4k times
3 Answers
50
Run the query 'invalidate metadata' in Impala and your tables will show-up.

Romain
- 7,022
- 3
- 30
- 30
-
3Well you were right again. Is there a way to automate the "invalidate metadata" in the configuration ? Anyway, thank you a lot for giving me the answer I waited :) – Nosk Dec 11 '13 at 12:19
-
If you add the tables via impala you don't need to invalidate metadata. – skeltoac Apr 10 '14 at 14:26
-
Hey how we can automate this in Hive or in shell script so we can we in Oozie/Hue. Thanks – ChikuMiku Feb 10 '17 at 17:07
-
https://hadoopjournal.wordpress.com/2015/12/06/auto-execution-of-validate-metadata-in-impala/ and https://community.cloudera.com/t5/tkb/articleprintpage/tkb-id/Impala@tkb/article-id/3 were helpful so I thought to add as comment for others. Yup it resolved my problem. – ChikuMiku Feb 13 '17 at 14:06
-
invalid metadata is expensive, is there any other way to get the same results? – nomadSK25 Sep 19 '22 at 17:07
3
Though the INVALIDATE METADATA
command in impala works it is documented to be expensive, in recent versions it is now possible to invalidate the metadata of just 1 table, which will have less impact:
INVALIDATE METADATA mynewtable
Alternately, if you use HUE, there is also a less expensive option available. Which may be convenient if you have added multiple new tables:

Dennis Jaheruddin
- 21,208
- 8
- 66
- 122
1
Beneath is the ? online help explanation: Missing some tables? In order to update the list of tables/metadata seen by Impala, execute one of these queries:
"invalidate metadata" invalidates the entire catalog metadata. All table metadata will be reloaded on the next access.
"invalidate metadata <table>" invalidates the metadata, load on the next access
"refresh <table>" refreshes the metadata immediately. It is a faster, incremental refresh.

Steve Rokette
- 11
- 2