我试图了解为什么我的 ACL 权限在 Databricks 中无法正常工作。
场景:我有 2 个用户。一个对文件系统具有完全权限的人。其他无任何权限。
我尝试使用两种不同的方法在 databricks 中安装 Gen2 文件系统。
-
configs = {"fs.azure.account.auth.type": "OAuth", "fs.azure.account.oauth.provider.type": "org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider", "fs.azure.account.oauth2.client.id": clientid, "fs.azure.account.oauth2.client.secret": credential, "fs.azure.account.oauth2.client.endpoint": refresh_url} dbutils.fs.mount( source = "abfss://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ed959497ad8c8f8ec3898b9ec38e829f88c39a848389829a9ec3838899" rel="noreferrer noopener nofollow">[email protected]</a>/", mount_point = "/mnt/xyz", extra_configs = configs)
并使用直通 2.
configs = {
"fs.azure.account.auth.type": "CustomAccessToken",
"fs.azure.account.custom.token.provider.class": spark.conf.get("spark.databricks.passthrough.adls.gen2.tokenProviderClassName")
}
dbutils.fs.mount(
source = "abfss://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="82fafbf8c2e3e0e1ace6e4f1ace1edf0e7acf5ebece6edf5f1acece7f6" rel="noreferrer noopener nofollow">[email protected]</a>/",
mount_point = "/mnt/xyz",
extra_configs = configs)
都挂载文件系统。但是当我使用时:
dbfs.fs.ls("/mnt/xyz")
它显示没有 Datalake 权限的用户的所有内容文件/文件夹。
如果有人能解释我出了什么问题,我会很高兴。
谢谢
最佳答案
这是启用 Azure Data Lake Storage 凭据直通时的预期行为。
注意:为群集启用 Azure Data Lake Storage 凭据直通后,在该群集上运行的命令可以读取和写入 Azure Data Lake Storage 中的数据,而无需用户配置服务主体凭据来访问存储。凭据是根据用户启动操作自动设置的。
引用: Enable Azure Data Lake Storage credential passthrough for your workspace和 Simplify Data Lake Access with Azure AD Credential Passthrough .
关于azure datalake gen2 databricks ACL 权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61437902/