apache/druid · error · IAE

At least one of properties

Error message

At least one of properties[%s] must be present

What it means

Checks.checkOneNotNullOrEmpty is a Hadoop-batch configuration validation helper: it verifies that at least one of the given Druid properties was set, and throws this IAE when all of them are null/empty. It prevents batch ingestion jobs from starting with a required but missing configuration knob.

Solutions

  1. Set at least one of the listed properties in the ingestion spec/Hadoop job configuration.
  2. Check property name spelling in the config; a typo leaves the intended property unset.
  3. Review the calling job type's documentation for which of the mutually-required properties apply.

Example fix

// before
"type": "index_hadoop"  // no input property
// after
"inputSpec": {"type": "static", "paths": "hdfs://a/b"}
Defensive patterns

Strategy: validation

Validate before calling

boolean any = Stream.of(prop1, prop2).anyMatch(p -> p.getValue() != null && !isEmptyCollection(p.getValue()));
if (!any) { throw new IllegalArgumentException("One of the required input properties must be set"); }

Try / catch

try { Checks.checkOneNotNullOrEmpty(p1, p2); } catch (IAE e) { log.error("No input property provided: {}", e.getMessage()); throw e; }

Prevention

When it happens

Trigger: Building a batch ingestion config object where the required input property (e.g. paths or inputSpec) was omitted entirely, so checkOneNotNullOrEmpty finds no populated property and throws.

Common situations: Hand-written Hadoop ingestion specs missing the input path field; programmatic spec builders that skip optional-looking but required-alternative fields.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/1d277d5365f41772. Report an issue: GitHub.

Appendix: source

Thrown at processing/src/main/java/org/apache/druid/indexer/Checks.java:48

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.
   */
  public static <T> Property<T> checkAtMostOneNotNull(Property<T> property1, Property<T> property2)
  {
    final Property<T> property;

    boolean isNull1 = property1.getValue() == null;
    boolean isNull2 = property2.getValue() == null;

    if (isNull1 && isNull2) {

View on GitHub (pinned to 9b90983fd2)