sascha-coenen commented on a change in pull request #9350: Overlord to support 
autoscalers per indexer/middlemanager category
URL: https://github.com/apache/druid/pull/9350#discussion_r387812839
 
 

 ##########
 File path: 
indexing-service/src/main/java/org/apache/druid/indexing/overlord/autoscaling/ProvisioningUtil.java
 ##########
 @@ -61,4 +78,96 @@ public boolean apply(ImmutableWorkerInfo worker)
     };
   }
 
+  @Nullable
+  public static DefaultWorkerBehaviorConfig getDefaultWorkerBehaviorConfig(
+      Supplier<WorkerBehaviorConfig> workerConfigRef,
+      String action
+  )
+  {
+    final WorkerBehaviorConfig workerBehaviorConfig = workerConfigRef.get();
+    if (workerBehaviorConfig == null) {
+      log.error("No workerConfig available, cannot %s workers.", action);
+      return null;
+    }
+    if (!(workerBehaviorConfig instanceof DefaultWorkerBehaviorConfig)) {
+      log.error(
+              "Only DefaultWorkerBehaviorConfig is supported as 
WorkerBehaviorConfig, [%s] given, cannot %s workers",
+              workerBehaviorConfig,
+              action
+      );
+      return null;
+    }
+    final DefaultWorkerBehaviorConfig workerConfig = 
(DefaultWorkerBehaviorConfig) workerBehaviorConfig;
+    if (workerConfig.getAutoScalers() == null) {
 
 Review comment:
   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.
 
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