[
https://issues.apache.org/jira/browse/HIVE-22417?focusedWorklogId=796139&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-796139
]
ASF GitHub Bot logged work on HIVE-22417:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 28/Jul/22 17:10
Start Date: 28/Jul/22 17:10
Worklog Time Spent: 10m
Work Description: zabetak commented on code in PR #3478:
URL: https://github.com/apache/hive/pull/3478#discussion_r932413646
##########
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:
Should we `LOG.error("..", e)` before throwing to avoid losing the complete
stacktrace?
##########
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java:
##########
@@ -378,32 +378,28 @@ static Path getCMPath(Configuration conf, String name,
String checkSum, String c
* @return Corresponding FileInfo object
*/
public static FileInfo getFileInfo(Path src, String checksumString, String
srcCMRootURI, String subDir,
- Configuration conf) throws MetaException {
- try {
- FileSystem srcFs = src.getFileSystem(conf);
- if (checksumString == null) {
- return new FileInfo(srcFs, src, subDir);
- }
+ Configuration conf) throws IOException {
+ FileSystem srcFs = src.getFileSystem(conf);
+ if (checksumString == null) {
+ return new FileInfo(srcFs, src, subDir);
+ }
- Path cmPath = getCMPath(conf, src.getName(), checksumString,
srcCMRootURI);
- if (!srcFs.exists(src)) {
- return new FileInfo(srcFs, src, cmPath, checksumString, false, subDir);
- }
+ Path cmPath = getCMPath(conf, src.getName(), checksumString, srcCMRootURI);
+ if (!srcFs.exists(src)) {
+ return new FileInfo(srcFs, src, cmPath, checksumString, false, subDir);
+ }
- String currentChecksumString;
- try {
- currentChecksumString = checksumFor(src, srcFs);
- } catch (IOException ex) {
- // If the file is missing or getting modified, then refer CM path
- return new FileInfo(srcFs, src, cmPath, checksumString, false, subDir);
- }
- if ((currentChecksumString == null) ||
checksumString.equals(currentChecksumString)) {
- return new FileInfo(srcFs, src, cmPath, checksumString, true, subDir);
- } else {
- return new FileInfo(srcFs, src, cmPath, checksumString, false, subDir);
- }
- } catch (IOException e) {
- throw new MetaException(StringUtils.stringifyException(e));
Review Comment:
Dropping the `MetaException` from this method seems like a good idea to me
but do we understand why it was added in the first place?
Issue Time Tracking
-------------------
Worklog Id: (was: 796139)
Time Spent: 20m (was: 10m)
> Remove stringifyException from MetaStore
> ----------------------------------------
>
> Key: HIVE-22417
> URL: https://issues.apache.org/jira/browse/HIVE-22417
> Project: Hive
> Issue Type: Sub-task
> Components: Metastore, Standalone Metastore
> Affects Versions: 3.2.0
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Major
> Labels: pull-request-available
> Attachments: HIVE-22417.1.patch, HIVE-22417.2.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)