Shadowd.databricks.org.apache.hadoop.fs.azure.AzureException:安装后尝试列出目录时出现异常

发布于 2025-01-10 19:27:59 字数 1523 浏览 0 评论 0原文

我遇到以下异常,

shaded.databricks.org.apache.hadoop.fs.azure.AzureException:java.util.NoSuchElementException:枚举结果时发生错误,请检查原始异常以获取详细信息

我将目录安装在 dbfs 中,如下所示,

dbutils.fs.mount(
  source = f"wasbs://{containerName}@{storageAccount}.blob.core.windows.net/",
  mount_point = "/mnt/a",
  extra_configs = {f"fs.azure.sas.{containerName}.{storageAccount}.blob.core.windows.net": sasKey}
)

然后我这样做了,

dbutils.fs.ls("/mnt/a")

我看到了以下原因,

原因为:java.util.NoSuchElementException:枚举结果时发生错误,请检查原始异常是否 细节。 在 hadoop_azure_shaded.com.microsoft.azure.storage.core.LazySegmentedIterator.hasNext(LazySegmentedIterator.java:113) 在 shaded.databricks.org.apache.hadoop.fs.azure.StorageInterfaceImpl$WrappingIterator.hasNext(StorageInterfaceImpl.java:158) 在shaded.databricks.org.apache.hadoop.fs.azure.AzureNativeFileSystemStore.listInternal(AzureNativeFileSystemStore.java:2444) ... 41 更多 原因:hadoop_azure_shaded.com.microsoft.azure.storage.StorageException:此请求无权使用此权限执行此操作。 在 hadoop_azure_shaded.com.microsoft.azure.storage.StorageException.translateException(StorageException.java:87) 在 hadoop_azure_shaded.com.microsoft.azure.storage.core.StorageRequest.materializeException(StorageRequest.java:305) 在 hadoop_azure_shaded.com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:196) 在 hadoop_azure_shaded.com.microsoft.azure.storage.core.LazySegmentedIterator.hasNext(LazySegmentedIterator.java:109)

有人可以帮助我吗?

I am getting below exception,

shaded.databricks.org.apache.hadoop.fs.azure.AzureException: java.util.NoSuchElementException: An error occurred while enumerating the result, check the original exception for details

First I mounted the directory in dbfs like below,

dbutils.fs.mount(
  source = f"wasbs://{containerName}@{storageAccount}.blob.core.windows.net/",
  mount_point = "/mnt/a",
  extra_configs = {f"fs.azure.sas.{containerName}.{storageAccount}.blob.core.windows.net": sasKey}
)

then I did,

dbutils.fs.ls("/mnt/a")

I see below reason,

Caused by: java.util.NoSuchElementException: An error occurred while enumerating the result, check the original exception for details.
at hadoop_azure_shaded.com.microsoft.azure.storage.core.LazySegmentedIterator.hasNext(LazySegmentedIterator.java:113)
at shaded.databricks.org.apache.hadoop.fs.azure.StorageInterfaceImpl$WrappingIterator.hasNext(StorageInterfaceImpl.java:158)
at shaded.databricks.org.apache.hadoop.fs.azure.AzureNativeFileSystemStore.listInternal(AzureNativeFileSystemStore.java:2444)
... 41 more
Caused by: hadoop_azure_shaded.com.microsoft.azure.storage.StorageException: This request is not authorized to perform this operation using this permission.
at hadoop_azure_shaded.com.microsoft.azure.storage.StorageException.translateException(StorageException.java:87)
at hadoop_azure_shaded.com.microsoft.azure.storage.core.StorageRequest.materializeException(StorageRequest.java:305)
at hadoop_azure_shaded.com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:196)
at hadoop_azure_shaded.com.microsoft.azure.storage.core.LazySegmentedIterator.hasNext(LazySegmentedIterator.java:109)

Could someone please help me on this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

红ご颜醉 2025-01-17 19:27:59

发生这种情况的原因是错误的 SAS 密钥配置,该配置不具有容器的所有权限。在提供具有所有权限的正确 SAS 密钥后,该问题已得到解决。

This has happened due to wrong SAS key configuration which did not have all permissions for the container. The issue has been resolved after giving right SAS key with all permissions.

梦年海沫深 2025-01-17 19:27:59

真正的错误是:“此请求无权使用此权限执行此操作” - 最可能的原因是您没有“Blob Contributor”权限,该权限与您在执行操作时设置的“Contributor”权限不同创建一个存储帐户。

The real error this: "This request is not authorized to perform this operation using this permission" - the most probably cause is that you don't have "Blob Contributor" permission that is different from the "Contributor" permission that is set when you create a storage account.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文