prestodb/presto · error · PrestoException

NOT_SUPPORTED

NOT_SUPPORTED

Error message

Unsupported router scheduler type 

What it means

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.

Source

Thrown at presto-router/src/main/java/com/facebook/presto/router/scheduler/SchedulerFactory.java:50

    public Scheduler create()
    {
        switch (schedulerType) {
            case RANDOM_CHOICE:
                return new RandomChoiceScheduler();
            case WEIGHTED_RANDOM_CHOICE:
                return new WeightedRandomChoiceScheduler();
            case USER_HASH:
                return new UserHashScheduler();
            case ROUND_ROBIN:
                return new RoundRobinScheduler();
            case WEIGHTED_ROUND_ROBIN:
                return new WeightedRoundRobinScheduler();
            case CUSTOM_PLUGIN_SCHEDULER:
                schedulerManager.loadScheduler();
                return schedulerManager.getScheduler();
        }
        throw new PrestoException(NOT_SUPPORTED, "Unsupported router scheduler type " + schedulerType);
    }
}

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Set 'router.scheduler' to one of the supported values: ROUND_ROBIN, WEIGHTED_ROUND_ROBIN, USER_HASH, or CUSTOM_PLUGIN_SCHEDULER
  2. If a custom scheduler is intended, configure CUSTOM_PLUGIN_SCHEDULER plus the scheduler-name/config-path properties and ensure the plugin is installed
  3. Check your Presto version's SchedulerType enum for the exact accepted values

Example fix

// before (router-config.properties)
router.scheduler=weighted
// after
router.scheduler=WEIGHTED_ROUND_ROBIN
Defensive patterns

Strategy: validation

Validate before calling

Set<String> valid = Set.of("ROUND_ROBIN", "WEIGHTED_ROUND_ROBIN", "USER_HASH", "CUSTOM_PLUGIN_SCHEDULER");
String type = props.getProperty("router.scheduler", "ROUND_ROBIN").trim().toUpperCase(Locale.ROOT);
if (!valid.contains(type)) throw new IllegalArgumentException("router.scheduler must be one of " + valid);

Try / catch

try {
    Scheduler s = schedulerFactory.create(schedulerType);
} catch (PrestoException e) {
    if (e.getErrorCode().getCode() == NOT_SUPPORTED.toErrorCode().getCode()) {
        LOG.error("Bad router.scheduler value '%s'", schedulerType);
    }
    throw e;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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*.

Understand the failure class

Background: Presto NOT_SUPPORTED error: what "not supported" means and how to fix it — this error's family across 3 libraries.

Related errors


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/37c77ed905d88bf7. Report an issue: GitHub.