swaminathanmanish commented on code in PR #14961: URL: https://github.com/apache/pinot/pull/14961#discussion_r1939090788
########## pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotRealtimeTableResource.java: ########## @@ -301,6 +309,74 @@ public ConsumingSegmentInfoReader.ConsumingSegmentsInfoMap getConsumingSegmentsI } } + @GET + @Path("/tables/{tableName}/pauselessDebugInfo") + @Authorize(targetType = TargetType.TABLE, paramName = "tableName", action = Actions.Table.GET_DEBUG_INFO) + @Produces(MediaType.APPLICATION_JSON) + @ApiOperation(value = "Returns state of pauseless table", notes = + "Gets the segments that are in error state and optionally gets COMMITTING segments based on the " + + "includeCommittingSegments parameter") + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success"), + @ApiResponse(code = 404, message = "Table not found"), + @ApiResponse(code = 500, message = "Internal server error") + }) + public String getPauslessTableDebugInfo( + @ApiParam(value = "Realtime table name with or without type", required = true, example = "myTable | " + + "myTable_REALTIME") @PathParam("tableName") String realtimeTableName, + @ApiParam(value = "Flag to include committing segment info") @QueryParam("includeCommittingSegments") + @DefaultValue("false") boolean includeCommittingSegments, + @Context HttpHeaders headers) { + realtimeTableName = DatabaseUtils.translateTableName(realtimeTableName, headers); + try { + TableType tableType = TableNameBuilder.getTableTypeFromTableName(realtimeTableName); Review Comment: We are returning something even If pauseless is not enabled on the table? COMMITTING list will not have anything but we will get ERROR segments even for non pauseless table right? ########## pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotRealtimeTableResource.java: ########## @@ -301,6 +309,74 @@ public ConsumingSegmentInfoReader.ConsumingSegmentsInfoMap getConsumingSegmentsI } } + @GET + @Path("/tables/{tableName}/pauselessDebugInfo") + @Authorize(targetType = TargetType.TABLE, paramName = "tableName", action = Actions.Table.GET_DEBUG_INFO) + @Produces(MediaType.APPLICATION_JSON) + @ApiOperation(value = "Returns state of pauseless table", notes = + "Gets the segments that are in error state and optionally gets COMMITTING segments based on the " + + "includeCommittingSegments parameter") + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success"), + @ApiResponse(code = 404, message = "Table not found"), + @ApiResponse(code = 500, message = "Internal server error") + }) + public String getPauslessTableDebugInfo( Review Comment: Do you plan to extend this API beyond what are captured here? if so, does it make sense to create a separate class for this (something like ConsumingSegmentsInfoMap), to add different data types. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org