Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (2)
Community Manager

Question

I am unable to find a table in Impala when running:

show tables

but it appears when running the same command in Hive. My other tables from Hive appear as expected. How do I find it? 

Answer

The Impala metadata may be out of date on the specific Impalad that the client is connecting to, so a recently created table will not show up. You will need to run the "invalidate metadata" command to cause that specific Impalad instance to fetch the updated metadata from the Hive MetaStore.

 

From the impala-shell, run the "invalidate metadata" command, followed by "show tables" again and verify that the expected table now appears in the output from the "show tables" command.

 

impala-shell -i <impalad-node>


[<impalad-node>:21000] > invalidate metadata

Successfully refreshed catalog


[<impalad-node>:21000] > show tables

...

This fetches the up to date table metadata from the Hive MetaStore for Impala to find the latest tables.

This "invalidate metadata" needs to be done only on the Impalad node that your client connects to / submits it's query to. 

6,884 Views
0 Kudos
Comments
Champion Alumni

try to do this on each table that you have:

 invalidate metadata TABLE_NAME

Sometimes

 invalidate metadata

doesn't work as expected..

 

 

 

Alina GHERMAN 

Master Collaborator

@AlinaGHERMAN thanks so much for the feedback.  Can you clarify what sometimes happens when "invalidate metadata" doesn't work as expected?  We would like to update the article with your response, if that's ok.

Champion Alumni

For now, I'm not sure when the 

 invalidate metadata

is not really refreshing the tables. But I will try to analyse all this and make a more precise answer.

 

Alina GHERMAN

Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
2 of 2
Last update:
‎06-19-2015 02:52 PM
Updated by:
 
Contributors
Top Kudoed Authors