{"record":{"id":"37c77ed905d88bf7","repo":"prestodb/presto","slug":"not-supported-37c77e","errorCode":"NOT_SUPPORTED","errorMessage":"Unsupported router scheduler type ","messagePattern":"Unsupported router scheduler type ","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-router/src/main/java/com/facebook/presto/router/scheduler/SchedulerFactory.java","lineNumber":50,"sourceCode":"\n    public Scheduler create()\n    {\n        switch (schedulerType) {\n            case RANDOM_CHOICE:\n                return new RandomChoiceScheduler();\n            case WEIGHTED_RANDOM_CHOICE:\n                return new WeightedRandomChoiceScheduler();\n            case USER_HASH:\n                return new UserHashScheduler();\n            case ROUND_ROBIN:\n                return new RoundRobinScheduler();\n            case WEIGHTED_ROUND_ROBIN:\n                return new WeightedRoundRobinScheduler();\n            case CUSTOM_PLUGIN_SCHEDULER:\n                schedulerManager.loadScheduler();\n                return schedulerManager.getScheduler();\n        }\n        throw new PrestoException(NOT_SUPPORTED, \"Unsupported router scheduler type \" + schedulerType);\n    }\n}\n","sourceCodeStart":32,"sourceCodeEnd":53,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-router/src/main/java/com/facebook/presto/router/scheduler/SchedulerFactory.java#L32-L53","documentation":"SchedulerFactory.create throws this PrestoException (NOT_SUPPORTED) when the configured router scheduler type does not match any known scheduler (ROUND_ROBIN, WEIGHTED_ROUND_ROBIN, USER_HASH, CUSTOM_PLUGIN_SCHEDULER). The switch over schedulerType fell through, meaning the enum value came from an unrecognized/invalid 'router.scheduler' property value.","triggerScenarios":"Setting 'router.scheduler' in the router config to a name that is not one of the supported scheduler types (e.g. 'random', 'roundrobin', or a custom name not matching the enum), then starting the router.","commonSituations":"Typos in the scheduler type property; using a scheduler type from a newer Presto version on an older build; confusing the scheduler *type* with the custom scheduler *name*.","solutions":["Set 'router.scheduler' to one of the supported values: ROUND_ROBIN, WEIGHTED_ROUND_ROBIN, USER_HASH, or CUSTOM_PLUGIN_SCHEDULER","If a custom scheduler is intended, configure CUSTOM_PLUGIN_SCHEDULER plus the scheduler-name/config-path properties and ensure the plugin is installed","Check your Presto version's SchedulerType enum for the exact accepted values"],"exampleFix":"// before (router-config.properties)\nrouter.scheduler=weighted\n// after\nrouter.scheduler=WEIGHTED_ROUND_ROBIN","handlingStrategy":"validation","validationCode":"Set<String> valid = Set.of(\"ROUND_ROBIN\", \"WEIGHTED_ROUND_ROBIN\", \"USER_HASH\", \"CUSTOM_PLUGIN_SCHEDULER\");\nString type = props.getProperty(\"router.scheduler\", \"ROUND_ROBIN\").trim().toUpperCase(Locale.ROOT);\nif (!valid.contains(type)) throw new IllegalArgumentException(\"router.scheduler must be one of \" + valid);","typeGuard":null,"tryCatchPattern":"try {\n    Scheduler s = schedulerFactory.create(schedulerType);\n} catch (PrestoException e) {\n    if (e.getErrorCode().getCode() == NOT_SUPPORTED.toErrorCode().getCode()) {\n        LOG.error(\"Bad router.scheduler value '%s'\", schedulerType);\n    }\n    throw e;\n}","preventionTips":["Always use the exact uppercase enum values for router.scheduler","Validate router config at deploy time with a dry-run parse","Match scheduler type values to your running Presto version's SchedulerType enum","For custom schedulers, use CUSTOM_PLUGIN_SCHEDULER plus scheduler-name/config-path"],"tags":["router","scheduler","config","not-supported"],"backgroundTag":"unsupported-enum-value","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}