praveenc7 commented on code in PR #16876:
URL: https://github.com/apache/pinot/pull/16876#discussion_r2386424561
##########
pinot-core/src/main/java/org/apache/pinot/core/accounting/WorkloadAggregator.java:
##########
@@ -166,13 +166,13 @@ public void postAggregate() {
for (CPUMemThreadLevelAccountingObjects.ThreadEntry threadEntry :
threadEntries) {
String queryId = threadEntry.getQueryId();
CPUMemThreadLevelAccountingObjects.TaskEntry taskEntry =
threadEntry.getCurrentThreadTaskStatus();
- Thread anchorThread = taskEntry.getAnchorThread();
- if (!anchorThread.isInterrupted()) {
+ Thread anchorThread = taskEntry != null ?
taskEntry.getAnchorThread() : null;
Review Comment:
This was producing an NPE
##########
pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotBrokerDebug.java:
##########
@@ -339,4 +347,31 @@ public String getApplicationQueryQuota(
@ApiParam(value = "Name of the application")
@PathParam("applicationName") String applicationName) {
return
String.valueOf(_queryQuotaManager.getApplicationQueryQuota(applicationName));
}
+
+ @GET
+ @Path("debug/queryWorkloadCost/{workloadName}")
+ @ApiOperation(value = "Get instance cost information for a specific
workload")
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "Success"),
+ @ApiResponse(code = 404, message = "Workload not found"),
+ @ApiResponse(code = 500, message = "Internal server error")
+ })
+ @Produces(MediaType.APPLICATION_JSON)
+ public String getWorkloadBudgetStats(
Review Comment:
We missed adding this for broker, added as part of the integ testing and
also consolidated the common logic into a shared utility so it can be used
across both server and broker
--
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]