belugabehr commented on code in PR #3478:
URL: https://github.com/apache/hive/pull/3478#discussion_r932663972
##########
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:
This comes from
[HIVE-15525](https://issues.apache.org/jira/browse/HIVE-15525). I'm do not
understand why this particular decision was made.
--
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]