deniskuzZ commented on code in PR #6188:
URL: https://github.com/apache/hive/pull/6188#discussion_r2546281688


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/RetryingExecutor.java:
##########
@@ -95,22 +95,26 @@ public T run() throws MetaException {
           LOG.error(msg, e1);
           throw new MetaException(msg + e1.getMessage());
         }
+        LOG.debug("Exception occurred in running: {}", commandName, t);
       }
     }
   }
 
-  private void checkException(Exception e) throws MetaException {
-    if (retryPolicy != null && !retryPolicy.test(e)) {
+  private Throwable checkException(Throwable e) throws MetaException {
+    Throwable cause = e;
+    if (e instanceof InvocationTargetException ||
+        e instanceof UndeclaredThrowableException) {
+      cause = e.getCause();
+    }
+    if (retryPolicy != null && !retryPolicy.test(cause)) {
       String message = "See a fatal exception, avoid to retry the command:" + 
commandName;
-      LOG.info(message, e);
-      String errorMessage = ExceptionUtils.getMessage(e);
-      if (e instanceof InvocationTargetException || e instanceof 
UndeclaredThrowableException) {
-        errorMessage = ExceptionUtils.getMessage(e.getCause());
-      }
+      LOG.info(message, cause);

Review Comment:
   should we log here under error?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to