{"record":{"id":"c8267149263fc19b","repo":"apache/druid","slug":"unknown-loader-type-s-known-types-are-s-c82671","errorCode":null,"errorMessage":"Unknown loader type[%s].  Known types are %s","messagePattern":"Unknown loader type\\[(.+?)\\]\\.  Known types are (.+?)","errorType":"exception","errorClass":"SegmentLoadingException","httpStatus":null,"severity":"error","filePath":"server/src/main/java/org/apache/druid/segment/loading/OmniDataSegmentArchiver.java","lineNumber":68,"sourceCode":"  @Override\n  public DataSegment archive(DataSegment segment) throws SegmentLoadingException\n  {\n    return getArchiver(segment).archive(segment);\n  }\n\n  @Override\n  public DataSegment restore(DataSegment segment) throws SegmentLoadingException\n  {\n    return getArchiver(segment).restore(segment);\n  }\n\n  private DataSegmentArchiver getArchiver(DataSegment segment) throws SegmentLoadingException\n  {\n    String type = MapUtils.getString(segment.getLoadSpec(), \"type\");\n    Supplier<DataSegmentArchiver> archiver = archivers.get(type);\n\n    if (archiver == null) {\n      throw new SegmentLoadingException(\"Unknown loader type[%s].  Known types are %s\", type, archivers.keySet());\n    }\n\n    return archiver.get();\n  }\n\n  @VisibleForTesting\n  public Map<String, Supplier<DataSegmentArchiver>> getArchivers()\n  {\n    return archivers;\n  }\n}\n","sourceCodeStart":50,"sourceCodeEnd":80,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/segment/loading/OmniDataSegmentArchiver.java#L50-L80","documentation":"OmniDataSegmentArchiver.getArchiver throws SegmentLoadingException when the segment's loadSpec 'type' has no registered DataSegmentArchiver. The archiver dispatcher routes to the archiver matching the loadSpec type (e.g. 'local', 's3', 'hdfs'); an unregistered type means the storage type is not supported for archive operations.","triggerScenarios":"archive() or restore() on a DataSegment whose loadSpec type string is absent from the configured archivers map — misspelled type, archiver for that storage not on the classpath/extension loaded, or loadSpec missing 'type'.","commonSituations":"Running coordinator kill/archive on segments in deep storage whose extension isn't loaded; loadSpec type changed between versions; typo in druid.storage.type; custom storage without a registered archiver.","solutions":["Load the Druid extension for the segment's storage type (e.g. druid-s3-extensions, druid-hdfs-storage).","Check the loadSpec 'type' in metadata store for typos vs. the configured type list in the error message.","Add the storage extension to druid.extensions.loadList and restart the coordinator.","If the type is genuinely unsupported for archiving, don't archive those segments or write/register a custom DataSegmentArchiver."],"exampleFix":"// before: segment loadSpec type 's3' but extension missing\n# druid.extensions.loadList=[]\n// after\n# druid.extensions.loadList=[\"druid-s3-extensions\"]","handlingStrategy":"validation","validationCode":"String type = (String) segment.getLoadSpec().get(\"type\");\nif (type == null || !registeredArchiverTypes.contains(type)) {\n  throw new IllegalStateException(\"no archiver for loadSpec type \" + type);\n}","typeGuard":"boolean archivable(DataSegment segment) {\n  Object t = segment.getLoadSpec().get(\"type\");\n  return t instanceof String && knownTypes.contains(t);\n}","tryCatchPattern":"try {\n  archiver.archive(segment, archiveDir);\n} catch (SegmentLoadingException e) {\n  log.error(e, \"no archiver for segment type; load required extension\");\n}","preventionTips":["List every deep-storage extension you use in druid.extensions.loadList on coordinators and overlords too.","After storage-type migrations, re-check that all loadSpec types still have support classes.","Avoid hand-editing loadSpec 'type' values.","The error message prints known types — compare against it when configuring."],"tags":["segment-archive","unsupported-type","configuration"],"backgroundTag":"invalid-enum-value","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}