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


##########
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:
   I am happy that we are on the same page :)
   
   The first thing that came to my mind is doing this:
   ```java
   throw new MetaException("Failed to create ReplChangeManager", e)
   ```
   but it is not possible since MetaException class is generated by Thrift and 
is missing the relevant constructor.
   
   The next best thing was:
   ```java
   throw (MetaException) new MetaException("Failed to create 
ReplChangeManager").initCause(e);
   ```
   but it is quite verbose so it feels natural to create a util and that's how 
I think `MetaStoreUtils.newMetaException` was introduced.
   
   Personally, I would prefer to use `MetaStoreUtils.newMetaException` here but 
I understand that this is a bit subjective so I do not insist. The points you 
raised make perfect sense so I am leaving the final decision up to you. You 
have my `+1` on whatever you pick.



-- 
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