prestodb/presto · error · PrestoException
ICEBERG_MISSING_DATA
ICEBERG_MISSING_DATA
Error message
Error opening Iceberg split %s (offset=%s, length=%s): %s
What it means
Same wrap point as ICEBERG_BAD_DATA but for BlockMissingException: while opening the Iceberg split's file, the underlying file system reported that a block required to read the file is missing. The connector rethrows it as PrestoException with code ICEBERG_MISSING_DATA, meaning the data file is incomplete or a storage block was lost — typically an HDFS missing-block situation. This is a data-loss condition, not a transient read error.
Source
Thrown at presto-iceberg/src/main/java/com/facebook/presto/iceberg/IcebergPageSourceProvider.java:443
catch (Exception e) {
try {
if (dataSource != null) {
dataSource.close();
}
}
catch (IOException ignored) {
}
if (e instanceof PrestoException) {
throw (PrestoException) e;
}
String message = format("Error opening Iceberg split %s (offset=%s, length=%s): %s", path, start, length, e.getMessage());
if (e instanceof ParquetCorruptionException) {
throw new PrestoException(ICEBERG_BAD_DATA, message, e);
}
if (e instanceof BlockMissingException) {
throw new PrestoException(ICEBERG_MISSING_DATA, message, e);
}
throw new PrestoException(ICEBERG_CANNOT_OPEN_SPLIT, message, e);
}
}
public static Optional<org.apache.parquet.schema.Type> getColumnType(
Map<Integer, org.apache.parquet.schema.Type> parquetIdToField,
MessageType messageType,
IcebergColumnHandle column)
{
if (isPushedDownSubfield(column)) {
Subfield pushedDownSubfield = getPushedDownSubfield(column);
List<String> encodedPath = nestedColumnPath(pushedDownSubfield).stream()
.map(AvroSchemaUtil::makeCompatibleName)
.collect(Collectors.toList());
return getSubfieldType(messageType, AvroSchemaUtil.makeCompatibleName(pushedDownSubfield.getRootName()), encodedPath);
}
View on GitHub (pinned to 55bb57d202)
Solutions
- Run hdfs fsck on the reported path to identify missing blocks and restore them (e.g. from replication or backup); if unrecoverable, rewrite the affected data files.
- Check whether a concurrent file-deletion job (expire_snapshots, orphan file cleanup, compaction) deleted files during the query; align cleanup retention with query durations and re-run the query after compaction completes.
- Re-write the table or affected partitions from source data if blocks are permanently lost.
- Verify no external process deletes files under the table directory outside of Iceberg metadata operations.
Defensive patterns
Strategy: validation
Validate before calling
# Verify file health on HDFS before querying hdfs fsck /warehouse/db/table/data -files -blocks -locations # Ensure no expire_snapshots/cleanup job runs during query windows
Try / catch
try {
queryResults = execute("SELECT * FROM iceberg_table");
} catch (PrestoException e) {
if ("ICEBERG_MISSING_DATA".equals(e.getErrorCode().getName())) {
// missing block: restore from fsck/backup or rewrite affected files
alertDataLoss(e); // do NOT blind-retry
} else {
throw e;
}
} Prevention
- Keep HDFS replication factor >= 3 and monitor for under-replicated blocks.
- Never delete data files outside Iceberg metadata operations.
- Schedule expire_snapshots/orphan cleanup outside query windows and with retention > max query duration.
- Alert on DataNode disk failures promptly.
When it happens
Trigger: createDataPageSource -> createParquetPageSource opening a split whose underlying distributed-file read throws BlockMissingException — e.g. the Parquet file on HDFS has under-replicated/deleted blocks, or the file was truncated/deleted after the split was planned.
Common situations: HDFS DataNode loss or disk failure losing blocks; a concurrent compaction/expiry job (e.g. Iceberg expireSnapshots or file deletion) removed files still referenced by a running query; under-replication after DataNode outage; manually deleted files in the table location.
Related errors
- HIVE_MISSING_DATA
- INVALID_SCHEMA_PROPERTY
- ICEBERG_INVALID_METADATA
- ICEBERG_BAD_DATA
- ICEBERG_CANNOT_OPEN_SPLIT
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/f6f0f339cbe7d1ef.
Report an issue: GitHub.