apache/hadoop · error · YarnException

No task for the job!

Error message

No task for the job!

What it means

SLS json-trace loader guard: the job definition in the SLS trace contains no 'tasks' entry (or an empty list), so there is nothing to simulate for that application.

Solutions

  1. Ensure the SLS trace job entry contains at least one task.
Defensive patterns

Strategy: validation

When it happens

Trigger: A job in the SLS trace contains no map or reduce tasks, so the simulated AM has nothing to run.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/e5279ebbe7468f1d. Report an issue: GitHub.

Appendix: source

Thrown at hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/AMDefinitionSLS.java:43

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

public class AMDefinitionSLS extends AMDefinition {
  public AMDefinitionSLS(AmDefinitionBuilder builder) {
    super(builder);
  }

  public String getQueue() {
    return queue;
  }

  public static List<ContainerSimulator> getTaskContainers(Map<String, ?> jsonJob,
      SLSRunner slsRunner) throws YarnException {
    List<Map<String, String>> tasks = (List) jsonJob.get(SLSConfiguration.JOB_TASKS);
    if (tasks == null || tasks.size() == 0) {
      throw new YarnException("No task for the job!");
    }

    List<ContainerSimulator> containers = new ArrayList<>();
    for (Map<String, String> jsonTask : tasks) {
      TaskContainerDefinition containerDef =
          TaskContainerDefinition.Builder.create()
              .withCount(jsonTask, SLSConfiguration.COUNT)
              .withHostname(jsonTask.get(SLSConfiguration.TASK_HOST))
              .withDuration(jsonTask, SLSConfiguration.TASK_DURATION_MS)
              .withDurationLegacy(jsonTask, SLSConfiguration.DURATION_MS)
              .withTaskStart(jsonTask, SLSConfiguration.TASK_START_MS)
              .withTaskFinish(jsonTask, SLSConfiguration.TASK_END_MS)
              .withResource(getResourceForContainer(jsonTask, slsRunner))
              .withPriority(jsonTask, SLSConfiguration.TASK_PRIORITY)
              .withType(jsonTask, SLSConfiguration.TASK_TYPE)
              .withExecutionType(jsonTask, SLSConfiguration.TASK_EXECUTION_TYPE)
              .withAllocationId(jsonTask, SLSConfiguration.TASK_ALLOCATION_ID)
              .withRequestDelay(jsonTask, SLSConfiguration.TASK_REQUEST_DELAY)

View on GitHub (pinned to 2add963021)