无法从 Azure DataBricks [wasbs vs abfss] 在 Storage Gen2 上创建装载
Not able to create mount on Storage Gen2 from Azure DataBricks [wasbs vs abfss]
我正在尝试使用 Azure 文档中给出的语法在容器上的 Azure Storage Gen2 中创建一个装载点。我找到了两种使用 'abfss' 用于 Gen2 和 'wasbs' 用于常规 blob 存储的方法。因为我正在使用 'Storage Gen2' ,所以使用 'abfss' 但那不起作用。虽然如果我使用 'wasb' 它能够安装。不知道为什么。我很困惑
语法 1
url = "wasbs://"+container+"@"+storage_name+".blob.core.windows.net"
config = "fs.azure.account.key."+storage_name+".blob.core.windows.net"
语法 2
url="abfss://"+container+"@"+storage_name+".dfs.core.windows.net"
as_config = "fs.azure.account.key."+storage_name+".dfs.core.windows.net
当我使用 Syntax-2 时,出现错误:
ExecutionError: An error occurred while calling o246.mount. :
java.lang.NullPointerException: authEndpoint at
shaded.databricks.v20180920_b33d810.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
您无法使用存储密钥装载 abfss
- 它仅适用于 wasbs
(已被您确认)。 abfss
的挂载只能使用服务主体,如 documentation:
中所述
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": "<application-id>",
"fs.azure.account.oauth2.client.secret": dbutils.secrets.get(scope="<scope-name>",key="<service-credential-key-name>"),
"fs.azure.account.oauth2.client.endpoint": "https://login.microsoftonline.com/<directory-id>/oauth2/token"}
# Optionally, you can add <directory-name> to the source URI of your mount point.
dbutils.fs.mount(
source = "abfss://<container-name>@<storage-account-name>.dfs.core.windows.net/",
mount_point = "/mnt/<mount-name>",
extra_configs = configs)
我正在尝试使用 Azure 文档中给出的语法在容器上的 Azure Storage Gen2 中创建一个装载点。我找到了两种使用 'abfss' 用于 Gen2 和 'wasbs' 用于常规 blob 存储的方法。因为我正在使用 'Storage Gen2' ,所以使用 'abfss' 但那不起作用。虽然如果我使用 'wasb' 它能够安装。不知道为什么。我很困惑
语法 1
url = "wasbs://"+container+"@"+storage_name+".blob.core.windows.net"
config = "fs.azure.account.key."+storage_name+".blob.core.windows.net"
语法 2
url="abfss://"+container+"@"+storage_name+".dfs.core.windows.net"
as_config = "fs.azure.account.key."+storage_name+".dfs.core.windows.net
当我使用 Syntax-2 时,出现错误:
ExecutionError: An error occurred while calling o246.mount. : java.lang.NullPointerException: authEndpoint at shaded.databricks.v20180920_b33d810.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
您无法使用存储密钥装载 abfss
- 它仅适用于 wasbs
(已被您确认)。 abfss
的挂载只能使用服务主体,如 documentation:
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": "<application-id>",
"fs.azure.account.oauth2.client.secret": dbutils.secrets.get(scope="<scope-name>",key="<service-credential-key-name>"),
"fs.azure.account.oauth2.client.endpoint": "https://login.microsoftonline.com/<directory-id>/oauth2/token"}
# Optionally, you can add <directory-name> to the source URI of your mount point.
dbutils.fs.mount(
source = "abfss://<container-name>@<storage-account-name>.dfs.core.windows.net/",
mount_point = "/mnt/<mount-name>",
extra_configs = configs)