{"record":{"id":"5363d26438face6e","repo":"apache/druid","slug":"unknown-loader-type-s-known-types-are-s-5363d2","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/OmniDataSegmentMover.java","lineNumber":62,"sourceCode":"      String type = entry.getKey();\n      Provider<DataSegmentMover> provider = entry.getValue();\n      this.movers.put(type, Suppliers.memoize(provider::get));\n    }\n  }\n\n  @Override\n  public DataSegment move(DataSegment segment, Map<String, Object> targetLoadSpec) throws SegmentLoadingException\n  {\n    return getMover(segment).move(segment, targetLoadSpec);\n  }\n\n  private DataSegmentMover getMover(DataSegment segment) throws SegmentLoadingException\n  {\n    String type = MapUtils.getString(segment.getLoadSpec(), \"type\");\n    Supplier<DataSegmentMover> mover = movers.get(type);\n\n    if (mover == null) {\n      throw new SegmentLoadingException(\"Unknown loader type[%s].  Known types are %s\", type, movers.keySet());\n    }\n\n    return mover.get();\n  }\n\n  @VisibleForTesting\n  public Map<String, Supplier<DataSegmentMover>> getMovers()\n  {\n    return movers;\n  }\n}\n","sourceCodeStart":44,"sourceCodeEnd":74,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/segment/loading/OmniDataSegmentMover.java#L44-L74","documentation":"OmniDataSegmentMover dispatches segment moves to a registered DataSegmentMover based on the 'type' key in the segment's loadSpec. If the type is missing or no mover is registered for it, it throws this SegmentLoadingException because it cannot move the segment.","triggerScenarios":"Calling move(dataSegment, ...) on a segment whose loadSpec lacks a 'type' entry, or whose loadSpec type (e.g. 's3_zip', 'azure', 'local') has no corresponding mover registered in the movers map.","commonSituations":"Deep-storage plugin not loaded on the coordinator/historical (e.g. druid-s3Extensions missing), a typo'd or custom loadSpec type in metadata, or segments written by another deep-storage backend being moved by a node that doesn't support that backend.","solutions":["Load the deep-storage extension matching the segment's loadSpec type (add it to druid.extensions.loadList).","Verify the segment's loadSpec in the metadata store has a valid 'type' key.","Check for typos in the loadSpec type; it must match a registered mover's type exactly.","If migrating deep storage, ensure the new backend's mover is registered before running moves."],"exampleFix":"// before: extension missing\ndruid.extensions.loadList=[\"druid-kafka-indexing-service\"]\n// after: add the deep-storage extension matching segment loadSpec type\ndruid.extensions.loadList=[\"druid-kafka-indexing-service\",\"druid-s3-extensions\"]","handlingStrategy":"validation","validationCode":"final Object type = segment.getLoadSpec().get(\"type\");\nif (type == null || !knownMoverTypes.contains(type.toString())) {\n  throw new IllegalStateException(\"Segment \" + segment.getId() + \" has unsupported loadSpec type: \" + type);\n}","typeGuard":"static boolean hasKnownLoadSpecType(final DataSegment segment, final Set<String> knownTypes) {\n  final Object type = segment.getLoadSpec().get(\"type\");\n  return type instanceof String s && knownTypes.contains(s);\n}","tryCatchPattern":"try {\n  omniMover.move(segment, target);\n} catch (SegmentLoadingException e) {\n  LOGGER.makeAlert(e, \"Failed to move segment %s\", segment.getId()).emit();\n  // treat as unrecoverable for this node; rely on coordinator retry\n}","preventionTips":["Load every deep-storage extension used by your cluster on all nodes that move segments.","Validate loadSpec 'type' values after any deep-storage migration.","Keep segment metadata loadSpecs consistent with deployed extensions.","Log/alert on unknown types early during node startup by auditing segments against registered movers."],"tags":["segment-loading","configuration","deep-storage","unknown-type"],"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-14T05:17:10.506Z"}