apache/hadoop · error · IllegalArgumentException

status cannot be

Error message

status cannot be 

What it means

Error "status cannot be " thrown in apache/hadoop.

Source

Thrown at hadoop-tools/hadoop-rumen/src/main/java/org/apache/hadoop/tools/rumen/TaskAttemptInfo.java:39

import org.apache.hadoop.mapred.TaskStatus.State;

/**
 * {@link TaskAttemptInfo} is a collection of statistics about a particular
 * task-attempt gleaned from job-history of the job.
 */
public abstract class TaskAttemptInfo {
  protected final State state;
  protected final TaskInfo taskInfo;

  protected final List<List<Integer>> allSplits;

  protected TaskAttemptInfo
       (State state, TaskInfo taskInfo, List<List<Integer>> allSplits) {
    if (state == State.SUCCEEDED || state == State.FAILED) {
      this.state = state;
    } else {
      throw new IllegalArgumentException("status cannot be " + state);
    }
    this.taskInfo = taskInfo;
    this.allSplits = allSplits;
  }

  protected TaskAttemptInfo
       (State state, TaskInfo taskInfo) {
    this(state, taskInfo, LoggedTaskAttempt.SplitVectorKind.getNullSplitsVector());
  }

  /**
   * Get the final {@link State} of the task-attempt.
   * 
   * @return the final <code>State</code> of the task-attempt
   */
  public State getRunState() {
    return state;
  }

View on GitHub (pinned to 2add963021)

Solutions

  1. Set a valid task attempt status before serializing; the status field is null or empty.

When it happens

Trigger: TaskAttemptInfo is constructed with an invalid (empty/unknown) status string while reading job history data.

Common situations: See trigger scenarios.


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