質問

私は、画像、ドキュメント、そして私の頭に浮かぶファイル形式を膨大な利用する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未満の場合は問題ありません。ファイルサイズを制限するか、大きなファイルをチャンクに分割してください。

他のヒント

10MBのファイルで大丈夫です。実際、DataStax Briskは、私が間違っていない場合、Cassandraの上にファイルシステムを置きます: http://www.datastax.com/products/enterprise.

(私は決して彼らとは関係ありません - これは広告ではありません)

新鮮な情報として、NetflixはCassandraクライアントにユーティリティを提供します Astyanax 処理されたオブジェクトストアとしてファイルを保存するため。説明と例を見つけることができます ここ. 。 AstyAnaxを使用していくつかのテストを作成し、ファイルストレージとしてCassandraを評価するのは良い出発点です。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top