Harsh J created HIVE-3414: ----------------------------- Summary: Exception cast issue in HiveMetaStore.java Key: HIVE-3414 URL: https://issues.apache.org/jira/browse/HIVE-3414 Project: Hive Issue Type: Bug Components: Metastore Affects Versions: 0.8.1 Reporter: Harsh J Priority: Trivial
(This is reading the 0.8 code) Faulty way of checking for types in HiveMetaStore.java, under the HMSHandler.rename_partition method: {code} 1914 } catch (Exception e) { 1915 assert(e instanceof RuntimeException); 1916 throw (RuntimeException)e; 1917 } {code} Leads to: {code} Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.metastore.api.InvalidOperationException cannot be cast to java.lang.RuntimeException at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.rename_partition(HiveMetaStore.java:1916) at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_partition(HiveMetaStore.java:1884) at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.alter_partition(HiveMetaStoreClient.java:818) at org.apache.hadoop.hive.ql.metadata.Hive.alterPartition(Hive.java:427) at org.apache.hadoop.hive.ql.metadata.Hive.getPartition(Hive.java:1464) ... 18 more {code} When a genuine exception occurs when processing the alter_partition method. Why do we cast here and not re-throw in a wrapped fashion? On trunk the similar statements now exist just in createDefaultDB and get_database methods. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira