{"record":{"id":"c17be6ef36c77a8a","repo":"apache/seatunnel","slug":"seatunnel-job-on-spark-engine-deploy-mode-only-sup","errorCode":null,"errorMessage":"SeaTunnel job on spark engine deploy mode only support these options: [cluster, client]","messagePattern":"SeaTunnel job on spark engine deploy mode only support these options: \\[cluster, client\\]","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-core/seatunnel-spark-starter/seatunnel-spark-starter-common/src/main/java/org/apache/seatunnel/core/starter/spark/args/SparkCommandArgs.java","lineNumber":83,"sourceCode":"        }\n        return new SparkTaskExecuteCommand(this);\n    }\n\n    public static class SparkDeployModeConverter implements IStringConverter<DeployMode> {\n        private static final List<DeployMode> DEPLOY_MODE_TYPE_LIST = new ArrayList<>();\n\n        static {\n            DEPLOY_MODE_TYPE_LIST.add(DeployMode.CLIENT);\n            DEPLOY_MODE_TYPE_LIST.add(DeployMode.CLUSTER);\n        }\n\n        @Override\n        public DeployMode convert(String value) {\n            DeployMode deployMode = DeployMode.valueOf(value.toUpperCase());\n            if (DEPLOY_MODE_TYPE_LIST.contains(deployMode)) {\n                return deployMode;\n            } else {\n                throw new IllegalArgumentException(\n                        \"SeaTunnel job on spark engine deploy mode only \"\n                                + \"support these options: [cluster, client]\");\n            }\n        }\n    }\n}\n","sourceCodeStart":65,"sourceCodeEnd":90,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-core/seatunnel-spark-starter/seatunnel-spark-starter-common/src/main/java/org/apache/seatunnel/core/starter/spark/args/SparkCommandArgs.java#L65-L90","documentation":"Thrown by SparkCommandArgs' DeployMode converter when the --deploy-mode CLI value is not one of the two Spark deployment modes SeaTunnel supports. The value is parsed into the DeployMode enum, then checked against an allow-list containing only CLUSTER and CLIENT; anything else fails before Spark is ever invoked. This is an early input-validation guard so users get a clear message instead of an obscure Spark error.","triggerScenarios":"Running seatunnel.sh/spark-submit style submission with --deploy-mode set to a value outside [cluster, client], e.g. --deploy-mode local, --deploy-mode yarn-cluster, or a misspelled value like 'cluser'. The value must survive DeployMode.valueOf(value.toUpperCase()) AND be in DEPLOY_MODE_TYPE_LIST.","commonSituations":"Users copying Flink-style deploy mode values (yarn-cluster, yarn-session, local) into SeaTunnel-on-Spark configs; typos in shell scripts; documentation for older versions mentioning modes SeaTunnel no longer accepts.","solutions":["Change --deploy-mode to either 'cluster' or 'client' (case-insensitive)","Remove the --deploy-mode flag entirely to use the default","Check for typos or trailing whitespace in the value passed in the shell script or config"],"exampleFix":"// before\n--deploy-mode yarn-cluster\n// after\n--deploy-mode cluster","handlingStrategy":"validation","validationCode":"final List<String> ALLOWED = List.of(\"cluster\", \"client\");\nif (deployMode == null || !ALLOWED.contains(deployMode.trim().toLowerCase())) {\n    throw new IllegalArgumentException(\"deploy-mode must be one of: cluster, client\");\n}","typeGuard":"boolean isValidDeployMode(String v) {\n    return v != null && List.of(\"cluster\", \"client\").contains(v.trim().toLowerCase());\n}","tryCatchPattern":null,"preventionTips":["Only pass 'cluster' or 'client' for Spark engine deploy mode","Do not reuse Flink deploy-mode values (yarn-cluster, local) in Spark configs","Add shell-script validation before invoking seatunnel.sh"],"tags":["spark","cli","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}