diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java index 70f3a6b..78e46f7 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java @@ -49,6 +49,7 @@ import javax.security.auth.login.LoginException; +import com.google.common.base.Throwables; import org.apache.hadoop.hive.common.ObjectPair; import org.apache.hadoop.hive.common.ValidTxnList; import org.apache.hadoop.hive.common.auth.HiveAuthUtils; @@ -739,12 +740,14 @@ public void createTable(Table tbl, EnvironmentContext envContext) throws Already hook.commitCreateTable(tbl); } success = true; - } catch (Exception e){ - LOG.error("Got exception from createTable", e); } finally { if (!success && (hook != null)) { - hook.rollbackCreateTable(tbl); + try { + hook.rollbackCreateTable(tbl); + } catch (Exception e){ + LOG.error("Create rollback failed with", e); + } } } }