snleee commented on code in PR #9249: URL: https://github.com/apache/pinot/pull/9249#discussion_r950515885
########## pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/RealtimeConsumptionRateManager.java: ########## @@ -85,17 +88,27 @@ public ConsumptionRateLimiter createRateLimiter(StreamConfig streamConfig, Strin return new RateLimiterImpl(partitionRateLimit); } - private static LoadingCache<StreamConfig, Integer> buildCache() { - return CacheBuilder.newBuilder().expireAfterWrite(CACHE_ENTRY_EXPIRATION_TIME_IN_MINUTES, TimeUnit.MINUTES) + @VisibleForTesting + static LoadingCache<StreamConfig, Integer> buildCache(PartitionCountFetcher partitionCountFetcher, + long duration, TimeUnit unit) { + return CacheBuilder.newBuilder().refreshAfterWrite(duration, unit) .build(new CacheLoader<StreamConfig, Integer>() { @Override - public Integer load(StreamConfig streamConfig) + public Integer load(StreamConfig key) Review Comment: I see. It looks that the Guava's LoaderCache doesn't allow us to pass the extra parameter than the key object. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org