{"record":{"id":"c229269eb4a88dd1","repo":"apache/dolphinscheduler","slug":"unsupported-program-type-emrparameters-getprogr","errorCode":null,"errorMessage":"Unsupported program type: ${emrParameters.getProgramType()}","messagePattern":"Unsupported program type: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-task-plugin/dolphinscheduler-task-emr/src/main/java/org/apache/dolphinscheduler/plugin/task/emr/EmrTaskChannel.java","lineNumber":37,"sourceCode":"\nimport org.apache.dolphinscheduler.common.utils.JSONUtils;\nimport org.apache.dolphinscheduler.plugin.task.api.AbstractTask;\nimport org.apache.dolphinscheduler.plugin.task.api.TaskChannel;\nimport org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;\nimport org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;\n\npublic class EmrTaskChannel implements TaskChannel {\n\n    @Override\n    public AbstractTask createTask(TaskExecutionContext taskRequest) {\n        EmrParameters emrParameters = JSONUtils.parseObject(taskRequest.getTaskParams(), EmrParameters.class);\n        assert emrParameters != null;\n        if (ProgramType.RUN_JOB_FLOW.equals(emrParameters.getProgramType())) {\n            return new EmrJobFlowTask(taskRequest);\n        } else if (ProgramType.ADD_JOB_FLOW_STEPS.equals(emrParameters.getProgramType())) {\n            return new EmrAddStepsTask(taskRequest);\n        } else {\n            throw new IllegalArgumentException(\"Unsupported program type: \" + emrParameters.getProgramType());\n        }\n    }\n\n    @Override\n    public AbstractParameters parseParameters(String taskParams) {\n        return JSONUtils.parseObject(taskParams, EmrParameters.class);\n    }\n\n}\n","sourceCodeStart":19,"sourceCodeEnd":47,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-task-plugin/dolphinscheduler-task-emr/src/main/java/org/apache/dolphinscheduler/plugin/task/emr/EmrTaskChannel.java#L19-L47","documentation":"A dispatch guard in EmrTaskChannel.createTask: the parsed EmrParameters.programType is not one of the supported EMR task kinds (RUN_JOB_FLOW / ADD_STEPS), so the channel factory cannot instantiate a task implementation. The offending input is the programType field of the task's JSON params — usually a typo or a definition created by an incompatible version; the message interpolates the offending value.","triggerScenarios":"Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-emr/src/main/java/org/apache/dolphinscheduler/plugin/task/emr/EmrTaskChannel.java:37 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set programType in the task definition to a supported value (RUN_JOB_FLOW or ADD_STEPS)","Check for trailing whitespace/case mismatches in the programType string","If the definition was written by an older version, edit and re-save the task in the current UI"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}