prestodb/presto · error · IllegalArgumentException
Selector refers to nonexistent group: %s
Error message
Selector refers to nonexistent group: %s
What it means
AbstractResourceConfigurationManager.validateSelectors walks each selector's group path, matching successive subgroup names against the configured resource group tree. If any segment of the selector's fully-qualified group path does not exist in the resource group specification, it throws IllegalArgumentException 'Selector refers to nonexistent group'.
Source
Thrown at presto-resource-group-managers/src/main/java/com/facebook/presto/resourceGroups/AbstractResourceConfigurationManager.java:122
spec.getGroup()));
}
return selectors.build();
}
private void validateSelectors(List<ResourceGroupSpec> groups, SelectorSpec spec)
{
spec.getQueryType().ifPresent(this::validateQueryType);
List<ResourceGroupNameTemplate> selectorGroups = spec.getGroup().getSegments();
StringBuilder fullyQualifiedGroupName = new StringBuilder();
while (!selectorGroups.isEmpty()) {
ResourceGroupNameTemplate groupName = selectorGroups.get(0);
fullyQualifiedGroupName.append(groupName);
Optional<ResourceGroupSpec> match = groups
.stream()
.filter(groupSpec -> groupSpec.getName().equals(groupName))
.findFirst();
if (!match.isPresent()) {
throw new IllegalArgumentException(format("Selector refers to nonexistent group: %s", fullyQualifiedGroupName.toString()));
}
fullyQualifiedGroupName.append(".");
groups = match.get().getSubGroups();
selectorGroups = selectorGroups.subList(1, selectorGroups.size());
}
}
private void validateQueryType(String queryType)
{
try {
QueryType.valueOf(queryType.toUpperCase());
}
catch (IllegalArgumentException e) {
throw new IllegalArgumentException(format("Selector specifies an invalid query type: %s", queryType));
}
}
protected AbstractResourceConfigurationManager(ClusterMemoryPoolManager memoryPoolManager)View on GitHub (pinned to 55bb57d202)
Solutions
- Align each selector's group path with the actual resource group tree in the config
- Fix typos in group names in selector definitions
- Check startup logs for resource group spec load failures that leave the tree incomplete
- Validate the whole config (group names vs selector references) before deploying
Example fix
// before
"selectors": [{ "group": "global.adhoc.bi" }] // 'bi' does not exist
// after
"selectors": [{ "group": "global.adhoc.analytics" }] Defensive patterns
Strategy: validation
Validate before calling
Set<String> definedGroups = collectAllGroupPaths(resourceGroupSpecs);
for (SelectorSpec s : selectors) {
if (!definedGroups.contains(s.getGroup())) {
throw new IllegalArgumentException("selector references unknown group: " + s.getGroup());
}
} Try / catch
try { manager.validateSelectors(selectors, groups); } catch (IllegalArgumentException e) { log.error("selector config error: " + e.getMessage()); throw new ConfigurationException(e.getMessage()); } Prevention
- Keep selector group paths in sync with the resource group tree
- Run config validation in CI before deploying resource group files
- Watch for spec-load failures that silently drop groups
- Search configs for renamed/removed group names after refactors
When it happens
Trigger: A selector's group property names a resource group (or nested sub-group) that is absent from the resource group config, or a typo'd group name in a selector, or a selector path whose prefix exists but whose deeper segment doesn't.
Common situations: Renamed/deleted resource groups without updating selector rules; JSON/YAML selector files referencing groups defined in a different file that failed to load; indentation mistakes nesting a group under the wrong parent.
Related errors
- ACCUMULO_TABLE_EXISTS
- Selector specifies an invalid query type: %s
- Ambiguous configuration for %s. Matches %s and %s
- Unknown property at line %s:%s: %s
- CONFIGURATION_INVALID
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/b7cba42a7e1b6d24.
Report an issue: GitHub.