You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/10/19 22:28:26 UTC

[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #9609: Add segment level debug API

Jackie-Jiang commented on code in PR #9609:
URL: https://github.com/apache/pinot/pull/9609#discussion_r999986521


##########
pinot-server/src/main/java/org/apache/pinot/server/api/resources/DebugResource.java:
##########
@@ -78,6 +78,35 @@ public List<SegmentServerDebugInfo> getSegmentsDebugInfo(
     return getSegmentServerDebugInfo(tableNameWithType, tableType);
   }
 
+  @GET
+  @Path("segments/{tableName}/{segmentName}")
+  @Produces(MediaType.APPLICATION_JSON)
+  @ApiOperation(value = "Get segment debug info",
+      notes = "This is a debug endpoint, and won't maintain backward compatibility")
+  public SegmentServerDebugInfo getSegmentDebugInfo(
+      @ApiParam(value = "Name of the table", required = true) @PathParam("tableName") String tableNameWithType,

Review Comment:
   Same for the table level one
   ```suggestion
         @ApiParam(value = "Name of the table (with type)", required = true) @PathParam("tableName") String tableNameWithType,
   ```



##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/DebugResource.java:
##########
@@ -142,6 +143,21 @@ public String getTableDebugInfo(
     return JsonUtils.objectToPrettyString(tableDebugInfos);
   }
 
+  @GET
+  @Path("segments/{tableName}/{segmentName}")
+  @Produces(MediaType.APPLICATION_JSON)
+  @ApiOperation(value = "Get debug information for segment.", notes = "Debug information for segment.")
+  @ApiResponses(value = {
+      @ApiResponse(code = 200, message = "Success"), @ApiResponse(code = 404, message = "Segment not found"),
+      @ApiResponse(code = 500, message = "Internal server error")
+  })
+  public TableDebugInfo.SegmentDebugInfo getSegmentDebugInfo(
+      @ApiParam(value = "Name of the table (with type)", required = true) @PathParam("tableName") String tableName,

Review Comment:
   (minor)
   ```suggestion
         @ApiParam(value = "Name of the table (with type)", required = true) @PathParam("tableName") String tableNameWithType,
   ```



-- 
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-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org