prestodb/presto · error · PrestoException

UNSUPPORTED_STORAGE_TYPE

UNSUPPORTED_STORAGE_TYPE

Error message

Configured TempStorage does not support remote access required for distributing broadcast tables.

What it means

Thrown by validateStorageCapabilities() before broadcasting a table when the configured TempStorage lacks the REMOTELY_ACCESSIBLE capability. Broadcast tables are written to temp storage on the driver/producer side and read by Spark executors remotely; a storage that only supports local access cannot distribute the data across the cluster.

Source

Thrown at presto-spark-base/src/main/java/com/facebook/presto/spark/execution/AbstractPrestoSparkQueryExecution.java:591

                session,
                subPlan.getFragment(),
                rddInputs.build(),
                broadcastInputs.build(),
                taskExecutorFactoryProvider,
                taskInfoCollector,
                shuffleStatsCollector,
                tableWriteInfo,
                outputType,
                nativeTempStorage);
        return new RddAndMore<>(rdd, broadcastDependencies.build());
    }

    protected void validateStorageCapabilities(TempStorage tempStorage)
    {
        boolean isLocalMode = isLocalMaster(sparkContext.getConf());
        List<StorageCapabilities> storageCapabilities = tempStorage.getStorageCapabilities();
        if (!isLocalMode && !storageCapabilities.contains(REMOTELY_ACCESSIBLE)) {
            throw new PrestoException(UNSUPPORTED_STORAGE_TYPE, "Configured TempStorage does not support remote access required for distributing broadcast tables.");
        }
    }

    /**
     * Updates the taskInfoMap to ensure it stores the most relevant {@link TaskInfo} for each
     * logical task, identified by task ID (excluding attempt number).
     * <p>
     * This method ensures that, for each logical task, the map retains the latest successful
     * attempt if available, or otherwise the most recent attempt based on attempt number. Warnings
     * are logged in cases of unexpected duplicate or multiple successful attempts.
     *
     * @param taskInfoMap the map from logical task ID (taskId excluding attempt number) to
     * {@link TaskInfo}
     * @param taskInfo the {@link TaskInfo} to consider for updating the map
     */
    private void updateTaskInfoMap(HashMap<String, TaskInfo> taskInfoMap, TaskInfo taskInfo)
    {
        TaskId newTaskId = taskInfo.getTaskId();

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Configure a remotely accessible TempStorage (e.g. a distributed/local-remote capable implementation) via temp-storage properties
  2. If intentionally testing on one machine, use Spark local mode so the check is bypassed
  3. Verify the configured temp storage implements/advertises StorageCapabilities.REMOTELY_ACCESSIBLE
  4. Check the temp storage config is identical on driver and executors

Example fix

// before: spark-extra-temp-storage-apath=local-fs path (cluster mode)
// after: use a remotely accessible storage backend
// properties:
// temp-storage.empty-min-remote-writable=... / configure RemoteLocalTempStorage or HDFS/S3-backed TempStorage
// e.g. spark.presto.tempstorage.remotely-accessible=true (per your TempStorage impl)
Defensive patterns

Strategy: validation

Validate before calling

List<StorageCapabilities> caps = tempStorage.getStorageCapabilities();
boolean localMode = isLocalMaster(sparkContext.getConf());
if (!localMode && !caps.contains(StorageCapabilities.REMOTELY_ACCESSIBLE)) {
    throw new IllegalStateException("TempStorage must be REMOTELY_ACCESSIBLE in cluster mode");
}

Type guard

boolean isClusterSafeStorage(TempStorage storage) {
    return storage.getStorageCapabilities().contains(StorageCapabilities.REMOTELY_ACCESSIBLE);
}

Try / catch

try {
    execution.execute();
}
catch (PrestoException e) {
    if (UNSUPPORTED_STORAGE_TYPE.toErrorCode().getCode().equals(e.getErrorCode().getCode())) {
        // reconfigure temp storage and resubmit
    }
    throw e;
}

Prevention

When it happens

Trigger: createBroadcastDependency() -> validateStorageCapabilities() runs when NOT in local mode (isLocalMaster == false) and tempStorage.getStorageCapabilities() does not contain REMOTELY_ACCESSIBLE.

Common situations: Users configuring LocalTempStorage or a file-based TempStorage while running on a real Spark cluster (non-local mode); broadcast join enabled in a cluster deployment with a driver-local temp storage.

Related errors


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