{"record":{"id":"f1f95575a5c97cd2","repo":"prestodb/presto","slug":"unsupported-storage-type","errorCode":"UNSUPPORTED_STORAGE_TYPE","errorMessage":"Configured TempStorage does not support remote access required for distributing broadcast tables.","messagePattern":"Configured TempStorage does not support remote access required for distributing broadcast tables\\.","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-spark-base/src/main/java/com/facebook/presto/spark/execution/AbstractPrestoSparkQueryExecution.java","lineNumber":591,"sourceCode":"                session,\n                subPlan.getFragment(),\n                rddInputs.build(),\n                broadcastInputs.build(),\n                taskExecutorFactoryProvider,\n                taskInfoCollector,\n                shuffleStatsCollector,\n                tableWriteInfo,\n                outputType,\n                nativeTempStorage);\n        return new RddAndMore<>(rdd, broadcastDependencies.build());\n    }\n\n    protected void validateStorageCapabilities(TempStorage tempStorage)\n    {\n        boolean isLocalMode = isLocalMaster(sparkContext.getConf());\n        List<StorageCapabilities> storageCapabilities = tempStorage.getStorageCapabilities();\n        if (!isLocalMode && !storageCapabilities.contains(REMOTELY_ACCESSIBLE)) {\n            throw new PrestoException(UNSUPPORTED_STORAGE_TYPE, \"Configured TempStorage does not support remote access required for distributing broadcast tables.\");\n        }\n    }\n\n    /**\n     * Updates the taskInfoMap to ensure it stores the most relevant {@link TaskInfo} for each\n     * logical task, identified by task ID (excluding attempt number).\n     * <p>\n     * This method ensures that, for each logical task, the map retains the latest successful\n     * attempt if available, or otherwise the most recent attempt based on attempt number. Warnings\n     * are logged in cases of unexpected duplicate or multiple successful attempts.\n     *\n     * @param taskInfoMap the map from logical task ID (taskId excluding attempt number) to\n     * {@link TaskInfo}\n     * @param taskInfo the {@link TaskInfo} to consider for updating the map\n     */\n    private void updateTaskInfoMap(HashMap<String, TaskInfo> taskInfoMap, TaskInfo taskInfo)\n    {\n        TaskId newTaskId = taskInfo.getTaskId();","sourceCodeStart":573,"sourceCodeEnd":609,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spark-base/src/main/java/com/facebook/presto/spark/execution/AbstractPrestoSparkQueryExecution.java#L573-L609","documentation":"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.","triggerScenarios":"createBroadcastDependency() -> validateStorageCapabilities() runs when NOT in local mode (isLocalMaster == false) and tempStorage.getStorageCapabilities() does not contain REMOTELY_ACCESSIBLE.","commonSituations":"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.","solutions":["Configure a remotely accessible TempStorage (e.g. a distributed/local-remote capable implementation) via temp-storage properties","If intentionally testing on one machine, use Spark local mode so the check is bypassed","Verify the configured temp storage implements/advertises StorageCapabilities.REMOTELY_ACCESSIBLE","Check the temp storage config is identical on driver and executors"],"exampleFix":"// before: spark-extra-temp-storage-apath=local-fs path (cluster mode)\n// after: use a remotely accessible storage backend\n// properties:\n// temp-storage.empty-min-remote-writable=... / configure RemoteLocalTempStorage or HDFS/S3-backed TempStorage\n// e.g. spark.presto.tempstorage.remotely-accessible=true (per your TempStorage impl)","handlingStrategy":"validation","validationCode":"List<StorageCapabilities> caps = tempStorage.getStorageCapabilities();\nboolean localMode = isLocalMaster(sparkContext.getConf());\nif (!localMode && !caps.contains(StorageCapabilities.REMOTELY_ACCESSIBLE)) {\n    throw new IllegalStateException(\"TempStorage must be REMOTELY_ACCESSIBLE in cluster mode\");\n}","typeGuard":"boolean isClusterSafeStorage(TempStorage storage) {\n    return storage.getStorageCapabilities().contains(StorageCapabilities.REMOTELY_ACCESSIBLE);\n}","tryCatchPattern":"try {\n    execution.execute();\n}\ncatch (PrestoException e) {\n    if (UNSUPPORTED_STORAGE_TYPE.toErrorCode().getCode().equals(e.getErrorCode().getCode())) {\n        // reconfigure temp storage and resubmit\n    }\n    throw e;\n}","preventionTips":["Validate temp storage capabilities at cluster startup, not query time","Use a REMOTELY_ACCESSIBLE TempStorage implementation for all non-local deployments","Keep Spark local mode strictly for local testing","Document the temp storage requirement for broadcast joins in your cluster config"],"tags":["spark","temp-storage","broadcast-join","configuration"],"backgroundTag":"storage-not-remotely-accessible","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}