apache/seatunnel · error · IllegalArgumentException
must in [ALL, OFF, PART]
Error message
${TASK_EXECUTION_THREAD_SHARE_MODE} must in [ALL, OFF, PART] What it means
When parsing the worker engine config, YamlSeaTunnelDomConfigProcessor validates that TASK_EXECUTION_THREAD_SHARE_MODE (upper-cased before the check) is one of ALL, OFF, or PART; anything else throws IllegalArgumentException because ThreadShareMode.valueOf would otherwise fail.
Solutions
- Set the value to exactly one of ALL, OFF, or PART (case-insensitive).
- Remove the key to use the default ThreadShareMode.
- Check the ServerConfigOptions.WorkerServerConfigOptions docs for accepted values in your version.
Example fix
# before task-execution: thread-share-mode: TRUE # after task-execution: thread-share-mode: PART
Defensive patterns
Strategy: validation
Validate before calling
String mode = props.getProperty("task-execution.thread-share-mode", "").trim().toUpperCase(Locale.ROOT);
if (!mode.isEmpty() && !List.of("ALL", "OFF", "PART").contains(mode)) {
throw new IllegalArgumentException("thread-share-mode must be ALL, OFF, or PART, got " + mode);
} Try / catch
try {
engineConfig.setTaskExecutionThreadShareMode(ThreadShareMode.valueOf(mode));
} catch (IllegalArgumentException e) {
throw new ConfigValidationException("thread-share-mode must be ALL|OFF|PART", e);
} Prevention
- Copy enum values only from the official docs for your version.
- Add a config schema test covering worker options.
- Do not port Flink/Spark setting names into SeaTunnel YAML.
When it happens
Trigger: parseEngineConfig encounters the thread-share-mode key with a value outside {ALL, OFF, PART} (case-insensitive), e.g. 'true', 'shared', or a typo like 'ALLL'.
Common situations: Porting Flink/Spark thread settings into SeaTunnel YAML; typos in hand-written config; stale docs from older versions listing different enum names.
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
- must in [SHARED, ISOLATED]
- input.multiline.match must be "after" or "before".
- input.on-error must be "skip" or "fail".
- input.output-format.type must be "line" or "json".
- Unknown compression
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/703ab5a13debaf38.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-engine/seatunnel-engine-common/src/main/java/org/apache/seatunnel/engine/common/config/YamlSeaTunnelDomConfigProcessor.java:203
.JOB_METRICS_BACKUP_INTERVAL
.key(),
getTextContent(node)));
} else if (ServerConfigOptions.MasterServerConfigOptions.JOB_METRICS_PARTITION_COUNT
.key()
.equals(name)) {
engineConfig.setJobMetricsPartitionCount(
getIntegerValue(
ServerConfigOptions.MasterServerConfigOptions
.JOB_METRICS_PARTITION_COUNT
.key(),
getTextContent(node)));
} else if (ServerConfigOptions.WorkerServerConfigOptions
.TASK_EXECUTION_THREAD_SHARE_MODE
.key()
.equals(name)) {
String mode = getTextContent(node).toUpperCase(Locale.ROOT);
if (!Arrays.asList("ALL", "OFF", "PART").contains(mode)) {
throw new IllegalArgumentException(
ServerConfigOptions.WorkerServerConfigOptions
.TASK_EXECUTION_THREAD_SHARE_MODE
+ " must in [ALL, OFF, PART]");
}
engineConfig.setTaskExecutionThreadShareMode(ThreadShareMode.valueOf(mode));
} else if (ServerConfigOptions.WorkerServerConfigOptions.SLOT_SERVICE
.key()
.equals(name)) {
engineConfig.setSlotServiceConfig(parseSlotServiceConfig(node));
} else if (ServerConfigOptions.WorkerServerConfigOptions.TIMER_FLUSH_POOL_SIZE
.key()
.equals(name)) {
engineConfig.setTimerFlushPoolSize(
getIntegerValue(
ServerConfigOptions.WorkerServerConfigOptions.TIMER_FLUSH_POOL_SIZE
.key(),
getTextContent(node)));
} else if (ServerConfigOptions.MasterServerConfigOptions.CHECKPOINTView on GitHub (pinned to cf67b549a7)