2012-01-12 5 views
18

私はカサンドラが私のニーズに適したものかどうか疑問に思っていたので、イメージ、ドキュメント、ファイル形式を大量に使うようなPHPプラットフォームを開発しています。Cassandraはファイルを格納するのに適していますか?

もしそうでなければ、どのようにファイルを保存すべきですか?私はそれがフォールトトレラントで、ノード間で自動複製を使用するので、cassandraを使い続けたいと思います。

ありがとうございました。

+0

ファイルのサイズはどれくらいですか? –

+0

ファイルが10 MBを超えるとは思わない – siannone

答えて

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. 

だからあなたのファイルが< 10メガバイトであれば、あなたは問題ないはずです、ファイルサイズを制限するか、大容量のファイルを大量に分割してください。

5

10MBのファイルで問題はありません。実際、DataStax Briskは私が間違っていない場合、ファイルシステムをCassandraの上に置きます:http://www.datastax.com/products/enterprisecassandra wikiから

(私はこれは広告ではありません任意のway-でそれらに関連付けられていないよ)

3

新しい情報として、Netflixは、処理対象のオブジェクトストアとしてファイルを格納するために、astyanaxという名前のcassandraクライアント用のユーティリティを提供します。説明と例はhereです。 astyanaxを使用していくつかのテストを書いて、Cassandraをファイルストレージとして評価するのは良い出発点です。

関連する問題