mcvsubbu commented on code in PR #9289:
URL: https://github.com/apache/pinot/pull/9289#discussion_r957479004


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotRealtimeTableResource.java:
##########
@@ -77,14 +77,29 @@ public Response pauseConsumption(
   @POST
   @Path("/tables/{tableName}/resumeConsumption")
   @Produces(MediaType.APPLICATION_JSON)
-  @ApiOperation(value = "Resume consumption of a realtime table",
-      notes = "Resume the consumption for a realtime table")
+  @ApiOperation(value = "Resume consumption of a realtime table", notes =
+      "Resume the consumption for a realtime table. ConsumeFrom parameter 
indicates from which offsets "
+          + "consumption should resume. If consumeFrom parameter is not 
provided or 'best' option is chosen, "
+          + "consumption continues based on the offsets in segment ZK 
metadata, and in case the offsets are already "
+          + "gone, the first available offsets are picked to minimize the data 
loss.")
   public Response resumeConsumption(
-      @ApiParam(value = "Name of the table", required = true) 
@PathParam("tableName") String tableName) {
+      @ApiParam(value = "Name of the table", required = true) 
@PathParam("tableName") String tableName,
+      @ApiParam(value = "earliest | latest | best") @QueryParam("consumeFrom") 
String consumeFrom) {
     String tableNameWithType = 
TableNameBuilder.REALTIME.tableNameWithType(tableName);
     validate(tableNameWithType);
+    String offsetCriteria;
+    if ("earliest".equalsIgnoreCase(consumeFrom)) {

Review Comment:
   Sajjad originally had `offsetCriteria=smallest|largest`. I was the one 
asking him to change, and we are now at `consumeFrom=earliest|latest|best`.  
   
   Since two of you prefer smallest/largest, I can go with that. I also felt 
that we should have a third (optional) value.  If we settle on `best`, then 
most people may choose that thinking it is some automatic way. In reality, what 
we mean is that we will pick up from where we left off.
   
   If you both feel that leaving out the third option is ideal, I can go with 
that as well.
   
   Let us wrap this up today, thanks.



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