nosql – Cassandra是否适合存储文件?
发布时间:2020-12-13 13:31:52 所属栏目:百科 来源:网络整理
导读:我正在开发一个 PHP平台,将大量使用图像,文档和任何文件格式,这将在我的脑海中,所以我想知道Cassandra是否是我的需要的一个不错的选择. 如果没有,可以告诉我如何存储文件?我想继续使用cassandra,因为它是容错的,并在节点之间使用自动复制. 感谢帮助. 从 cas
我正在开发一个
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. 所以如果你的文件是< 10MB你应该很好,只要确保限制文件大小,或将大文件分解成块. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |