gianm commented on code in PR #13271:
URL: https://github.com/apache/druid/pull/13271#discussion_r1010925470
##########
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)) {
Review Comment:
Sounds reasonable. I modified the `MapLookupExtractor#estimateHeapFootprint`
signature to `public static <K, V> long estimateHeapFootprint(@Nullable final
Map<K, V> map)`, and note that it estimates zero footprint for nonstring stuff.
--
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]