kuczoram commented on code in PR #5603:
URL: https://github.com/apache/hive/pull/5603#discussion_r1913869408
##########
ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/MRCompactor.java:
##########
@@ -571,11 +571,9 @@ public void readFields(DataInput dataInput) throws
IOException {
attemptId = Integer.valueOf(attemptIdString);
}
deltasToAttemptId.put(deltas[i].getName(), attemptId);
- if (baseAttemptId != null) {
- deltasToAttemptId.put(base.getName(), baseAttemptId);
- }
}
if (baseAttemptId != null) {
+ deltasToAttemptId.put(base.getName(), baseAttemptId);
deltasToAttemptId.put(base.toString(), baseAttemptId);
Review Comment:
I am wondering if this is even needed. When this code part was added the
full path was used in the map and later it was changed to use only the name. I
was checking today if there is any use-case where the full path is needed but I
couldn't find one. Also in the code this map is used with the directory names
only. So I strongly believe that this was just accidentally left this way and
it would be enough to use just the base.getName().
What Denys wrote is also a good option, just don't forget to adjust the
MRCompactor.write method if you go with this solution.
--
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]