shalnisundram commented on code in PR #272:
URL: https://github.com/apache/cassandra-sidecar/pull/272#discussion_r2482816654
##########
server/src/main/java/org/apache/cassandra/sidecar/modules/CassandraOperationsModule.java:
##########
@@ -109,6 +86,25 @@ VertxRoute
cassandraCompactionStatsRoute(RouteBuilder.Factory factory,
return factory.buildRouteWithHandler(compactionStatsHandler);
}
+ @POST // Note: POST, not PUT, since we're sending data in the body
+ @Path(ApiEndpointsV1.COMPACTION_STOP_ROUTE)
+ @Operation(summary = "Stop compaction operation",
+ description = "Stops a compaction operation on the Cassandra node")
+ @APIResponse(description = "Compaction stop operation completed",
+ responseCode = "200",
+ content = @Content(mediaType = "application/json",
+ schema = @Schema(implementation =
CompactionStopResponse.class)))
Review Comment:
See [lines 149-189 of
CompactionStopHandler.java](https://github.com/shalnisundram/cassandra-sidecar/blob/6d42f45dbdbbc30da2149990272d2494ca437227/server/src/main/java/org/apache/cassandra/sidecar/handlers/CompactionStopHandler.java#L149)
- I do some custom error handling here, as particular api response codes will
have different errors thrown depending on the input. Let me know if I should
still edit this section in CassandraOperationsModule.
--
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]