[
https://issues.apache.org/jira/browse/HIVE-20238?focusedWorklogId=463873&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-463873
]
ASF GitHub Bot logged work on HIVE-20238:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Jul/20 07:40
Start Date: 29/Jul/20 07:40
Worklog Time Spent: 10m
Work Description: 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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 463873)
Time Spent: 20m (was: 10m)
> Remove stringifyException Method
> --------------------------------
>
> Key: HIVE-20238
> URL: https://issues.apache.org/jira/browse/HIVE-20238
> Project: Hive
> Issue Type: Improvement
> Affects Versions: 4.0.0
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Minor
> Labels: newbie, noob, pull-request-available
> Fix For: 4.0.0
>
> Attachments: HIVE-20238.1.patch, HIVE-20238.2.patch,
> HIVE-20238.3.patch, HIVE-20238.4.patch, HIVE-20238.5.patch,
> HIVE-20238.6.patch, HIVE-20238.7.patch, HIVE-20238.8.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Deprecate the method {{stringifyException}}
> https://github.com/apache/hive/blob/c2940a07cf0891e922672782b73ec22551a7eedd/common/src/java/org/apache/hive/common/util/HiveStringUtils.java#L146
> The code already exists in Hadoop proper:
> https://github.com/apache/hadoop/blob/2b2399d623539ab68e71a38fa9fbfc9a405bddb8/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/StringUtils.java#L86
> And beyond that, I was told on the Hadoop dev mailing list that this function
> should not be used anymore. Developers should just be using the SLF4J
> facilities and not this home-grown thing.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)