maytasm commented on code in PR #13699:
URL: https://github.com/apache/druid/pull/13699#discussion_r1084654259


##########
server/src/main/java/org/apache/druid/server/http/CoordinatorCompactionConfigsResource.java:
##########
@@ -168,6 +190,51 @@ public Response 
getCompactionConfig(@PathParam("dataSource") String dataSource)
     return Response.ok().entity(config).build();
   }
 
+  @GET
+  @Path("/{dataSource}/history")
+  @Produces(MediaType.APPLICATION_JSON)
+  public Response getCompactionConfigHistory(
+      @PathParam("dataSource") String dataSource,
+      @QueryParam("interval") String interval,
+      @QueryParam("count") Integer count
+  )
+  {
+    Interval theInterval = interval == null ? null : Intervals.of(interval);
+    try {
+      List<AuditEntry> auditEntries;
+      if (theInterval == null && count != null) {
+        auditEntries = auditManager.fetchAuditHistory(
+            CoordinatorCompactionConfig.CONFIG_KEY,
+            CoordinatorCompactionConfig.CONFIG_KEY,
+            count
+        );
+      } else {
+        auditEntries = auditManager.fetchAuditHistory(

Review Comment:
   Can a user pass in both interval and count? 



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