gpt4 book ai didi

azure - 使用 Azure Data Lake gen2 列出 blob 时出现问题

转载 作者:行者123 更新时间:2023-12-03 01:40:43 26 4
gpt4 key购买 nike

我使用 Azure 存储(Blob)来存储文件。

现在我计划迁移到 Data Lake Gen2。不幸的是,在我将连接字符串切换到 gen2 存储后,它在 ListBlob() 方法上向我显示 400 Error with Bad Request。

代码示例:

var storageAccount = CloudStorageAccount.Parse(connectionString);
var myClient = storageAccount.CreateCloudBlobClient();
var container = myClient.GetContainerReference(containerName);
var dirRef= container.GetDirectoryReference(directory);
var blobs = dirRef.ListBlobs();

因此,当我尝试迭代 blob 时,它会生成异常。有人对此有经验吗?

最佳答案

这是一个已知问题,请参阅 Known issues with Azure Data Lake Storage Gen2 .

Blob Storage APIs and Azure Data Lake Gen2 APIs aren't interoperable with each other.

Blob storage APIs aren't yet available to Azure Data Lake Storage Gen2 accounts.

These APIs are disabled to prevent inadvertent data access issues that could arise because Blob Storage APIs aren't yet interoperable with Azure Data Lake Gen2 APIs.

关于azure - 使用 Azure Data Lake gen2 列出 blob 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53888908/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com