jon-wei commented on a change in pull request #9509: add kinesis lag metric
URL: https://github.com/apache/druid/pull/9509#discussion_r393408804
 
 

 ##########
 File path: 
extensions-core/kinesis-indexing-service/src/main/java/org/apache/druid/indexing/kinesis/KinesisRecordSupplier.java
 ##########
 @@ -637,6 +688,25 @@ public void close()
     this.closed = true;
   }
 
+  @VisibleForTesting
+  public Map<String, Long> getPartitionTimeLag()
+  {
+    return partitionResources.entrySet()
+                             .stream()
+                             .collect(
+                                 Collectors.toMap(k -> 
k.getKey().getPartitionId(), k -> k.getValue().getPartitionTimeLag())
+                             );
+  }
+
+  public Map<String, Long> getPartitionTimeLag(Map<String, String> 
currentOffsets)
+  {
+    return partitionResources.entrySet()
 
 Review comment:
   The number of partitions can be on the order of hundreds, would it make 
sense to avoid streams here for performance (I remember various issues in the 
past around stream perf)

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org
For additional commands, e-mail: commits-h...@druid.apache.org

Reply via email to