You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/07/28 20:57:25 UTC

[GitHub] [hive] belugabehr commented on a diff in pull request #3478: HIVE-22417: Remove stringifyException from MetaStore

belugabehr commented on code in PR #3478:
URL: https://github.com/apache/hive/pull/3478#discussion_r932663609


##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java:
##########
@@ -205,7 +205,7 @@ private ReplChangeManager(Configuration conf) throws MetaException {
         inited = true;
       }
     } catch (IOException e) {
-      throw new MetaException(StringUtils.stringifyException(e));
+      throw new MetaException(e.getMessage());

Review Comment:
   Ya, this ideally should just throw something other than a MetaException, but it wasn't easy to fix like the other location.  Log-and-Throw is a bad practice; the code should do one or the other, not both.  However, if you would like, I can add a log along side the throw.  Log-and-throw is probably a better compromise.
   
   The idea in general though is that MetaException is an Exception that gets passed back to the client via the Thrift API.  It should not be part of any of the core Hive code,... Hive should simply log the exception (`error`) at the Thrift service shim and throw MetaException back to the client.



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org