首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Cassandra适合存储文件吗?

Cassandra适合存储文件吗?
EN

Stack Overflow用户
提问于 2012-01-13 05:47:09
回答 3查看 21.3K关注 0票数 21

我正在开发一个php平台,它将大量使用图像、文档和我脑海中浮现的任何文件格式,所以我想知道Cassandra是否是我需要的一个很好的选择。

如果没有,你能告诉我应该如何存储文件吗?我希望继续使用cassandra,因为它具有容错能力,并且可以在节点之间自动复制。

谢谢你的帮助。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-01-13 14:03:11

cassandra wiki

代码语言:javascript
复制
Cassandra's public API is based on Thrift, which offers no streaming abilities 
any value written or fetched has to fit in memory. This is inherent to Thrift's 
design and is therefore unlikely to change. So adding large object support to
Cassandra would need a special API that manually split the large objects up 
into pieces. A potential approach is described in http://issues.apache.org/jira/browse/CASSANDRA-265.    
As a workaround in the meantime, you can manually split files into chunks of whatever 
size you are comfortable with -- at least one person is using 64MB -- and making a file correspond 
to a row, with the chunks as column values.

因此,如果你的文件小于10MB,你应该没问题,只要确保限制文件大小,或者将大文件分成块。

票数 14
EN

Stack Overflow用户

发布于 2012-01-13 06:25:49

您应该可以使用10MB的文件。实际上,如果我没记错的话,DataStax Brisk在Cassandra之上放置了一个文件系统:http://www.datastax.com/products/enterprise

(我与他们没有任何联系-这不是一个广告)

票数 6
EN

Stack Overflow用户

发布于 2013-09-21 01:24:24

作为新的信息,Netflix为他们的cassandra客户端提供了名为astyanax的实用程序,用于将文件存储为处理对象存储。描述和示例可以在here中找到。使用astyanax编写一些测试并评估Cassandra作为文件存储可能是一个很好的起点。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8842837

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档