【发布时间】:2021-01-10 06:12:57
【问题描述】:
如何从 azure databricks spark 作业写入 azure 文件共享。
我配置了 Hadoop 存储键和值。
spark.sparkContext.hadoopConfiguration.set(
"fs.azure.account.key.STORAGEKEY.file.core.windows.net",
"SECRETVALUE"
)
val wasbFileShare =
s"wasbs://testfileshare@STORAGEKEY.file.core.windows.net/testPath"
df.coalesce(1).write.mode("overwrite").csv(wasbBlob)
当尝试将数据帧保存到 azure 文件共享时,尽管存在 URI,但我看到以下资源未找到错误。
Exception in thread "main" org.apache.hadoop.fs.azure.AzureException: com.microsoft.azure.storage.StorageException: The requested URI does not represent any resource on the server.
【问题讨论】:
-
在 Azure 存储中,
wasbs:只支持 azure blob:datacadamia.com/azure/wasb。如果要使用Azure文件共享,看来需要使用sdk。
标签: azure apache-spark azure-databricks azure-files