1

I hava an Impala Kudu setup where I have the following table:

CREATE TABLE IF NOT EXISTS impala_table (id STRING),
PRIMARY KEY (id))
distribute BY hash(id) into 5 buckets
STORED AS kudu
TBLPROPERTIES('kudu.table_name' = 'impala_tabl', 'kudu.master_addresses' = 'xx.xxx.xxxxx:xxxx');

After this I created another table but accidentally gave it the same kude.table_name

CREATE TABLE IF NOT EXISTS impala_other_table (id STRING),
PRIMARY KEY (id))
distribute BY hash(id) into 5 buckets
STORED AS kudu
TBLPROPERTIES('kudu.table_name' = 'impala_tabl', 'kudu.master_addresses' = 'xx.xxx.xxxxx:xxxx');

I deleted the second table in Impala but now the first table is still there in the table list but if I try to use it I get a table does not exist error. If I try to recreate the table I get a table already exists error.

So kudu table impala_tabl is gone but the Impala reference is still there somewhere in the meta store.

I have tried altering the impala table to point to another kudu table name but I can't alter the table (does not exist). Also tried REFRESH with no success.

Does anyone know how I cna remove this Impala reference?

FIX: I created a new Impala table pointing to the same kudu table. Then I altered the table to an external table. Afterwards I was able to drop both the external table and the one I created in the first step.

T. Bombeke
  • 107
  • 1
  • 8
  • Did you try `INVALIDATE METADATA` too? – tk421 Oct 10 '17 at 18:15
  • I did. I have found a work around. If you make it an external table you can delete it. Edit incoming. – T. Bombeke Oct 12 '17 at 07:28
  • @T.Bombeke can you please post code for "created a new impala table pointing to the same kudu table" ? How did you do it? For the new table did you set the kudu.table_name property to the old table during create table? – rams Apr 12 '18 at 17:47
  • Switching to external table: ALTER TABLE table_name SET TBLPROPERTIES('EXTERNAL'='TRUE'); and yes I pointed to impala_tabl – T. Bombeke Apr 16 '18 at 07:39

0 Answers0