apache/pulsar · error · PulsarAdminException
Unsupported statsType: ${statsType}
Error message
Unsupported statsType: ${statsType} What it means
getRGUsage dispatches on the requested ResourceGroupUsageStatsType and hit an enum value with no matching case — an unsupported/unknown stats type the reader cannot serve, indicating a client-server version mismatch or corrupt request.
Source
Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/resourcegroup/ResourceGroupService.java:404
}
if (nsRG != null) {
nsRG.incrementLocalUsageStats(monClass, incStats);
rgLocalUsageMessages.labels(nsRG.resourceGroupName, monClass.name()).inc(incStats.messages);
rgLocalUsageBytes.labels(nsRG.resourceGroupName, monClass.name()).inc(incStats.bytes);
}
return true;
}
// Visibility for testing.
protected BytesAndMessagesCount getRGUsage(String rgName, ResourceGroupMonitoringClass monClass,
ResourceGroupUsageStatsType statsType) throws PulsarAdminException {
final ResourceGroup rg = this.getResourceGroupInternal(rgName);
if (rg != null) {
switch (statsType) {
default:
String errStr = "Unsupported statsType: " + statsType;
throw new PulsarAdminException(errStr);
case Cumulative:
return rg.getLocalUsageStatsCumulative(monClass);
case LocalSinceLastReported:
return rg.getLocalUsageStats(monClass);
case ReportFromTransportMgr:
return rg.getLocalUsageStatsFromBrokerReports(monClass);
}
}
BytesAndMessagesCount retCount = new BytesAndMessagesCount();
retCount.bytes = -1;
retCount.messages = -1;
return retCount;
}
/**
* Get the RG with the given name. For internal operations only.
*/View on GitHub (pinned to 820761864e)
Solutions
- Use a supported statsType value from ResourceGroupUsageStatsType
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/resourcegroup/ResourceGroupService.java:404 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/74041504deeee8d7.
Report an issue: GitHub.