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 2020/07/29 07:40:03 UTC

[GitHub] [hive] pvary commented on a change in pull request #1268: HIVE-20238: Remove stringifyException Method

pvary commented on a change in pull request #1268:
URL: https://github.com/apache/hive/pull/1268#discussion_r462035188



##########
File path: metastore/src/java/org/apache/hadoop/hive/metastore/SerDeStorageSchemaReader.java
##########
@@ -47,7 +46,6 @@
       Deserializer s = HiveMetaStoreUtils.getDeserializer(conf, tbl, false);
       return HiveMetaStoreUtils.getFieldsFromDeserializer(tbl.getTableName(), s);
     } catch (Exception e) {
-      StringUtils.stringifyException(e);

Review comment:
       MetaException is a different animal. When we send it through thrift we lose the inner exceptions.
   Could you please check if we do not lose "caused by" info in HS2 logs after this change?

##########
File path: ql/src/java/org/apache/hadoop/hive/ql/metadata/formatting/TextMetaDataFormatter.java
##########
@@ -88,17 +89,21 @@ public void error(OutputStream out, String msg, int errorCode, String sqlState)
       }
 
   @Override
-  public void error(OutputStream out, String errorMessage, int errorCode, String sqlState, String errorDetail)
+  public void error(OutputStream out, String errorMessage, int errorCode, String sqlState, Throwable cause)
       throws HiveException
       {
     try {
-      out.write(errorMessage.getBytes("UTF-8"));
-      if(errorDetail != null) {
-        out.write(errorDetail.getBytes("UTF-8"));
+      out.write(errorMessage.getBytes(StandardCharsets.UTF_8));

Review comment:
       Duplicated code. Are we doing this, so the stringify stuff will not be used anymore in inappropriate places?




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

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