Cassandra适合存储文件吗?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (94)

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

如果没有,你能告诉我如何存储文件吗?我想继续使用Cassandra,因为它是容错的,并且使用节点间的自动复制。

提问于
用户回答回答于

参考cassandra wiki:

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.

因此,如果您的文件是<10 MB,您应该很好,只需确保限制文件大小,或将大文件分割成块。

用户回答回答于

扫码关注云+社区