apache/beam · error · IllegalArgumentException
Unexpected entry status
Error message
Unexpected entry status: ${entry.status()} What it means
When building changelog tasks from manifest entries, only a fixed set of entry statuses (EXISTING/ADDED/DELETED) is handled. Any other ManifestEntry.Status value falls into the default branch and throws IllegalArgumentException, indicating an unexpected status from the manifest reader.
Solutions
- Log/inspect entry.status() to see the exact value and check it against the current ManifestEntry.Status enum
- Align Beam and Iceberg versions — the enum likely has a constant the Beam module predates
- If data corruption is suspected, validate the table metadata and consider a snapshot re-publish
Example fix
// before <dependency><groupId>org.apache.iceberg</groupId><artifactId>iceberg-core</artifactId><version>1.7.0</version></dependency> // newer enum than Beam handles // after <dependency><groupId>org.apache.iceberg</groupId><artifactId>iceberg-core</artifactId><version>1.4.3</version></dependency> <!-- Beam-compatible -->
Defensive patterns
Strategy: try-catch
Validate before calling
// preflight on a driver: ensure every status maps to a known enum constant
for (ManifestEntry<?> e : entries) {
checkState(isKnownStatus(e.status()), "unknown entry status: " + e.status());
} Try / catch
try {
createTasks(...);
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Unexpected entry status:")) {
LOG.error("Unknown manifest entry status {} — check Beam/Iceberg version match", e.getMessage());
throw e;
}
} Prevention
- Keep Beam's iceberg module and iceberg-core versions aligned
- Validate table metadata integrity after suspicious failures
- Test pipelines against Iceberg upgrades before rollout
When it happens
Trigger: A manifest entry carries a status value not anticipated by the switch (e.g. a newer Iceberg added an enum constant, or the reader deserializes a corrupt/unknown status integer).
Common situations: Iceberg version mismatch producing an unmapped enum ordinal; corrupted metadata; a Beam version not yet updated for a new Iceberg entry status.
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
- Failed to initialize EMPTY DeleteFileIndex
- Unknown scan type
- Unknown ValueKind
- Unsupported CDC ValueKind
- watermark_column_time_unit
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/5b0fd125aa7e723b.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/io/iceberg/src/main/java/org/apache/iceberg/BeamBaseIncrementalChangelogScan.java:962
context.schemaAsString(),
context.specAsString(),
context.residuals());
case DELETED:
// For DELETED data files, attach ALL deletes that were present up to deletion
// This includes existing deletes AND deletes added in the scan range
DeleteFile[] deletedFileDeletes = getDeletesForDeletedFile(entry, commitSnapshotId);
return new BaseDeletedDataFileScanTask(
changeOrdinal,
commitSnapshotId,
dataFile,
deletedFileDeletes,
context.schemaAsString(),
context.specAsString(),
context.residuals());
default:
throw new IllegalArgumentException("Unexpected entry status: " + entry.status());
}
});
}
/**
* Gets delete files that apply to an ADDED data file. Only includes deletes added in the same
* snapshot as the file.
*/
private DeleteFile[] getDeletesForAddedFile(
ManifestEntry<DataFile> entry, long commitSnapshotId) {
DeleteFileIndex addedDeleteIndex = addedDeletesBySnapshot.get(commitSnapshotId);
return addedDeleteIndex == null || addedDeleteIndex.isEmpty()
? NO_DELETES
: addedDeleteIndex.forEntry(entry);
}
/**
* Gets all delete files that were applied to a DELETED data file up to the point it wasView on GitHub (pinned to 12126d8942)