apache/druid · error · IllegalArgumentException
Arguments cannot be empty of null
Error message
Arguments cannot be empty of null
What it means
Generic validation helper in GceUtils.buildFilter: the caller passed a null/empty term list or a null/empty key when constructing a GCE API filter string. Without terms or a key no meaningful filter can be built, so the utility rejects the arguments instead of issuing a malformed list request.
Solutions
- Ensure the instance/term list passed to GceUtils methods is populated before building filters (check autoscaler config for valid host patterns).
- Validate the filter key (e.g. 'name') is non-empty at the call site.
- Add logging of the offending list/key to identify which caller passed empty arguments.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at extensions-contrib/gce-extensions/src/main/java/org/apache/druid/indexing/overlord/autoscaling/gce/GceUtils.java:57 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/701d9847dc50bc48.
Report an issue: GitHub.
Appendix: source
Thrown at extensions-contrib/gce-extensions/src/main/java/org/apache/druid/indexing/overlord/autoscaling/gce/GceUtils.java:57
String name = instance;
if (instance != null && !instance.isEmpty()) {
int lastSlash = instance.lastIndexOf('/');
if (lastSlash > -1) {
name = instance.substring(lastSlash + 1);
} else {
name = instance; // let's assume not the URI like thing
}
}
return name;
}
/**
* Converts a list of terms to a 'OR' list of terms to look for a specific 'key'
*/
public static String buildFilter(List<String> list, String key)
{
if (list == null || list.isEmpty() || key == null || key.isEmpty()) {
throw new IllegalArgumentException("Arguments cannot be empty of null");
}
Iterator<String> it = list.iterator();
StringBuilder sb = new StringBuilder();
sb.append(StringUtils.format("(%s = \"%s\")", key, it.next()));
while (it.hasNext()) {
sb.append(" OR ").append(StringUtils.format("(%s = \"%s\")", key, it.next()));
}
return sb.toString();
}
// cannot build it!
private GceUtils()
{
}
}
View on GitHub (pinned to 9b90983fd2)