【发布时间】:2019-07-24 13:18:30
【问题描述】:
我正在尝试使用以下配置在 dattabricks 中安装 adls 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": "service principal id",
"fs.azure.account.oauth2.client.secret": "service principal key",
"fs.azure.account.oauth2.client.endpoint": "https://login.microsoftonline.com/tenant-id/oauth2/token",
"fs.azure.createRemoteFileSystemDuringInitialization": "true"}
dbutils.fs.mount(
source = "abfss://file-system@storage-account.dfs.core.windows.net/directory",
mount_point = "/mnt/data",
extra_configs = configs)
我已经创建了服务主体并为其创建了密钥,然后在 Active Directory 角色分配中向该服务主体提供了存储 blob 角色
根据文件
"abfss://<your-file-system-name>@<your-storage-account-name>.dfs.core.windows.net/<your-directory-name>"
blob 容器内的 your-file-system ==> 文件夹应该是什么? you-directory-name ==> 我在 blob 容器中只有一个文件夹,所以在这里混淆 storgae(ADLS gen 2 预览版) Blob 容器 文件夹 一个.txt
错误
ExecutionError:调用 o480.mount 时出错。 负责人https://xxxxxxxxx.dfs.core.windows.net/xxxxxx?resource=filesystem&timeout=90 状态码=403 StatusDescription=此请求无权使用此权限执行此操作。 错误代码= 错误消息= 在 shaded.databricks.v20180920_b33d810.org.apache.hadoop.fs.azurebfs.services.AbfsRestOperation.execute(AbfsRestOperation.java:134) 在 shaded.databricks.v20180920_b33d810.org.apache.hadoop.fs.azurebfs.services.AbfsClient.getFilesystemProperties(AbfsClient.java:197) 在 shaded.databricks.v20180920_b33d810.org.apache.hadoop.fs.azurebfs.AzureBlobFileSystemStore.getFilesystemProperties(AzureBlobFileSystemStore.java:214) 在 shaded.databricks.v20180920_b33d810.org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem.fileSystemExists(AzureBlobFileSystem.java:749) 在 shaded.databricks.v20180920_b33d810.org.apache.hadoop.fs.azurebfs.AzureBlobFileSystem.initialize(AzureBlobFileSystem.java:110) 在 com.databricks.backend.daemon.dbutils.DBUtilsCore.verifyAzureFileSystem(DBUtilsCore.scala:485) 在 com.databricks.backend.daemon.dbutils.DBUtilsCore.mount(DBUtilsCore.scala:435) 在 sun.reflect.GeneratedMethodAccessor400.invoke(未知来源) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.lang.reflect.Method.invoke(Method.java:498) 在 py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244) 在 py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:380) 在 py4j.Gateway.invoke(Gateway.java:295) 在 py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132) 在 py4j.commands.CallCommand.execute(CallCommand.java:79) 在 py4j.GatewayConnection.run(GatewayConnection.java:251) 在 java.lang.Thread.run(Thread.java:748)
【问题讨论】:
标签: databricks azure-databricks