[英]Problem to list blobs with Azure Data Lake gen2
I've used Azure Storage(Blobs) to store files. 我已经使用Azure存储(Blob)存储文件。
Now I'm planning to migrate to Data Lake Gen2. 现在,我计划迁移到Data Lake Gen2。 Unfortunately, after I've switched connection string to gen2 storage it shows 400 Error with Bad Request to me on ListBlob() method. 不幸的是,在我将连接字符串切换到gen2存储之后,它在ListBlob()方法上显示400错误,并向我发送了错误的请求。
Code example: 代码示例:
var storageAccount = CloudStorageAccount.Parse(connectionString);
var myClient = storageAccount.CreateCloudBlobClient();
var container = myClient.GetContainerReference(containerName);
var dirRef= container.GetDirectoryReference(directory);
var blobs = dirRef.ListBlobs();
So, when I'm trying to iterate blobs it generates an exception. 因此,当我尝试迭代Blob时会生成一个异常。 Does anyone have experience with this? 有人对此有经验吗?
It is a known issue, see Known issues with Azure Data Lake Storage Gen2 . 这是一个已知问题,请参阅Azure Data Lake Storage Gen2的已知问题 。
Blob Storage APIs and Azure Data Lake Gen2 APIs aren't interoperable with each other. Blob存储API和Azure Data Lake Gen2 API不能互操作。
Blob storage APIs aren't yet available to Azure Data Lake Storage Gen2 accounts. Blob存储API尚不适用于Azure Data Lake Storage Gen2帐户。
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. 禁用这些API是为了防止由于Blob存储API尚未与Azure Data Lake Gen2 API互操作而引起的意外数据访问问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.