prestodb/presto · critical · RuntimeException

Unknown file system type:

Error message

Unknown file system type: 

What it means

HiveS3Module.setup throws RuntimeException 'Unknown file system type: <type>' when hive.s3-file-system-type resolves to a value not handled by the binding switch (PRESTO, EMRFS, HADOOP_DEFAULT). This is a configuration/bootstrap error: the connector cannot wire its S3ConfigurationUpdater and startup aborts.

Source

Thrown at presto-hive/src/main/java/com/facebook/presto/hive/s3/HiveS3Module.java:71

        if (type == S3FileSystemType.PRESTO) {
            bindSecurityMapping(binder);

            binder.bind(S3ConfigurationUpdater.class).to(PrestoS3ConfigurationUpdater.class).in(Scopes.SINGLETON);
            configBinder(binder).bindConfig(HiveS3Config.class);

            binder.bind(PrestoS3FileSystemStats.class).toInstance(PrestoS3FileSystem.getFileSystemStats());
            newExporter(binder).export(PrestoS3FileSystemStats.class).as(generatedNameOf(PrestoS3FileSystem.class, connectorId));
        }
        else if (type == S3FileSystemType.EMRFS) {
            validateEmrFsClass();
            binder.bind(S3ConfigurationUpdater.class).to(EmrFsS3ConfigurationUpdater.class).in(Scopes.SINGLETON);
        }
        else if (type == S3FileSystemType.HADOOP_DEFAULT) {
            // configuration is done using Hadoop configuration files
            binder.bind(S3ConfigurationUpdater.class).to(HadoopDefaultConfigurationUpdater.class).in(Scopes.SINGLETON);
        }
        else {
            throw new RuntimeException("Unknown file system type: " + type);
        }
    }

    @Provides
    @Singleton
    @ForAWSS3DynamicConfigurationProvider
    public AWSSecurityMappingsSupplier provideAWSSecurityMappingsSupplier(AWSSecurityMappingConfig config)
    {
        return new AWSSecurityMappingsSupplier(config.getConfigFile(), config.getRefreshPeriod());
    }

    private void bindSecurityMapping(Binder binder)
    {
        if (buildConfigObject(AWSSecurityMappingConfig.class).getConfigFile().isPresent() &&
                buildConfigObject(AWSSecurityMappingConfig.class).getMappingType().equals(S3)) {
            newSetBinder(binder, DynamicConfigurationProvider.class).addBinding()
                    .to(AWSS3SecurityMappingConfigurationProvider.class).in(Scopes.SINGLETON);
        }

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Set hive.s3-file-system-type to one of: PRESTO, EMRFS, or HADOOP_DEFAULT in the catalog's hive.properties.
  2. Fix typos/case and restart the coordinator and workers so the catalog reloads.
  3. If you need EMRFS, ensure the value is EMRFS (and the EMR FS jar is present, see the companion class-not-found error).
  4. Remove S3-specific properties not applicable to the chosen type (e.g., Presto S3 keys when using HADOOP_DEFAULT).

Example fix

// before: etc/catalog/hive.properties
hive.s3-file-system-type=prestos3
// after
hive.s3-file-system-type=PRESTO
Defensive patterns

Strategy: validation

Validate before calling

// validate the property against allowed enum values at deploy time
String v = properties.getProperty("hive.s3-file-system-type", "PRESTO");
Set<String> allowed = Set.of("PRESTO", "EMRFS", "HADOOP_DEFAULT");
if (!allowed.contains(v.toUpperCase())) {
    throw new IllegalArgumentException("hive.s3-file-system-type must be one of " + allowed + ", got: " + v);
}

Try / catch

try {
    return pluginManager.loadCatalog("hive", props);
} catch (RuntimeException e) {
    if (e.getMessage() != null && e.getMessage().startsWith("Unknown file system type:")) {
        throw new ConfigException("Fix hive.s3-file-system-type (PRESTO|EMRFS|HADOOP_DEFAULT): " + e.getMessage());
    }
    throw e;
}

Prevention

When it happens

Trigger: Setting hive.s3-file-system-type in the Hive connector properties to an invalid string (typo like 'presto-s3', wrong case) or an enum value not covered by the module's if/else chain — the config object deserializes to something the setup method doesn't recognize.

Common situations: Misconfigured hive.properties during catalog setup; copy-pasting config from a different Presto version where the accepted values differ; fat-fingering the enum value; switching between PRESTO/EMRFS/HADOOP_DEFAULT deployments with stale properties files.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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