{"record":{"id":"f82e88a6bf471614","repo":"apache/pulsar","slug":"the-given-supported-namespace-bundle-split-algorit","errorCode":null,"errorMessage":"The given supported namespace bundle split algorithm has unavailable algorithm. Available algorithms are ${availableAlgorithms}","messagePattern":"The given supported namespace bundle split algorithm has unavailable algorithm\\. Available algorithms are (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java","lineNumber":184,"sourceCode":"\n            // init broker config\n            if (isBlank(starterArguments.brokerConfigFile)) {\n                commander.usage(commander.getOut());\n                throw new IllegalArgumentException(\"Need to specify a configuration file for broker\");\n            } else {\n                final String filepath = Path.of(starterArguments.brokerConfigFile)\n                        .toAbsolutePath().normalize().toString();\n                brokerConfig = loadConfig(filepath);\n            }\n\n            int maxFrameSize = brokerConfig.getMaxMessageSize() + Commands.MESSAGE_SIZE_FRAME_PADDING;\n            if (maxFrameSize >= DirectMemoryUtils.jvmMaxDirectMemory()) {\n                throw new IllegalArgumentException(\"Max message size need smaller than jvm directMemory\");\n            }\n\n            if (!NamespaceBundleSplitAlgorithm.AVAILABLE_ALGORITHMS.containsAll(\n                    brokerConfig.getSupportedNamespaceBundleSplitAlgorithms())) {\n                throw new IllegalArgumentException(\n                        \"The given supported namespace bundle split algorithm has unavailable algorithm. \"\n                                + \"Available algorithms are \" + NamespaceBundleSplitAlgorithm.AVAILABLE_ALGORITHMS);\n            }\n\n            if (!brokerConfig.getSupportedNamespaceBundleSplitAlgorithms().contains(\n                    brokerConfig.getDefaultNamespaceBundleSplitAlgorithm())) {\n                throw new IllegalArgumentException(\"Supported namespace bundle split algorithms \"\n                        + \"must contains the default namespace bundle split algorithm\");\n            }\n\n            // init functions worker\n            if (starterArguments.runFunctionsWorker || brokerConfig.isFunctionsWorkerEnabled()) {\n                final String filepath = Path.of(starterArguments.fnWorkerConfigFile)\n                        .toAbsolutePath().normalize().toString();\n                workerConfig = PulsarService.initializeWorkerConfigFromBrokerConfig(brokerConfig, filepath);\n                functionsWorkerService = WorkerServiceLoader.load(workerConfig);\n            } else {\n                workerConfig = null;","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/PulsarBrokerStarter.java#L166-L202","documentation":"The broker validates brokerConfig.getSupportedNamespaceBundleSplitAlgorithms() against the static set NamespaceBundleSplitAlgorithm.AVAILABLE_ALGORITHMS. If any configured algorithm is unknown, startup fails with this IllegalArgumentException listing the available algorithms.","triggerScenarios":"supportedNamespaceBundleSplitAlgorithms in broker.conf contains a name not in AVAILABLE_ALGORITHMS (built-ins: topic_count_evenness_split, specified_positions_split).","commonSituations":"Typo in the algorithm name; copying config from a fork/patched build with a custom algorithm; upgrading to a version where an algorithm was renamed/removed.","solutions":["Set supportedNamespaceBundleSplitAlgorithms only to names listed in the error message (e.g. topic_count_evenness_split,specified_positions_split)","Remove unknown/custom algorithm names from broker.conf","Verify against NamespaceBundleSplitAlgorithm.AVAILABLE_ALGORITHMS for your broker version"],"exampleFix":"// before (broker.conf)\nsupportedNamespaceBundleSplitAlgorithms=even_split,range_split\n// after\nsupportedNamespaceBundleSplitAlgorithms=topic_count_evenness_split,specified_positions_split","handlingStrategy":"validation","validationCode":"Set<String> allowed = NamespaceBundleSplitAlgorithm.AVAILABLE_ALGORITHMS;\nList<String> configured = List.of(brokerConf.getSupportedNamespaceBundleSplitAlgorithms().split(\",\"));\nif (!allowed.containsAll(configured)) {\n    throw new IllegalStateException(\"Unknown algorithms: \" + configured.stream()\n        .filter(a -> !allowed.contains(a)).toList());\n}","typeGuard":null,"tryCatchPattern":"try {\n    int rc = starter.call();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"bundle split algorithm\")) {\n        throw new IllegalStateException(\"Use only: \" + NamespaceBundleSplitAlgorithm.AVAILABLE_ALGORITHMS, e);\n    }\n    throw e;\n}","preventionTips":["Copy algorithm names exactly from the error message/docs (topic_count_evenness_split, specified_positions_split)","Don't carry custom algorithm names from forks into stock broker.conf"],"tags":["configuration","startup","validation"],"backgroundTag":"invalid-config-enum-value","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}