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/09/20 05:24:52 UTC

[GitHub] [pinot] vvivekiyer commented on a diff in pull request #9311: Adaptive Server Selection

vvivekiyer commented on code in PR #9311:
URL: https://github.com/apache/pinot/pull/9311#discussion_r974897211


##########
pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotBrokerDebug.java:
##########
@@ -136,4 +140,21 @@ public Map<ServerInstance, List<String>> getRoutingTableForQuery(
       throw new WebApplicationException("Cannot find routing for query: " + query, Response.Status.NOT_FOUND);
     }
   }
+
+  /**
+   * API to get a snapshot of ServerRoutingStatsEntry for all the servers.
+   * @return String containing server name and the associated routing stats.
+   */
+  @GET
+  @Produces(MediaType.APPLICATION_JSON)
+  @Path("/debug/serverRoutingStats")
+  @ApiOperation(value = "Get the routing stats for all the servers")
+  @ApiResponses(value = {
+      @ApiResponse(code = 200, message = "Server routing Stats"),
+      @ApiResponse(code = 404, message = "Server routing Stats not found"),
+      @ApiResponse(code = 500, message = "Internal server error")
+  })

Review Comment:
   We will not NPE. Please see code in BaseBrokerStarter.java
   serverRoutingStatsManager will always be non-null. But if the flag is disabled, we do not start any executors.



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