apache/dolphinscheduler · error · IllegalArgumentException

Unsupported program type: ${emrParameters.getProgramType()}

Error message

Unsupported program type: ${emrParameters.getProgramType()}

What it means

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.

Source

Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-emr/src/main/java/org/apache/dolphinscheduler/plugin/task/emr/EmrTaskChannel.java:37

import org.apache.dolphinscheduler.common.utils.JSONUtils;
import org.apache.dolphinscheduler.plugin.task.api.AbstractTask;
import org.apache.dolphinscheduler.plugin.task.api.TaskChannel;
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext;
import org.apache.dolphinscheduler.plugin.task.api.parameters.AbstractParameters;

public class EmrTaskChannel implements TaskChannel {

    @Override
    public AbstractTask createTask(TaskExecutionContext taskRequest) {
        EmrParameters emrParameters = JSONUtils.parseObject(taskRequest.getTaskParams(), EmrParameters.class);
        assert emrParameters != null;
        if (ProgramType.RUN_JOB_FLOW.equals(emrParameters.getProgramType())) {
            return new EmrJobFlowTask(taskRequest);
        } else if (ProgramType.ADD_JOB_FLOW_STEPS.equals(emrParameters.getProgramType())) {
            return new EmrAddStepsTask(taskRequest);
        } else {
            throw new IllegalArgumentException("Unsupported program type: " + emrParameters.getProgramType());
        }
    }

    @Override
    public AbstractParameters parseParameters(String taskParams) {
        return JSONUtils.parseObject(taskParams, EmrParameters.class);
    }

}

View on GitHub (pinned to 02eac45a1b)

Solutions

  1. Set programType in the task definition to a supported value (RUN_JOB_FLOW or ADD_STEPS)
  2. Check for trailing whitespace/case mismatches in the programType string
  3. If the definition was written by an older version, edit and re-save the task in the current UI
Defensive patterns

Strategy: validation

When it happens

Trigger: 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.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06). Data as JSON: /api/errors/c229269eb4a88dd1. Report an issue: GitHub.