apache/druid · error · ISE
Cannot delete all segment files since Azure Deep Storage sin
Error message
Cannot delete all segment files since Azure Deep Storage since druid.azure.container and druid.azure.prefix are not both set.
What it means
killAll() requires both druid.azure.container and druid.azure.prefix to be configured because it must know where to enumerate and delete all segment blobs. If either is null it throws IllegalStateException instead of attempting a destructive, unscoped operation.
Source
Thrown at extensions-core/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureDataSegmentKiller.java:136
Map<String, Object> loadSpec = segment.getLoadSpec();
final String containerName = MapUtils.getString(loadSpec, "containerName");
final String blobPath = MapUtils.getString(loadSpec, "blobPath");
final String dirPath = Paths.get(blobPath).getParent().toString();
try {
azureStorage.emptyCloudBlobDirectory(containerName, dirPath);
}
catch (BlobStorageException e) {
throw new SegmentLoadingException(e, "Couldn't kill segment[%s]: [%s]", segment.getId(), e.getMessage());
}
}
@Override
public void killAll() throws IOException
{
if (segmentConfig.getContainer() == null || segmentConfig.getPrefix() == null) {
throw new ISE(
"Cannot delete all segment files since Azure Deep Storage since druid.azure.container and druid.azure.prefix are not both set.");
}
log.info(
"Deleting all segment files from Azure storage location [bucket: '%s' prefix: '%s']",
segmentConfig.getContainer(),
segmentConfig.getPrefix()
);
try {
AzureUtils.deleteObjectsInPath(
azureStorage,
inputDataConfig,
accountConfig,
azureCloudBlobIterableFactory,
segmentConfig.getContainer(),
segmentConfig.getPrefix(),
Predicates.alwaysTrue()
);
}View on GitHub (pinned to 9b90983fd2)
Solutions
- Set druid.azure.container and druid.azure.prefix in the runtime properties before running killAll
- Verify the AzureDataSegmentConfig picks up the right druid.azure.* keys
- If killAll is not intended, use per-segment kill instead
Example fix
// before // druid.storage.type=azure but no druid.azure.* properties // after // add to runtime.properties: // druid.azure.container=my-container // druid.azure.prefix=druid/segments
Defensive patterns
Strategy: validation
Validate before calling
if (segmentConfig.getContainer() == null || segmentConfig.getPrefix() == null) {
throw new IllegalStateException("killAll requires druid.azure.container and druid.azure.prefix");
} Try / catch
try { killer.killAll(); } catch (ISE e) { log.error("Azure config incomplete for killAll: %s", e.getMessage()); } Prevention
- Validate druid.azure.container and druid.azure.prefix before scheduling kill-all tasks
- Keep deep-storage config in one reviewed runtime.properties template
- Add a config preflight check in deployment tooling
When it happens
Trigger: Calling AzureDataSegmentKiller.killAll() when AzureDataSegmentConfig.getContainer() or getPrefix() returns null (these properties not set in the runtime config), typically during a full metadata cleanup task.
Common situations: Running the kill-all/noop cleanup against a cluster where Azure deep storage properties were only partially configured, or using a druid.azure.* config meant for something else.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Set 'account' to the storage account that needs to be config
- Either set 'key' or 'sharedAccessStorageToken' or 'useAzureC
- Failed to parse metric dimensions and types
- Recoverable exception
- NoSuchElementException
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/09aa5f3cb13f7b4b.
Report an issue: GitHub.