{"record":{"id":"60b9611f7833b296","repo":"apache/druid","slug":"e-getmessage","errorCode":null,"errorMessage":"e.getMessage()","messagePattern":"e\\.getMessage\\(\\)","errorType":"exception","errorClass":"SegmentLoadingException","httpStatus":null,"severity":"error","filePath":"extensions-core/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureDataSegmentPuller.java","lineNumber":96,"sourceCode":"          false\n      );\n\n      log.info(\"Loaded %d bytes from [%s] to [%s]\", result.size(), actualBlobPath, outDir.getAbsolutePath());\n      return result;\n    }\n    catch (IOException e) {\n      try {\n        FileUtils.deleteDirectory(outDir);\n      }\n      catch (IOException ioe) {\n        log.warn(\n            ioe,\n            \"Failed to remove output directory [%s] for segment pulled from [%s]\",\n            outDir.getAbsolutePath(),\n            blobPath\n        );\n      }\n      throw new SegmentLoadingException(e, e.getMessage());\n    }\n  }\n}\n","sourceCodeStart":78,"sourceCodeEnd":100,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/extensions-core/azure-extensions/src/main/java/org/apache/druid/storage/azure/AzureDataSegmentPuller.java#L78-L100","documentation":"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.","triggerScenarios":"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().","commonSituations":"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.","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"],"exampleFix":"// before\nthrow new SegmentLoadingException(e, e.getMessage());\n// after\nthrow new SegmentLoadingException(e, \"Failed to pull segment[%s] from Azure\", blobPath);","handlingStrategy":"try-catch","validationCode":"// check blob exists before pulling\nif (!azureStorage.objectExists(container, blobPath)) throw new FileNotFoundException(blobPath);","typeGuard":null,"tryCatchPattern":"try { files = puller.getSegmentFiles(descriptor); } catch (SegmentLoadingException e) { log.error(\"Pull failed for %s: %s\", descriptor, e.getCause()); cleanUpOutDir(); }","preventionTips":["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"],"tags":["azure","segment-loading","deep-storage"],"backgroundTag":"http-request-failed","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"}