sajjad-moradi commented on code in PR #9249:
URL: https://github.com/apache/pinot/pull/9249#discussion_r950491202


##########
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:
   Because that's not enough to create a consumer. `StreamConsumerFactory` 
requires the whole streamConfig 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: [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]

Reply via email to