apache/iceberg · error · IllegalArgumentException

Unsupported manifest content type:${content}

Error message

Unsupported manifest content type:${content}

What it means

When enumerating manifest entries, BaseSparkAction switches over the ManifestContent type (DATA vs DELETES). Any other ManifestContent value reaches default and throws IllegalArgumentException 'Unsupported manifest content type:'. This protects against manifests of unknown content kind.

Source

Thrown at spark/v4.0/spark/src/main/java/org/apache/iceberg/spark/actions/BaseSparkAction.java:436

    }

    public CloseableIterator<FileInfo> entries(ManifestFileBean manifest) {
      ManifestContent content = manifest.content();
      FileIO io = table.getValue().io();
      Map<Integer, PartitionSpec> specs = table.getValue().specs();
      List<String> proj = ImmutableList.of(DataFile.FILE_PATH.name(), DataFile.CONTENT.name());

      switch (content) {
        case DATA:
          return CloseableIterator.transform(
              ManifestFiles.read(manifest, io, specs).select(proj).iterator(),
              ReadManifest::toFileInfo);
        case DELETES:
          return CloseableIterator.transform(
              ManifestFiles.readDeleteManifest(manifest, io, specs).select(proj).iterator(),
              ReadManifest::toFileInfo);
        default:
          throw new IllegalArgumentException("Unsupported manifest content type:" + content);
      }
    }

    static FileInfo toFileInfo(ContentFile<?> file) {
      return new FileInfo(file.location(), file.content().toString());
    }
  }
}

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Upgrade iceberg-spark to a version supporting the manifest content type in the message
  2. Verify manifest list files are valid and were produced by your Iceberg version
  3. Align writer and reader Iceberg versions

Example fix

// before
default:
  throw new IllegalArgumentException("Unsupported manifest content type:" + content);
// after
default:
  throw new IllegalArgumentException("Unsupported manifest content type: " + content + "; upgrade iceberg-spark to a version that supports it");
Defensive patterns

Strategy: try-catch

Validate before calling

for (ManifestFile m : snapshot.allManifests(io)) { Preconditions.checkArgument(m.content() == ManifestContent.DATA || m.content() == ManifestContent.DELETES, "Unknown manifest content %s", m.content()); }

Try / catch

try { action.execute(); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith("Unsupported manifest content type")) { LOG.error("Manifests from newer Iceberg version detected", e); } throw e; }

Prevention

When it happens

Trigger: Spark actions reading manifests whose ManifestContent is not DATA or DELETES — e.g. manifests written by a newer Iceberg version introducing a new content type, then processed by an older iceberg-spark.

Common situations: Version skew between the engine that wrote the manifests and the cluster running Spark actions; corrupted manifest lists.

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/7cd344de5c242577. Report an issue: GitHub.