Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Impala can't access all hive table

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...

like image 857
Nosk Avatar asked Dec 10 '13 16:12

Nosk


People also ask

Can Impala access Hive tables?

Thus, Impala can access tables defined or loaded by Hive, as long as all columns use Impala-supported data types, file formats, and compression codecs. The initial focus on query features and performance means that Impala can read more types of data with the SELECT statement than it can write with the INSERT statement.

How do I get all the tables in Hive?

Issue the SHOW TABLES command to see the views or tables that exist within workspace. Switch to the Hive schema and issue the SHOW TABLES command to see the Hive tables that exist. Switch to the HBase schema and issue the SHOW TABLES command to see the HBase tables that exist within the schema.

Which command in Impala retrieves metadata for all tables?

The alter command is used to change the structure and name of a table in Impala. The describe command of Impala gives the metadata of a table. It contains the information like columns and their data types. The describe command has desc as a short cut.

How do you refresh the Hive table in Impala?

To flush the metadata for all tables, use the INVALIDATE METADATA command. Because REFRESH table_name only works for tables that the current Impala node is already aware of, when you create a new table in the Hive shell, enter INVALIDATE METADATA new_table before you can see the new table in impala-shell.


3 Answers

Run the query 'invalidate metadata' in Impala and your tables will show-up.

like image 167
Romain Avatar answered Oct 21 '22 02:10

Romain


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:

enter image description here

like image 2
Dennis Jaheruddin Avatar answered Oct 21 '22 01:10

Dennis Jaheruddin


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.
like image 1
Steve Rokette Avatar answered Oct 21 '22 01:10

Steve Rokette