priyen commented on code in PR #13249:
URL: https://github.com/apache/pinot/pull/13249#discussion_r1619443579


##########
pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java:
##########
@@ -823,6 +827,59 @@ public String uploadLLCSegment(
     }
   }
 
+  @POST
+  @Path("/tables/{realtimeTableName}/consumingSegmentsFreshnessInfo")
+  @Authorize(targetType = TargetType.TABLE, paramName = "realtimeTableName",
+      action = Actions.Table.GET_SEGMENTS_FRESHNESS)
+  @Produces(MediaType.APPLICATION_JSON)
+  @ApiOperation(value = "Returns ingestion timestamp ms for given segments",
+      notes = "Any segments that are not consuming will be excluded")
+  @ApiResponses(value = {
+      @ApiResponse(code = 200, message = "Success"),
+      @ApiResponse(code = 404, message = "Table not found"),
+      @ApiResponse(code = 500, message = "Internal server error")
+  })
+  public Map<String, Long> getSegmentsFreshnessInfo(

Review Comment:
   you're right that the minimum freshness computation can be done here to 
avoid having to push the map of the segments as part of the response
   
   this does go against the idea of having partition level freshness info for 
debugging purposes. What do you suggest?



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