Jackie-Jiang commented on code in PR #12663:
URL: https://github.com/apache/pinot/pull/12663#discussion_r1529326790
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java:
##########
@@ -666,26 +666,38 @@ public SuccessResponse deleteSegment(
@Path("/segments/{tableName}")
@Authorize(targetType = TargetType.TABLE, paramName = "tableName", action =
Actions.Table.DELETE_SEGMENT)
@Authenticate(AccessType.DELETE)
- @ApiOperation(value = "Delete all segments", notes = "Delete all segments")
- public SuccessResponse deleteAllSegments(
+ @ApiOperation(value = "Delete the list of segments provided in the payload
else all segments",
+ notes = "Delete the list of segments provided in the payload else all
segments")
+ public SuccessResponse deleteMultipleSegments(
@ApiParam(value = "Name of the table", required = true)
@PathParam("tableName") String tableName,
@ApiParam(value = "OFFLINE|REALTIME", required = true)
@QueryParam("type") String tableTypeStr,
@ApiParam(value = "Retention period for the table segments (e.g. 12h,
3d); If not set, the retention period "
+ "will default to the first config that's not null: the table
config, then to cluster setting, then '7d'. "
+ "Using 0d or -1d will instantly delete segments without retention")
- @QueryParam("retention") String retentionPeriod, @Context HttpHeaders
headers) {
+ @QueryParam("retention") String retentionPeriod, List<String> segments,
@Context HttpHeaders headers) {
Review Comment:
Do we want to take it as a payload, or a query param? Is it common for
DELETE request to take payload?
--
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]