Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Cant drop hive tables after change of Namenode

Highlighted

Cant drop hive tables after change of Namenode

Explorer

Hi

 

I have created one table in HIve using 'org.apache.hadoop.hive.serde2.avro.AvroSerDe' and given HDFS location with old namenode

 

LOCATION
'hdfs:/oldnamenode:8020/data/Personal'
TBLPROPERTIES (
'avro.schema.url'='hdfs:/oldnamenode:8020/data/Personal/avro-schema/Schema.avsc',

 

and now i changed the Namenode and enabled HA. Table become inaccessible and i am also not able to drop. It is thrwoing below exception 

 

hive> drop table test;
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:java.lang.IllegalArgumentException: Wrong FS: 'hdfs:/oldnamenode:8020/data/Personal/, expected: hdfs://nameservice1)
hive>

 

I am using mysql to store hive metadata and i tried to find out these properties in metadata tables to manually update the namenode to nameservice1 but couldnt find related properties in the meta tables.

 

Anyone have any idea on this ?

Any help is appericiated.

 

Thanks

2 REPLIES 2

Re: Cant drop hive tables after change of Namenode

Rising Star

Hi,

 

Have you updated the hive metastore after enabling HA ? As described here. The Hive will pick up the new nameservices only after completing this.

 

 

Thanks,
Sathish (Satz)
Highlighted

Re: Cant drop hive tables after change of Namenode

Explorer

Hi Satish,

 

Metadata looks fine. Other tables are still accessible like hbase external table and managed tables.

This table is having the issue because it required static values at the time of table creation.

I passed the older namenode and now when i am trying to query this table, it is giving wrong FS.

Is there any way that i can change older namenode to nameservice1 by updating metadata table record ?

 

I tried finding these values in Hive meta tables but couldnt manage to find it. Even not able to drop this table.

 

Thanks

 

 

Don't have an account?
Coming from Hortonworks? Activate your account here