apache/druid · error · IllegalStateException

Unknown stream name[%s]

Error message

Unknown stream name[%s]

What it means

ExecutorLifecycleConfig.getParentStream resolves the name of the stream the executor should read its parent's messages from. Only "stdin" is supported; any other parentStreamName throws an IllegalStateException because the executor has no other mechanism to attach to its parent process.

Source

Thrown at indexing-service/src/main/java/org/apache/druid/indexing/worker/executor/ExecutorLifecycleConfig.java:89

  public ExecutorLifecycleConfig setStatusFile(File statusFile)
  {
    this.statusFile = statusFile;
    return this;
  }

  public ExecutorLifecycleConfig setParentStreamDefined(boolean parentStreamDefined)
  {
    this.parentStreamDefined = parentStreamDefined;
    return this;
  }

  public InputStream getParentStream()
  {
    if ("stdin".equals(parentStreamName)) {
      return System.in;
    } else {
      throw new ISE("Unknown stream name[%s]", parentStreamName);
    }
  }
}

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Ensure the executor task is launched with parentStreamName="stdin" (the druid.indexing.executor.parentStreamName-style runtime property)
  2. Check the launch command/script that starts the Peon/task child process
  3. Do not substitute other stream names; only stdin is wired to System.in

Example fix

// before
parentStreamName = "pipe"
// after
parentStreamName = "stdin"
Defensive patterns

Strategy: type-guard

Validate before calling

if (!"stdin".equals(parentStreamName)) throw new IllegalArgumentException("parentStreamName must be 'stdin'");

Type guard

boolean isSupportedStream(String s) { return "stdin".equals(s); }

Try / catch

try { in = lifecycleConfig.getParentStream(); } catch (IllegalStateException e) { log.error("parentStreamName misconfigured: {}", e.getMessage()); throw e; }

Prevention

When it happens

Trigger: Calling getParentStream() when parentStreamName is null or set to anything other than the literal string "stdin".

Common situations: Misconfigured task launch command passing a wrong value for the stream flag (e.g. "stdout" or a pipe path); parentStreamName never populated because the task's JVM args were altered.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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