snleee commented on a change in pull request #7662:
URL: https://github.com/apache/pinot/pull/7662#discussion_r740575689



##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
##########
@@ -580,6 +580,30 @@ public Response endReplaceSegments(
     }
   }
 
+  @POST
+  @Path("segments/{tableName}/revertReplaceSegments")
+  @Authenticate(AccessType.UPDATE)
+  @Produces(MediaType.APPLICATION_JSON)
+  @ApiOperation(value = "Revert segments replacement", notes = "Revert 
segments replacement")
+  public Response revertReplaceSegments(
+      @ApiParam(value = "Name of the table", required = true) 
@PathParam("tableName") String tableName,
+      @ApiParam(value = "OFFLINE|REALTIME") @QueryParam("type") String 
tableTypeStr,
+      @ApiParam(value = "Segment lineage entry id to revert", required = true)
+      @QueryParam("segmentLineageEntryId") String segmentLineageEntryId,
+      @ApiParam(value = "Force revert in case the user knows that the lineage 
entry is interrupted")
+      @QueryParam("forceRevert") boolean forceRevert) {
+    try {
+      String tableNameWithType =
+          
TableNameBuilder.forType(TableType.valueOf(tableTypeStr.toUpperCase())).tableNameWithType(tableName);

Review comment:
       I made `tableType` to be required field.




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