apache/druid · error · IAE
At most one of properties
Error message
At most one of properties[%s] must be present
What it means
Checks.checkOneNotNullOrEmpty enforces that at most one property from a given set has a non-empty value. If two or more of the listed properties are set, an IAE listing all property names is thrown while parsing the Hadoop batch job/config object.
Solutions
- Remove all but one of the conflicting properties in the ingestion spec.
- Use only the property recommended by the current ingestion spec schema.
- Regenerate the spec so only the intended input source field is populated.
Example fix
// before
"inputPaths": "hdfs://a/b",
"inputSpec": {"type": "static", "paths": "hdfs://a/b"}
// after
"inputSpec": {"type": "static", "paths": "hdfs://a/b"} Defensive patterns
Strategy: validation
Validate before calling
int present = Stream.of(prop1, prop2, prop3).filter(p -> p.getValue() != null && !isEmptyCollection(p.getValue())).count();
if (present > 1) { throw new IllegalArgumentException("At most one input property may be set"); } Try / catch
try { Checks.checkOneNotNullOrEmpty(p1, p2); } catch (IAE e) { log.error("Mutually exclusive properties set: {}", e.getMessage()); throw e; } Prevention
- Set only one of the alternative input properties in ingestion specs
- Validate specs with a JSON schema before submission
- Avoid merging multiple spec templates blindly
When it happens
Trigger: Constructing or deserializing a Hadoop indexing config (e.g. HadoopIngestionSpec / GranularitySpec-style input specs) where two mutually exclusive properties (like two input path/spec options) are both provided.
Common situations: Hadoop batch ingestion specs that specify both inputPaths and a separate input spec; generated JSON templates that fill in multiple optional fields.
Related errors
- At most one of [ ] or [ ] must be present
- A local input source accepts only one of
- A local input source can set parameter
- At least one of properties
- Cannot define both uri and fileRegex
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/cfc161fbff4cb8c5.
Report an issue: GitHub.
Appendix: source
Thrown at processing/src/main/java/org/apache/druid/indexer/Checks.java:40
import org.apache.druid.java.util.common.IAE;
import java.util.List;
import java.util.stream.Collectors;
/**
* Various helper methods useful for checking the validity of arguments to spec constructors.
*/
public final class Checks
{
public static <T> Property<T> checkOneNotNullOrEmpty(List<Property<T>> properties)
{
Property<T> nonNullProperty = null;
for (Property<T> property : properties) {
if (!property.isValueNullOrEmptyCollection()) {
if (nonNullProperty == null) {
nonNullProperty = property;
} else {
throw new IAE(
"At most one of properties[%s] must be present",
properties.stream().map(Property::getName).collect(Collectors.toList())
);
}
}
}
if (nonNullProperty == null) {
throw new IAE(
"At least one of properties[%s] must be present",
properties.stream().map(Property::getName).collect(Collectors.toList())
);
}
return nonNullProperty;
}
/**
* @return Non-null value, or first one if both are null. -1 is interpreted as null for historical reasons.
*/View on GitHub (pinned to 9b90983fd2)