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

Add new Columns in Kudu Tables from Impala

Explorer

Hi Folks,
After adding new columns in Kudu tables from impala, I had some issues computing stats for this table. Everything works fine until the Compute Stats command;

The alter table command 

 

ALTER TABLE myschema.mytable ADD COLUMNS (mycolumn TIMESTAMP DEFAULT now());

 

 

The issue when Compute Stats command.

 

ImpalaRuntimeException: Error making 'updateTableColumnStatistics' RPC to Hive Metastore: CAUSED BY: MetaException: Column mycolumn doesn't exist in table mytable in database myschema

 

 

Someone can help me, please?

4 REPLIES 4

Re: Add new Columns in Kudu Tables from Impala

Mentor

@Guarupe 
I responded to a similar question Warm up Impala
You will need to run the  INVALIDATE METADATA [[db_name.]table_name]
The error is precise Impala uses the Hive Metastore  [HMS] to build efficient queries

 

 

CAUSED BY: MetaException: Column mycolumn doesn't exist in table mytable in database myschema

 

 

In your case INVALIDATE METADATA [[myschema.]mytable] 
The INVALIDATE METADATA is an asynchronous operation that simply discards the loaded metadata from the catalog and coordinator caches. After that operation, the catalog and all the Impala coordinators only know about the existence of databases and tables and nothing more. Metadata loading for tables is triggered by any subsequent queries.

 

After running this in the impala-shell you should compute statistics successfully

Happy hadooping

Re: Add new Columns in Kudu Tables from Impala

Explorer

Hi Shelton,
Thanks for your reply, but INVALIDATE METADATA didn't work for me. I still have the same error. My option was to recreate the table with a CREATE TABLE as SELECT from the previous table.
Thanks again

Re: Add new Columns in Kudu Tables from Impala

Mentor

@Guarupe 
Can you share your steps, please? Are you suing HUE to run your cmds? Did you use the Impala editor?

Re: Add new Columns in Kudu Tables from Impala

Explorer

Hi Shelton,

The answer to all questions is yes. I'm using the Hue Impala Editor and all these commands were issued by HUE. As I've already solved the problem with a CREATE AS SELECT, I'm going to ask for a little time to simulate this problem again.

Thanks again,