DataBricks 无法显示来自 Data Lake gen 2 的数据

DataBricks cannot show data from Data Lake gen 2

我们正在从 blob 存储迁移到 ADLS Gen 2,我们想测试从 DataBricks 到 Data Lake 的访问。我创建了一个服务主体,它具有 Blob Storage Reader 和 Blob Storage Contributor 对 Data Lake 的访问权限。

我的笔记本设置了以下 spark 配置:

 spark.conf.set("fs.azure.account.auth.type","OAuth")
 spark.conf.set("fs.azure.account.oauth.provider.type","org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider")
 spark.conf.set("fs.azure.account.oauth2.client.id","<clientId")
 spark.conf.set("fs.azure.account.oauth2.client.secret","<secret>")
 spark.conf.set("fs.azure.account.oauth2.client.endpoint","https://login.microsoftonline.com/<endpoint>/oauth2/token")
//I replaced the values in my notebook with correct values from my service principal

当我运行下面的代码时,目录的内容正确显示:

dbutils.fs.ls("abfss://ado-raw@<storage account name>.dfs.core.windows.net")

我可以从我的数据湖中读取一个只有 3 个字节的小文本文件 但是当我试图显示它的内容时,单元格卡在 运行ning 命令处,没有任何反应。

您认为问题出在哪里?我该如何解决?

提前致谢

问题是私有和 public 子网被错误删除,然后使用不同的 IP 范围重新创建。它们需要与管理子网处于同一范围内,否则为存储帐户设置的专用端点将无法工作。