prestodb/presto · error · PrestoException

DRUID_METADATA_ERROR

DRUID_METADATA_ERROR

Error message

Unsupported segment filesystem: %s

What it means

DruidSegmentInfo.getDeepStoragePath() builds a URI for a segment based on the deep storage 'type' in the segment's loadSpec (S3, HDFS, GS, LOCAL). When the loadSpec type is not one of the recognized filesystems, it throws DRUID_METADATA_ERROR with 'Unsupported segment filesystem', because the connector cannot construct a path to fetch the segment.

Source

Thrown at presto-druid/src/main/java/com/facebook/presto/druid/metadata/DruidSegmentInfo.java:160

            switch (DeepStorageType.fromType(type)) {
                case S3:
                    final String s3schema = S3A_SCHEMA.equals(loadSpec.get(DEEP_STORAGE_S3_SCHEMA_KEY)) ? S3A_SCHEMA : S3N_SCHEMA;
                    segmentLocURI = URI.create(format("%s://%s/%s", s3schema, loadSpec.get(DEEP_STORAGE_BUCKET_KEY), loadSpec.get("key")));
                    break;
                case HDFS:
                    segmentLocURI = URI.create(loadSpec.get(DEEP_STORAGE_PATH_KEY));
                    break;
                case GCS:
                    segmentLocURI = URI.create(
                            format("gs://%s/%s",
                                loadSpec.get(DEEP_STORAGE_BUCKET_KEY),
                                URLEncoder.encode(loadSpec.get(DEEP_STORAGE_PATH_KEY), "UTF-8")));
                    break;
                case LOCAL:
                    segmentLocURI = new URI("file", null, loadSpec.get(DEEP_STORAGE_PATH_KEY), null, null);
                    break;
                default:
                    throw new PrestoException(DRUID_METADATA_ERROR, format("Unsupported segment filesystem: %s", type));
            }
        }
        catch (URISyntaxException | UnsupportedEncodingException e) {
            throw new PrestoException(DRUID_METADATA_ERROR, e);
        }
        return segmentLocURI;
    }

    @Override
    public int hashCode()
    {
        return Objects.hash(dataSource, version, loadSpecification, shardSpecification, binaryVersion, size);
    }

    @Override
    public boolean equals(Object obj)
    {
        if (this == obj) {

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Check druid.storage.type / the segment loadSpec 'type' value in Druid metadata; switch the Druid cluster to a supported type (s3, hdfs, gs, or local).
  2. Upgrade Presto to a connector version that supports the segment's storage type if it was added in newer releases.
  3. If the type is correct but unrecognized due to casing/typos, fix the loadSpec in the Druid metadata DB.
  4. Copy/serve the segments from a supported filesystem so the connector can construct a valid deep-storage path.

Example fix

// before (Druid runtime.properties)
druid.storage.type=azure

// after (use a storage backend the connector understands)
druid.storage.type=s3
druid.storage.bucket=my-bucket
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Reading a Druid segment whose metadata loadSpec deep-storage type falls into the default branch of the switch — e.g. type values like azure, s3_hadoop, or a differently-cased/unknown string — from getDeepStoragePath, which is called by segmentPath/createPageSource and the various testDeepStoragePathOn* helpers.

Common situations: Druid cluster configured with a deep storage backend (e.g. Azure Blob, S3 via Hadoop) that the Presto Druid connector doesn't support; connector too old to know the storage type; loadSpec JSON typed with unexpected casing or a typo in druid.storage.type.

Related errors


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