我正在开发一个php平台,它将大量使用图像、文档和我脑海中浮现的任何文件格式,所以我想知道Cassandra是否是我需要的一个很好的选择。
如果没有,你能告诉我应该如何存储文件吗?我希望继续使用cassandra,因为它具有容错能力,并且可以在节点之间自动复制。
谢谢你的帮助。
发布于 2012-01-13 14:03:11
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,你应该没问题,只要确保限制文件大小,或者将大文件分成块。
发布于 2012-01-13 06:25:49
您应该可以使用10MB的文件。实际上,如果我没记错的话,DataStax Brisk在Cassandra之上放置了一个文件系统:http://www.datastax.com/products/enterprise。
(我与他们没有任何联系-这不是一个广告)
https://stackoverflow.com/questions/8842837
复制相似问题