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.

Cannot drop table in hive - CDH 5.7.1 error ...message:java.lang.IllegalArgumentException: Wrong FS:

Cannot drop table in hive - CDH 5.7.1 error ...message:java.lang.IllegalArgumentException: Wrong FS:

Explorer

Can someone guide or help me out?

 

I have CMgr 5.7.1, and this is a CDH-HA cluster.  When I ssh into the gateway server, I invoke hive as shown below and tried to drop unused table without much success.  Earlier I had done a manual failover of NN, and not sure if this could have caused this problem. Seems like the tables are there 

 

$sudo -u hdfs hive
2016-09-30 18:04:33,499 WARN [main] mapreduce.TableMapReduceUtil: The hbase-prefix-tree module jar containing PrefixTreeCodec is not present. Continuing without it.

Logging initialized using configuration in jar:file:/opt/cloudera/parcels/CDH-5.7.1-1.cdh5.7.1.p0.11/jars/hive-common-1.1.0-cdh5.7.1.jar!/hive-log4j.properties
WARNING: Hive CLI is deprecated and migration to Beeline is recommended.

 

hive> show tables;
OK
customer_nation  --> cannot drop this table
customer_region  --> cannot drop this table
supplier_nation    --> cannot drop this table
supplier_region    --> cannot drop this table
Time taken: 0.534 seconds, Fetched: 4 row(s)

 

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

 

---------- Following when check in the hdfs system, the hive above tables does not exists --------

sudo -u hdfs hadoop fs -ls /user/hive/warehouse/    <-- check in hdfs to see if tables footprint exists and they are not
Found 3 items
drwxrwxrwt - centos hive 0 2016-09-23 18:24 /user/hive/warehouse/atest_30884
drwxrwxrwt - hdfs hive 0 2016-09-30 05:26 /user/hive/warehouse/foo
drwxrwxrwt - hdfs hive 0 2016-09-29 04:25 /user/hive/warehouse/newtesttable

1 REPLY 1
Highlighted

Re: Cannot drop table in hive - CDH 5.7.1 error ...message:java.lang.IllegalArgumentException: Wrong

Champion

its problem with the hive cache 

play around with this parameter in the  hive.properties file, you should be able to resolve it . 

 

hive.metastore-cache-ttl = 20s
hive.metastore-refresh-interval = 10s