prestodb/presto · critical · PrestoException
DRUID_DEEP_STORAGE_ERROR
DRUID_DEEP_STORAGE_ERROR
Error message
Ingestion failed on
What it means
DruidPageWriter.append() serializes Presto page blocks into a JSON data file for Druid ingestion. If any IOException occurs while writing (file I/O, JSON generator failure, disk full), it wraps the cause in a PrestoException with code DRUID_DEEP_STORAGE_ERROR, naming the table whose ingestion failed.
Source
Thrown at presto-druid/src/main/java/com/facebook/presto/druid/ingestion/DruidPageWriter.java:77
FileSystem fileSystem = dataFile.getFileSystem(hadoopConfiguration);
try (FSDataOutputStream outputStream = fileSystem.create(dataFile);
GZIPOutputStream zipOutputStream = new GZIPOutputStream(outputStream);
JsonGenerator jsonGen = JSON_FACTORY.createGenerator(zipOutputStream)) {
for (int position = 0; position < page.getPositionCount(); position++) {
jsonGen.writeStartObject();
for (int channel = 0; channel < page.getChannelCount(); channel++) {
DruidColumnInfo column = tableHandle.getColumns().get(channel);
Block block = page.getBlock(channel);
jsonGen.writeFieldName(column.getColumnName());
writeFieldValue(jsonGen, column.getDataType(), block, position);
}
jsonGen.writeEndObject();
}
}
return dataFile;
}
catch (IOException e) {
throw new PrestoException(DRUID_DEEP_STORAGE_ERROR, "Ingestion failed on " + tableHandle.getTableName(), e);
}
}
private void writeFieldValue(JsonGenerator jsonGen, DruidColumnType dataType, Block block, int position)
throws IOException
{
switch (dataType) {
case VARCHAR:
case OTHER:
//hyperUnique, approxHistogram Druid column types
jsonGen.writeString(VARCHAR.getSlice(block, position).toStringUtf8());
return;
case BIGINT:
case TIMESTAMP:
jsonGen.writeNumber(BIGINT.getLong(block, position));
return;
case FLOAT:
case DOUBLE:View on GitHub (pinned to 55bb57d202)
Solutions
- Check the wrapped cause (the PrestoException carries the IOException) and fix the root storage issue — free disk space, fix permissions, or remount the volume.
- Verify the ingestion data directory configured for the page sink is writable by the Presto process.
- Retry the ingestion after the storage problem is resolved; the failure aborts the whole write so data must be re-appended.
- If serialization is failing on specific values, inspect the column data types against writeFieldValue's supported DruidColumnType handling.
Example fix
// before
try (DruidPageWriter writer = new DruidPageWriter(tableHandle, ...)) {
writer.append(page); // IOException -> 'Ingestion failed on <table>'
}
// after (ensure storage headroom before ingesting)
File dataDir = new File(ingestionDataDir);
if (dataDir.getUsableSpace() < requiredBytes) {
throw new PrestoException(NOT_ENOUGH_DISK_SPACE, "Insufficient space for Druid ingestion: " + dataDir);
}
try (DruidPageWriter writer = new DruidPageWriter(tableHandle, ...)) {
writer.append(page);
} Defensive patterns
Strategy: try-catch
When it happens
Trigger: Calling DruidPageWriter.append() while writing page data to the local ingestion data file fails: disk full/permissions error on the data directory, IO error from the JsonGenerator while serializing field values, or the underlying output stream being closed unexpectedly mid-ingestion.
Common situations: Worker node disk full or read-only filesystem during Druid ingestion; permission denied on the staging/data directory; transient storage failure; serialization bugs on unusual column values causing the JSON generator to blow up mid-write.
Related errors
- DRUID_DEEP_STORAGE_ERROR
- DRUID_DEEP_STORAGE_ERROR
- DRUID_METADATA_ERROR
- DRUID_SEGMENT_LOAD_ERROR
- UNEXPECTED_ACCUMULO_ERROR
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/e883758e34e14214.
Report an issue: GitHub.