georgew5656 commented on code in PR #14030:
URL: https://github.com/apache/druid/pull/14030#discussion_r1158762517


##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesTaskRunner.java:
##########
@@ -425,7 +425,9 @@ public void registerListener(TaskRunnerListener listener, 
Executor executor)
   public Collection<TaskRunnerWorkItem> getRunningTasks()
   {
     List<TaskRunnerWorkItem> result = new ArrayList<>();
-    for (Pod existingTask : 
client.listPeonPods(Sets.newHashSet(PeonPhase.RUNNING))) {
+    for (Job existingTask : client.listAllPeonJobs().stream()
+        .filter(job -> job.getStatus() != null && job.getStatus().getActive() 
!= null && job.getStatus().getActive() > 0).collect(Collectors.toSet())

Review Comment:
   i added a class to do this, I think it may change slightly once 
https://github.com/apache/druid/pull/14028#pullrequestreview-1373136808 is 
merged so I'll have to publish a new version once thats merged



##########
extensions-contrib/kubernetes-overlord-extensions/src/main/java/org/apache/druid/k8s/overlord/KubernetesTaskRunner.java:
##########
@@ -338,7 +338,7 @@ public Map<String, Long> getTotalTaskSlotCount()
   public Collection<? extends TaskRunnerWorkItem> getKnownTasks()
   {
     List<TaskRunnerWorkItem> result = new ArrayList<>();
-    for (Pod existingTask : client.listPeonPods()) {
+    for (Job existingTask : client.listAllPeonJobs()) {

Review Comment:
   this is done



-- 
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