jon-wei commented on a change in pull request #8450: get active task by 
datasource when supervisor discover tasks
URL: https://github.com/apache/incubator-druid/pull/8450#discussion_r324943924
 
 

 ##########
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/overlord/HeapMemoryTaskStorage.java
 ##########
 @@ -194,6 +194,26 @@ public void setStatus(TaskStatus status)
     }
   }
 
+  @Override
+  public List<Task> getActiveTasksByDatasource(String datasource)
+  {
+    giant.lock();
+
+    try {
+      final ImmutableList.Builder<Task> listBuilder = ImmutableList.builder();
+      tasks.values()
+           .stream()
 
 Review comment:
   Recently we've seen a couple of issues with stream slowness: 
https://github.com/apache/incubator-druid/pull/8466#discussion_r321338441
   
   The task retrieval code would be called fairly often being part of the 
supervisor's loop, suggest trying for loops instead of streams here and in 
MetadataTaskStorage and seeing how that performs

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to