{"record":{"id":"e653ae9dc7b624f0","repo":"apache/druid","slug":"unhandled-locator-type","errorCode":null,"errorMessage":"Unhandled locator type: ","messagePattern":"Unhandled locator type: ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"server/src/main/java/org/apache/druid/client/cache/MemcachedCustomConnectionFactoryBuilder.java","lineNumber":83,"sourceCode":"      {\n        switch (locator) {\n          case ARRAY_MOD:\n            return new ArrayModNodeLocator(nodes, getHashAlg());\n          case CONSISTENT:\n            return new KetamaNodeLocator(\n                nodes,\n                getHashAlg(),\n                new DefaultKetamaNodeLocatorConfiguration()\n                {\n                  @Override\n                  public int getNodeRepetitions()\n                  {\n                    return repetitions;\n                  }\n                }\n            );\n          default:\n            throw new IllegalStateException(\"Unhandled locator type: \" + locator);\n        }\n      }\n\n      @Override\n      public BlockingQueue<Operation> createOperationQueue()\n      {\n        return opQueueFactory == null ? super.createOperationQueue() : opQueueFactory.create();\n      }\n\n      @Override\n      public BlockingQueue<Operation> createReadOperationQueue()\n      {\n        return readQueueFactory == null ? super.createReadOperationQueue() : readQueueFactory.create();\n      }\n\n      @Override\n      public BlockingQueue<Operation> createWriteOperationQueue()\n      {","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/client/cache/MemcachedCustomConnectionFactoryBuilder.java#L65-L101","documentation":"MemcachedCustomConnectionFactoryBuilder.createLocator maps a configured locator type onto a spymemcached locator/failure mode. When the configured value matches no known branch, the switch's default throws IllegalStateException listing the offending value, because there is no safe default mapping.","triggerScenarios":"Configuring a memcached locator value that is not one of the supported locator names while the cache connection factory is being built.","commonSituations":"Typo in the locator property, copying a locator name from a different memcached client library, upgrading spymemcached where a legacy locator name was removed.","solutions":["Use one of the supported locator values accepted by MemcachedCache","Log and inspect the exact value in the exception message and correct the spelling","Check the Druid memcached extension docs for the accepted locator set"],"exampleFix":"// before\ndruid.cache.locator=ketamaHash\n// after\ndruid.cache.locator=consistentHash","handlingStrategy":"validation","validationCode":"if (!SUPPORTED_LOCATORS.contains(config.getLocator())) {\n  throw new IllegalArgumentException(\"Unsupported memcached locator: \" + config.getLocator());\n}","typeGuard":null,"tryCatchPattern":"try {\n  cache = MemcachedCache.create(cacheConfig);\n} catch (IllegalStateException e) {\n  if (e.getMessage() != null && e.getMessage().startsWith(\"Unhandled locator type\")) {\n    throw new IllegalArgumentException(\"Fix the druid.cache locator value\", e);\n  }\n  throw e;\n}","preventionTips":["Use locator names exactly as accepted by MemcachedCache","Re-verify locator config when upgrading spymemcached or the extension"],"tags":["config","cache","memcached"],"backgroundTag":"invalid-config-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"}