如何在Windows Azure存储上查询Cloud Blob [英] How to query Cloud Blobs on Windows Azure Storage

查看:77
本文介绍了如何在Windows Azure存储上查询Cloud Blob的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Microsoft.WindowsAzure.StorageClient来操纵Azure存储上的Blob.我到了需要用户列出上传文件并修改/删除它们的地步. 由于一个容器中有许多文件,因此查询天蓝色存储服务以仅返回所需文件的最佳方法是什么.另外,我希望只能返回特定数量的Blob,以便实现分页.

I am using Microsoft.WindowsAzure.StorageClient to manipulate blobs on Azure storage. I have come to the point where the user needs to list the uploaded files and modify/delete them. Since there are many files in one container, what is the best way to query azure storage services to return only the desired files. Also, I would like to be able to return only specific number of blobs so I can implement paging.

CloudBlobContainer中有一个称为ListBlobs的方法,但似乎它正在返回容器中的所有blob.那对我不起作用.

There is a method called ListBlobs in the CloudBlobContainer, but it seems like it's returning all of the blobs in the container. That will not work for me.

我在这个主题上进行了很多搜索,找不到任何有用的东西.此链接仅显示了基础知识

I searched a lot on this topic and could not find anything useful. This link shows only the basics.

---------编辑

--------- EDIT

我在下面的回答不会延迟地检索blob,但是会检索容器中的所有blob,然后过滤结果. 当前没有解决方案可以懒惰地检索Blob.

My answer below does not retrieve the blobs lazily, but it retrieves all of the blobs in the container and then filters the result. Currently there is no solution for retrieving blobs lazily.

推荐答案

我对Windows Azure blob存储的认识是,它是准系统.就像极端的准系统一样.您只应使用它来存储文档和关联的元数据,然后按ID检索单个Blob.

What I've realized about Windows Azure blob storage is that it is bare-bones. As in extremely bare-bones. You should use it only to store documents and associated metadata and then retrieve individual blobs by ID.

我最近将应用程序从MongoDB迁移到Windows Azure Blob存储.来自MongoDB,我期望有许多不同的有效方式来检索文档.迁移之后,我现在依靠传统的RDBMS和ElasticSearch以更可搜索的方式存储Blob信息.

I recently migrated an application from MongoDB to Windows Azure blob storage. Coming from MongoDB, I was expecting a bunch of different efficient ways to retrieve documents. After migrating, I now rely on a traditional RDBMS and ElasticSearch to store blob information in a more searchable way.

Windows Azure blob存储如此有限,实在是太糟糕了.我希望将来会看到增强了 的搜索功能(例如,按元数据,属性,blob名称正则表达式等进行搜索).此外,基于map/reduce的索引将非常出色.微软有机会将许多人从其他文档存储系统转换成其他人.

It's really too bad that Windows Azure blob storage is so limiting. I hope to see much-enhanced searching capabilities in the future (e.g., search by metadata, property, blob name regex, etc.) Additionally, indexes based on map/reduce would be awesome. Microsoft has the chance to convert a lot of folks over from other document storage systems if they did these things.

这篇关于如何在Windows Azure存储上查询Cloud Blob的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆