prestodb/presto · error · PinotException
PINOT_UNABLE_TO_FIND_BROKER
PINOT_UNABLE_TO_FIND_BROKER
Error message
Cannot parse %s in the broker instance
What it means
Thrown when a broker entry returned by the Pinot controller's broker table list cannot be parsed with the expected BROKER_PATTERN (host:port format, two groups). The connector must extract host and port from each broker string to route queries; an unparseable entry makes broker discovery fail.
Source
Thrown at presto-pinot-toolkit/src/main/java/com/facebook/presto/pinot/PinotClusterInfoFetcher.java:317
}
@VisibleForTesting
List<String> getAllBrokersForTable(String table)
{
String responseBody = sendHttpGetToController(String.format(TABLE_INSTANCES_API_TEMPLATE, table));
ArrayList<String> brokers = brokersForTableJsonCodec
.fromJson(responseBody)
.getBrokers()
.stream()
.flatMap(broker -> broker.getInstances().stream())
.distinct()
.map(brokerToParse -> {
Matcher matcher = BROKER_PATTERN.matcher(brokerToParse);
if (matcher.matches() && matcher.groupCount() == 2) {
return matcher.group(1) + ":" + matcher.group(2);
}
else {
throw new PinotException(
PINOT_UNABLE_TO_FIND_BROKER,
Optional.empty(),
String.format("Cannot parse %s in the broker instance", brokerToParse));
}
})
.collect(Collectors.toCollection(() -> new ArrayList<>()));
Collections.shuffle(brokers);
return ImmutableList.copyOf(brokers);
}
public String getBrokerHost(String table)
{
try {
List<String> brokers = brokersForTableCache.get(table);
if (brokers.isEmpty()) {
throw new PinotException(PINOT_UNABLE_TO_FIND_BROKER, Optional.empty(), "No valid brokers found for " + table);
}
return brokers.get(ThreadLocalRandom.current().nextInt(brokers.size()));View on GitHub (pinned to 55bb57d202)
Solutions
- Call the controller endpoint directly (e.g. /tables/{table}/brokers) and inspect the raw broker strings to see the actual format
- Check that the Presto connector's Pinot version matches your Pinot cluster version — broker naming conventions changed across releases
- Verify all brokers for the table are registered in a healthy state in the Pinot cluster state (Zookeeper), not partially started
- Update the connector (or Pinot) so BROKER_PATTERN matches the deployed broker instance format
Example fix
null
Defensive patterns
Strategy: validation
Validate before calling
// Verify broker list format before querying via Presto // curl http://<controller>:9000/tables/<table>/brokers // assert each entry parses as the expected host:port pattern
Prevention
- Keep Pinot cluster and connector versions aligned with broker naming conventions
- Ensure brokers are fully started and registered in a healthy state before query traffic
- Check Zookeeper broker instance entries after Pinot upgrades
When it happens
Trigger: getAllBrokersForTable maps each broker string from the controller response through BROKER_PATTERN.matcher(); if the entry does not fully match with exactly 2 groups (e.g. 'Server_pinot-broker-0_7000' vs expected 'host:port' pattern variants), this is thrown.
Common situations: Pinot cluster upgrades changing the broker instance naming format, broker instances registered in an unexpected state (starting/failed), connector expecting one broker tag format while the cluster uses another (e.g. tenant brokers, legacy naming).
Related errors
- Unsupported bucket function type
- GENERIC_INTERNAL_ERROR
- GrantRevokeResponse missing success field
- ICEBERG_INCOMPATIBLE_VERSION
- ICEBERG_INVALID_METADATA
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/9726f50ba7e778f5.
Report an issue: GitHub.