belugabehr commented on a change in pull request #2312:
URL: https://github.com/apache/hive/pull/2312#discussion_r639709076
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/cache/results/QueryResultsCache.java
##########
@@ -814,37 +784,11 @@ private boolean clearSpaceForCacheEntry(CacheEntry entry,
long size) {
}
}
- LOG.info("Could not free enough space for cache entry for query: [{}]
withe size {}",
+ LOG.info("Could not free enough space for cache entry for query: [{}] with
size {}",
entry.getQueryText(), size);
return false;
}
- private static void addToEntryMap(Map<String, Set<CacheEntry>> entryMap,
- String key, CacheEntry entry) {
- Set<CacheEntry> entriesForKey = entryMap.get(key);
- if (entriesForKey == null) {
- entriesForKey = new HashSet<CacheEntry>();
- entryMap.put(key, entriesForKey);
- }
- entriesForKey.add(entry);
- }
-
- private static boolean removeFromEntryMap(Map<String, Set<CacheEntry>>
entryMap,
- String key, CacheEntry entry) {
- Set<CacheEntry> entries = entryMap.get(key);
- if (entries == null) {
- return false;
- }
- boolean deleted = entries.remove(entry);
- if (!deleted) {
- return false;
- }
- if (entries.isEmpty()) {
- entryMap.remove(key);
- }
- return true;
- }
-
Review comment:
Using Guava `Multimap` makes this dead code
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]