BsoBird commented on code in PR #4935:
URL: https://github.com/apache/hive/pull/4935#discussion_r1423314692
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/SplitGrouper.java:
##########
@@ -71,7 +71,7 @@ public class SplitGrouper {
// TODO This needs to be looked at. Map of Map to Map... Made concurrent for
now since split generation
// can happen in parallel.
- private static final Map<Map<Path, PartitionDesc>, Map<Path, PartitionDesc>>
cache =
+ private final Map<Map<Path, PartitionDesc>, Map<Path, PartitionDesc>> cache =
Review Comment:
@deniskuzZ
hi. I think,modified the Properties to HashMap is too expensive, because
HashMap does not have the Properties class of the various related functions.
For example: loadFromXML ().
But I agree with you that there are some advantages to be lost by making the
cache non-static. So I have a second option:
org.apache.hadoop.hive.common.CopyOnFirstWriteProperties::equals
```
@Override
public synchronized boolean equals(Object o) {
if(o instanceof Hashtable){
o = new Hashtable<>((Hashtable<Object, Object>) o);
}
if (interned != null) return interned.equals(o);
else return super.equals(o);
}
```
--
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]