apache/druid · error · SegmentLoadingException
e.getMessage()
Error message
e.getMessage()
What it means
In AzureDataSegmentPuller.getSegmentFiles, when downloading and unzipping a segment from Azure fails, the original exception (ExceptionUtils.AzureTaskOffsetException-adjacent handling aside) is rethrown as a SegmentLoadingException whose message is simply e.getMessage(). It tells you the pull/unzip of the segment to local disk failed; the cause carries the real error.
Source
Thrown at extensions-core/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureDataSegmentPuller.java:96
false
);
log.info("Loaded %d bytes from [%s] to [%s]", result.size(), actualBlobPath, outDir.getAbsolutePath());
return result;
}
catch (IOException e) {
try {
FileUtils.deleteDirectory(outDir);
}
catch (IOException ioe) {
log.warn(
ioe,
"Failed to remove output directory [%s] for segment pulled from [%s]",
outDir.getAbsolutePath(),
blobPath
);
}
throw new SegmentLoadingException(e, e.getMessage());
}
}
}
View on GitHub (pinned to 9b90983fd2)
Solutions
- Check getCause() of the SegmentLoadingException for the underlying Azure/unzip error
- Verify the segment exists at the blob path in the configured container
- Re-download by restarting the historical segment load; if the zip is corrupt, re-push the segment
- Confirm credentials have read (list/get) permissions
Example fix
// before throw new SegmentLoadingException(e, e.getMessage()); // after throw new SegmentLoadingException(e, "Failed to pull segment[%s] from Azure", blobPath);
Defensive patterns
Strategy: try-catch
Validate before calling
// check blob exists before pulling if (!azureStorage.objectExists(container, blobPath)) throw new FileNotFoundException(blobPath);
Try / catch
try { files = puller.getSegmentFiles(descriptor); } catch (SegmentLoadingException e) { log.error("Pull failed for %s: %s", descriptor, e.getCause()); cleanUpOutDir(); } Prevention
- Ensure segment zips are fully uploaded (pusher completes before coordinator announces segments)
- Verify historicals use the same druid.azure.container/prefix as the pusher
- Watch for concurrent kill while a historical loads the segment
- Keep temp disk space available for unzip
When it happens
Trigger: getSegmentFiles catches a failure while pulling the segment blob from Azure (download error, corrupt/missing zip, permissions, missing blob) and wraps it with message e.getMessage().
Common situations: Segment blob deleted from Azure while a historical loads it; corrupted or partially uploaded segment zips; wrong container/prefix config on historicals; transient network failures.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- Couldn't delete segments from Azure. See the task logs for m
- Unknown loader type[%s]. Known types are %s
- Recoverable exception
- NoSuchElementException
- Failed to get blob item from Azure container[%s], prefix[%s
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/60b9611f7833b296.
Report an issue: GitHub.