apache/druid · error · IllegalArgumentException

No such outputChannelMode[%s]

Error message

No such outputChannelMode[%s]

What it means

OutputChannelMode.fromString parses a user-supplied outputChannelMode string into the enum. If the string matches none of the enum's toString values, it throws IAE("No such outputChannelMode[%s]"), listing nothing else — the value must be one of the supported modes (e.g. memory, tempFiles, durableStorage).

Source

Thrown at multi-stage-query/src/main/java/org/apache/druid/msq/exec/OutputChannelMode.java:78

  DURABLE_STORAGE_QUERY_RESULTS("durableStorageQueryResults");

  private final String name;

  OutputChannelMode(String name)
  {
    this.name = name;
  }

  @JsonCreator
  public static OutputChannelMode fromString(final String s)
  {
    for (final OutputChannelMode mode : values()) {
      if (mode.toString().equals(s)) {
        return mode;
      }
    }

    throw new IAE("No such outputChannelMode[%s]", s);
  }

  /**
   * Whether this mode involves writing to durable storage.
   */
  public boolean isDurable()
  {
    return this == DURABLE_STORAGE_INTERMEDIATE || this == DURABLE_STORAGE_QUERY_RESULTS;
  }

  @Override
  @JsonValue
  public String toString()
  {
    return name;
  }
}

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Set outputChannelMode to one of the exact supported values: memory, tempFiles, or durableStorage
  2. Check for typos, casing, and stray whitespace in the query context
  3. Omit the parameter entirely to use the default mode
  4. Verify durableStorage is only used where durable storage is enabled

Example fix

// before
"outputChannelMode": "durablestore"
// after
"outputChannelMode": "durableStorage"
Defensive patterns

Strategy: validation

Validate before calling

Set.of("memory","tempFiles","durableStorage").contains(outputChannelMode)

Type guard

boolean isValidOutputChannelMode(String s) { return "memory".equals(s) || "tempFiles".equals(s) || "durableStorage".equals(s); }

Try / catch

try { client.run(queryWithContext); } catch (IAE e) { if (e.getMessage().startsWith("No such outputChannelMode")) { fixContextAndRetry(); } else { throw e; } }

Prevention

When it happens

Trigger: Setting the MSQ query context parameter outputChannelMode to an unrecognized string in query context or the task's context.

Common situations: Typos like 'durablestore' or 'memoryanddisk'; copying settings from other engines (Spark-style names); case/whitespace errors in the context value.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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