{"record":{"id":"08bdc5728ca3efbc","repo":"apache/druid","slug":"unknown-tuningconfig-type-s-must-be-in-s","errorCode":null,"errorMessage":"Unknown tuningConfig type: [%s], Must be in [%s, %s, %s]","messagePattern":"Unknown tuningConfig type: \\[(.+?)\\], Must be in \\[(.+?), (.+?), (.+?)\\]","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java","lineNumber":369,"sourceCode":"          indexTuningConfig.getPushTimeout(),\n          indexTuningConfig.getSegmentWriteOutMediumFactory(),\n          null,\n          null,\n          null,\n          null,\n          null,\n          null,\n          null,\n          null,\n          indexTuningConfig.isLogParseExceptions(),\n          indexTuningConfig.getMaxParseExceptions(),\n          indexTuningConfig.getMaxSavedParseExceptions(),\n          indexTuningConfig.getMaxColumnsToMerge(),\n          indexTuningConfig.getAwaitSegmentAvailabilityTimeoutMillis(),\n          indexTuningConfig.getNumPersistThreads()\n      );\n    } else {\n      throw new ISE(\n          \"Unknown tuningConfig type: [%s], Must be in [%s, %s, %s]\",\n          tuningConfig.getClass().getName(),\n          CompactionTuningConfig.class.getName(),\n          ParallelIndexTuningConfig.class.getName(),\n          IndexTuningConfig.class.getName()\n      );\n    }\n  }\n\n  @VisibleForTesting\n  public CurrentSubTaskHolder getCurrentSubTaskHolder()\n  {\n    return currentSubTaskHolder;\n  }\n\n  @JsonProperty\n  public CompactionIOConfig getIoConfig()\n  {","sourceCodeStart":351,"sourceCodeEnd":387,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/indexing-service/src/main/java/org/apache/druid/indexing/common/task/CompactionTask.java#L351-L387","documentation":"CompactionTask.getTuningConfig only understands three tuningConfig implementations: CompactionTuningConfig, ParallelIndexTuningConfig, and IndexTuningConfig. Any other class (or null-typed custom/unknown impl) triggers this ISE, since the task cannot map it to an index-task tuning config.","triggerScenarios":"Passing a tuningConfig of an unexpected type into CompactionTask — e.g., a custom TuningConfig subclass, a TuningConfig deserialized as a generic/unknown type due to a missing or wrong \"type\" field, or a type from a different task family.","commonSituations":"Hand-written compaction specs where \"tuningConfig\":{\"type\":...} uses an unsupported type name; copying tuningConfig from a non-compaction task; plugin/extension classpath changes making deserialization fall back to a default type.","solutions":["Set tuningConfig.type to one of: compaction, index_parallel, or index (the types mapping to the three accepted classes).","Replace a custom TuningConfig with CompactionTuningConfig for the compaction task.","If deserialization produced the wrong class, check the \"type\" discriminator in the JSON and registered Jackson subtypes."],"exampleFix":"// before\n\"tuningConfig\": { \"type\": \"hadoop\", ... }\n// after\n\"tuningConfig\": { \"type\": \"compaction\", \"maxRowsInMemory\": 1000000 }","handlingStrategy":"validation","validationCode":"final String t = tuningConfig == null ? null : tuningConfig.getClass().getName();\nfinal boolean ok = t == null || t.equals(\"org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexTuningConfig\")\n    || t.equals(\"org.apache.druid.indexing.common.task.CompactionTuningConfig\")\n    || t.equals(\"org.apache.druid.indexing.common.task.IndexTuningConfig\");","typeGuard":null,"tryCatchPattern":"try { task.getTuningConfig(); } catch (ISE e) { if (e.getMessage().startsWith(\"Unknown tuningConfig type\")) { fix spec 'type' discriminator; } else throw e; }","preventionTips":["Always set tuningConfig.type explicitly in compaction JSON.","Use only compaction/index_parallel/index tuningConfig types with CompactionTask.","Check Jackson subtype registration if custom classes must deserialize."],"tags":["druid","compaction","tuning-config","type-mismatch"],"backgroundTag":"config-type-mismatch","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"}