gianm commented on code in PR #13271:
URL: https://github.com/apache/druid/pull/13271#discussion_r1010929783
##########
extensions-core/lookups-cached-single/src/main/java/org/apache/druid/server/lookup/cache/polling/OnHeapPollingCache.java:
##########
@@ -83,6 +84,19 @@ public List<K> getKeys(final V value)
return listOfKeys;
}
+ @Override
+ @SuppressWarnings("unchecked")
+ public long estimateHeapFootprint()
+ {
+ for (final Map.Entry<K, V> entry : immutableMap.entrySet()) {
+ if (!(entry.getKey() instanceof String) || !(entry.getValue() instanceof
String)) {
+ return 0;
+ }
+ }
+
+ return MapLookupExtractor.estimateHeapFootprint((Map<String, String>)
immutableMap);
Review Comment:
Makes sense to me. I'd rather that be a different PR, especially since I'm
not really changing existing behavior in this PR. (Current code in master does
the footprint estimation every time the monitor is run.)
--
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]