kfaraz commented on code in PR #16799:
URL: https://github.com/apache/druid/pull/16799#discussion_r1695257385
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordResource.java:
##########
@@ -241,33 +241,32 @@ public Response isLeader()
}
}
- @Deprecated
@POST
- @Path("/lockedIntervals")
+ @Path("/lockedIntervals/v2")
@Produces(MediaType.APPLICATION_JSON)
@ResourceFilters(StateResourceFilter.class)
- public Response getDatasourceLockedIntervals(Map<String, Integer>
minTaskPriority)
+ public Response getDatasourceLockedIntervals(List<LockFilterPolicy>
lockFilterPolicies)
{
- if (minTaskPriority == null || minTaskPriority.isEmpty()) {
- return Response.status(Status.BAD_REQUEST).entity("No Datasource
provided").build();
+ if (lockFilterPolicies == null || lockFilterPolicies.isEmpty()) {
+ return Response.status(Status.BAD_REQUEST).entity("No filter
provided").build();
}
// Build the response
- return
Response.ok(taskQueryTool.getLockedIntervals(minTaskPriority)).build();
+ return
Response.ok(taskQueryTool.getLockedIntervals(lockFilterPolicies)).build();
}
@POST
- @Path("/lockedIntervals/v2")
+ @Path("/activeLocks")
@Produces(MediaType.APPLICATION_JSON)
@ResourceFilters(StateResourceFilter.class)
- public Response getDatasourceLockedIntervalsV2(List<LockFilterPolicy>
lockFilterPolicies)
+ public Response getActiveLocks(List<LockFilterPolicy> lockFilterPolicies)
Review Comment:
Super Nit: If you reverse the order of these two methods in this class file,
the diff might become smaller/simpler. 🙂
(think of doing this only if you are also fixing some other build issue in
this PR)
--
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]