我尝试将pyspark中的机器学习模型保存到azure blob。但这是错误的。
lr.save('wasbs:///user/remoteuser/models/')
Illegal Argument Exception: Cannot initialize WASB file system, URI authority not recognized.'
也尝试过,
m = lr.save('wasbs://'+container_name+'@'+storage_account_name+'.blob.core.windows.net/models/')
但无法识别堆栈跟踪中的用户身份。附: :我没有使用Azure HDInsight。我只是使用Databricks和Azure blob存储
要直接从Azure Databricks访问Azure Blob存储(未安装),您必须设置一个帐户访问密钥:
spark.conf.set(
"fs.azure.account.key.<your-storage-account-name>.blob.core.windows.net",
"<your-storage-account-access-key>")
或容器的SAS。然后你应该能够访问Blob存储:
val df = spark.read.parquet("wasbs://<your-container-name>@<your-storage-account-name>.blob.core.windows.net/<your-directory-name>")