You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by sp...@apache.org on 2016/07/06 21:36:04 UTC
hive git commit: HIVE-14090: JDOExceptions thrown by the Metastore
have their full stack trace returned to clients (Sahil Takiar,
reviewed by Sergio Pena)
Repository: hive
Updated Branches:
refs/heads/master 032f3f4a8 -> 13e702916
HIVE-14090: JDOExceptions thrown by the Metastore have their full stack trace returned to clients (Sahil Takiar, reviewed by Sergio Pena)
Change-Id: I5242436f65c2cc2c9e48f7ebca518f1930e5f4c1
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/13e70291
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/13e70291
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/13e70291
Branch: refs/heads/master
Commit: 13e7029163287bcd55958e99ac2fd408863d6443
Parents: 032f3f4
Author: Sahil Takiar <ta...@gmail.com>
Authored: Wed Jul 6 16:34:19 2016 -0500
Committer: Sergio Pena <se...@cloudera.com>
Committed: Wed Jul 6 16:34:19 2016 -0500
----------------------------------------------------------------------
.../apache/hadoop/hive/metastore/RetryingHMSHandler.java | 6 +++---
.../create_with_constraints_duplicate_name.q.out | 11 +----------
2 files changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/13e70291/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
----------------------------------------------------------------------
diff --git a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
index 2fc487f..e46b50d 100644
--- a/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
+++ b/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
@@ -200,9 +200,9 @@ public class RetryingHMSHandler implements InvocationHandler {
if (retryCount >= retryLimit) {
LOG.error("HMSHandler Fatal error: " + ExceptionUtils.getStackTrace(caughtException));
- // Since returning exceptions with a nested "cause" can be a problem in
- // Thrift, we are stuffing the stack trace into the message itself.
- throw new MetaException(ExceptionUtils.getStackTrace(caughtException));
+ MetaException me = new MetaException(caughtException.getMessage());
+ me.initCause(caughtException);
+ throw me;
}
assert (retryInterval >= 0);
http://git-wip-us.apache.org/repos/asf/hive/blob/13e70291/ql/src/test/results/clientnegative/create_with_constraints_duplicate_name.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientnegative/create_with_constraints_duplicate_name.q.out b/ql/src/test/results/clientnegative/create_with_constraints_duplicate_name.q.out
index 8d6801e..989ff38 100644
--- a/ql/src/test/results/clientnegative/create_with_constraints_duplicate_name.q.out
+++ b/ql/src/test/results/clientnegative/create_with_constraints_duplicate_name.q.out
@@ -10,13 +10,4 @@ PREHOOK: query: create table t2(x int, constraint pk1 primary key (x) disable no
PREHOOK: type: CREATETABLE
PREHOOK: Output: database:default
PREHOOK: Output: default@t2
-FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:javax.jdo.JDOUserException: One or more instances could not be made persistent
-#### A masked pattern was here ####
-NestedThrowablesStackTrace:
-Insert of object "#### A masked pattern was here ####" using statement "INSERT INTO KEY_CONSTRAINTS (CHILD_CD_ID,CHILD_INTEGER_IDX,CHILD_TBL_ID,CONSTRAINT_TYPE,DELETE_RULE,ENABLE_VALIDATE_RELY,PARENT_CD_ID,PARENT_INTEGER_IDX,PARENT_TBL_ID,UPDATE_RULE,"CONSTRAINT_NAME","POSITION") VALUES (?,?,?,?,?,?,?,?,?,?,?,?)" failed : The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'KEY_CONSTRAINTS_PK' defined on 'KEY_CONSTRAINTS'.
-org.datanucleus.exceptions.NucleusDataStoreException: Insert of object "#### A masked pattern was here ####" using statement "INSERT INTO KEY_CONSTRAINTS (CHILD_CD_ID,CHILD_INTEGER_IDX,CHILD_TBL_ID,CONSTRAINT_TYPE,DELETE_RULE,ENABLE_VALIDATE_RELY,PARENT_CD_ID,PARENT_INTEGER_IDX,PARENT_TBL_ID,UPDATE_RULE,"CONSTRAINT_NAME","POSITION") VALUES (?,?,?,?,?,?,?,?,?,?,?,?)" failed : The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'KEY_CONSTRAINTS_PK' defined on 'KEY_CONSTRAINTS'.
-#### A masked pattern was here ####
-Nested Throwables StackTrace:
-java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'KEY_CONSTRAINTS_PK' defined on 'KEY_CONSTRAINTS'.
-#### A masked pattern was here ####
-)
+FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:One or more instances could not be made persistent)