apache/iceberg · error · IllegalArgumentException

Unsupported status:

Error message

Unsupported status: 

What it means

During assignSplits, AbstractIcebergEnumerator checks the SplitAssigner's tryAssignSplits result status. Only AVAILABLE (splits assigned) and ALREADY_COMPLETED are expected; any other SplitAssignmentStatus reaches the else branch and throws IllegalArgumentException('Unsupported status: ' + status). Called from handleSourceEvent, addSplitsBack, and the future callback — this indicates the assigner returned a status the enumerator doesn't understand.

Source

Thrown at flink/v2.2/flink/src/main/java/org/apache/iceberg/flink/source/enumerator/AbstractIcebergEnumerator.java:156

      GetSplitResult getResult = assigner.getNext(hostname);
      if (getResult.status() == GetSplitResult.Status.AVAILABLE) {
        LOG.info("Assign split to subtask {}: {}", awaitingSubtask, getResult.split());
        enumeratorContext.assignSplit(getResult.split(), awaitingSubtask);
        awaitingReader.remove();
      } else if (getResult.status() == GetSplitResult.Status.CONSTRAINED) {
        getAvailableFutureIfNeeded();
        break;
      } else if (getResult.status() == GetSplitResult.Status.UNAVAILABLE) {
        if (shouldWaitForMoreSplits()) {
          getAvailableFutureIfNeeded();
          break;
        } else {
          LOG.info("No more splits available for subtask {}", awaitingSubtask);
          enumeratorContext.signalNoMoreSplits(awaitingSubtask);
          awaitingReader.remove();
        }
      } else {
        throw new IllegalArgumentException("Unsupported status: " + getResult.status());
      }
    }
  }

  /** return true if enumerator should wait for splits like in the continuous enumerator case */
  protected abstract boolean shouldWaitForMoreSplits();

  private synchronized void getAvailableFutureIfNeeded() {
    if (availableFuture.get() != null) {
      return;
    }

    CompletableFuture<Void> future =
        assigner
            .isAvailable()
            .thenAccept(
                ignore ->
                    // Must run assignSplits in coordinator thread

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Use the stock SimpleSplitAssigner (or Iceberg's assigned assigner) instead of a custom SplitAssigner.
  2. If a custom assigner is required, return only AVAILABLE or ALREADY_COMPLETED from tryAssignSplits.
  3. Rebuild with a single, consistent Iceberg version so assigner and enumerator share the same enum.
  4. Log the full status value from the message and compare against your assigner's return paths.

Example fix

// before
return new AssignerResult(SplitAssignmentStatus.IN_PROGRESS, assignments); // unsupported
// after
return new AssignerResult(SplitAssignmentStatus.AVAILABLE, assignments);
Defensive patterns

Strategy: validation

Validate before calling

SplitAssignmentStatus status = result.status();
Preconditions.checkArgument(status == SplitAssignmentStatus.AVAILABLE || status == SplitAssignmentStatus.ALREADY_COMPLETED, "Unsupported status: " + status);

Prevention

When it happens

Trigger: A custom SplitAssigner implementation returns a SplitAssignmentStatus value outside {AVAILABLE, ALREADY_COMPLETED}, or an incompatibility between a custom assigner and the enumerator's expected protocol.

Common situations: Custom assigner plugins written against a different Iceberg version; local code changes adding new enum constants to SplitAssignmentStatus without updating the enumerator; jar version mismatches.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/c35185dead6fcfd0. Report an issue: GitHub.