kfaraz commented on a change in pull request #11190:
URL: https://github.com/apache/druid/pull/11190#discussion_r626342828
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordResource.java
##########
@@ -227,6 +227,34 @@ public Response isLeader()
}
}
+ @GET
+ @Path("/lockedIntervals")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response getTaskLockedIntervals(@Context HttpServletRequest request)
+ {
+ // Perform authorization check
+ final ResourceAction resourceAction = new ResourceAction(
+ new Resource("lockedIntervals", ResourceType.STATE),
+ Action.READ
+ );
+ final Access authResult = AuthorizationUtils
+ .authorizeResourceAction(request, resourceAction, authorizerMapper);
+ if (!authResult.isAllowed()) {
+ throw new WebApplicationException(
+ Response.status(Response.Status.FORBIDDEN)
+ .entity(StringUtils.format("Access-Check-Result: %s",
authResult.toString()))
+ .build()
+ );
+ }
+
+ // Build the response
+ final LockedIntervalsResponse response = new LockedIntervalsResponse(
+ taskStorageQueryAdapter.getLockedIntervals()
+ );
+ log.warn("Found Intervals: %s", response.getLockedIntervals());
Review comment:
Removed.
##########
File path:
indexing-service/src/main/java/org/apache/druid/indexing/overlord/http/OverlordResource.java
##########
@@ -227,6 +227,34 @@ public Response isLeader()
}
}
+ @GET
+ @Path("/lockedIntervals")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response getTaskLockedIntervals(@Context HttpServletRequest request)
+ {
+ // Perform authorization check
+ final ResourceAction resourceAction = new ResourceAction(
+ new Resource("lockedIntervals", ResourceType.STATE),
+ Action.READ
+ );
+ final Access authResult = AuthorizationUtils
+ .authorizeResourceAction(request, resourceAction, authorizerMapper);
+ if (!authResult.isAllowed()) {
+ throw new WebApplicationException(
+ Response.status(Response.Status.FORBIDDEN)
+ .entity(StringUtils.format("Access-Check-Result: %s",
authResult.toString()))
+ .build()
+ );
+ }
+
+ // Build the response
+ final LockedIntervalsResponse response = new LockedIntervalsResponse(
Review comment:
Fixed.
##########
File path:
server/src/main/java/org/apache/druid/server/coordinator/duty/CompactSegments.java
##########
@@ -139,6 +142,9 @@ public DruidCoordinatorRuntimeParams
run(DruidCoordinatorRuntimeParams params)
compactionTaskQuery.getGranularitySpec().getSegmentGranularity(),
configuredSegmentGranularity);
indexingServiceClient.cancelTask(status.getId());
+
+ // Remove this from the locked intervals
+ taskToLockedIntervals.remove(status.getId());
Review comment:
Removed.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]