{"record":{"id":"09aa5f3cb13f7b4b","repo":"apache/druid","slug":"cannot-delete-all-segment-files-since-azure-deep-s","errorCode":null,"errorMessage":"Cannot delete all segment files since Azure Deep Storage since druid.azure.container and druid.azure.prefix are not both set.","messagePattern":"Cannot delete all segment files since Azure Deep Storage since druid\\.azure\\.container and druid\\.azure\\.prefix are not both set\\.","errorType":"exception","errorClass":"ISE","httpStatus":null,"severity":"error","filePath":"extensions-core/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureDataSegmentKiller.java","lineNumber":136,"sourceCode":"\n    Map<String, Object> loadSpec = segment.getLoadSpec();\n    final String containerName = MapUtils.getString(loadSpec, \"containerName\");\n    final String blobPath = MapUtils.getString(loadSpec, \"blobPath\");\n    final String dirPath = Paths.get(blobPath).getParent().toString();\n\n    try {\n      azureStorage.emptyCloudBlobDirectory(containerName, dirPath);\n    }\n    catch (BlobStorageException e) {\n      throw new SegmentLoadingException(e, \"Couldn't kill segment[%s]: [%s]\", segment.getId(), e.getMessage());\n    }\n  }\n\n  @Override\n  public void killAll() throws IOException\n  {\n    if (segmentConfig.getContainer() == null || segmentConfig.getPrefix() == null) {\n      throw new ISE(\n          \"Cannot delete all segment files since Azure Deep Storage since druid.azure.container and druid.azure.prefix are not both set.\");\n    }\n    log.info(\n        \"Deleting all segment files from Azure storage location [bucket: '%s' prefix: '%s']\",\n        segmentConfig.getContainer(),\n        segmentConfig.getPrefix()\n    );\n    try {\n      AzureUtils.deleteObjectsInPath(\n          azureStorage,\n          inputDataConfig,\n          accountConfig,\n          azureCloudBlobIterableFactory,\n          segmentConfig.getContainer(),\n          segmentConfig.getPrefix(),\n          Predicates.alwaysTrue()\n      );\n    }","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureDataSegmentKiller.java#L118-L154","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\n// druid.storage.type=azure but no druid.azure.* properties\n// after\n// add to runtime.properties:\n// druid.azure.container=my-container\n// druid.azure.prefix=druid/segments","handlingStrategy":"validation","validationCode":"if (segmentConfig.getContainer() == null || segmentConfig.getPrefix() == null) {\n  throw new IllegalStateException(\"killAll requires druid.azure.container and druid.azure.prefix\");\n}","typeGuard":null,"tryCatchPattern":"try { killer.killAll(); } catch (ISE e) { log.error(\"Azure config incomplete for killAll: %s\", e.getMessage()); }","preventionTips":["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"],"tags":["azure","config","killall"],"backgroundTag":"missing-required-config-field","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}