kfaraz commented on code in PR #16803:
URL: https://github.com/apache/druid/pull/16803#discussion_r1692999798


##########
server/src/main/java/org/apache/druid/server/http/CoordinatorCompactionConfigsResource.java:
##########
@@ -86,11 +87,46 @@ public CoordinatorCompactionConfigsResource(
 
   @GET
   @Produces(MediaType.APPLICATION_JSON)
-  public Response getCompactionConfig()
+  public Response getClusterCompactionConfig()
   {
     return Response.ok(configManager.getCurrentCompactionConfig()).build();
   }
 
+  @POST
+  @Path("/global")
+  @Consumes(MediaType.APPLICATION_JSON)
+  public Response updateClusterCompactionConfig(
+      CompactionConfigUpdateRequest updatePayload,
+      @Context HttpServletRequest req
+  )
+  {
+    UnaryOperator<CoordinatorCompactionConfig> operator = current -> {
+      final CoordinatorCompactionConfig newConfig = 
CoordinatorCompactionConfig.from(current, updatePayload);
+
+      final List<DataSourceCompactionConfig> datasourceConfigs = 
newConfig.getCompactionConfigs();
+      if (CollectionUtils.isNullOrEmpty(datasourceConfigs)
+          || current.getEngine() == newConfig.getEngine()) {

Review Comment:
   No, the update payload is only to update the cluster level configs. It does 
not contain any datasource level configs right now.



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