4

2つのCassandraノードと2つの活発なノード[cassandra+TT]を持つ4ノードのCassandraクラスターがあります。活発なベータ2

cassandra-cliを使用して、列ファミリーの作成と更新を挿入しました

私の挿入と投影は常に失敗しています。例えば

カウンターカラムファミリー

[default@StatsKeySpace] create column family Impressions with comparator=UTF8Type and default_validation_class=CounterColumnType and key_validation_class=UTF8Type;
175d69d0-eb6f-11e0-0000-93bbb4d362fc
Waiting for schema agreement...
... schemas agree across the cluster
[default@StatsKeySpace] incr Impressions['Test']['impressions'] by 10;
null
[default@StatsKeySpace] incr Impressions['Test']['impressions'] by 1; 
null
[default@StatsKeySpace] get Impressions['Test']['impressions'];
null
[default@StatsKeySpace] list Impressions;
Using default limit of 100
null

標準カラムファミリー

[default@StatsKeySpace] set TestColumnFamily['Test']['tamil']='hai';
null

すべてのノードがクラスター内で稼働しています

これは私のキースペース定義です

Keyspace: StatsKeySpace:
  Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy
  Durable Writes: true
    Options: [replication_factor:1]

デバッグモードでcassandra-cliを試しましたが、このエラーが見つかりました

[default@unknown] use StatsKeySpace;
Authenticated to keyspace: StatsKeySpace
[default@StatsKeySpace] incr Impressions['tamil']['count'] by 1;
null
java.lang.RuntimeException
    at org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:297)
    at org.apache.cassandra.cli.CliMain.processStatement(CliMain.java:217)
    at org.apache.cassandra.cli.CliMain.main(CliMain.java:345)

両方の列ファミリーにreplicate_on_writeがありますfalse事前に助けてくれてありがとう

よろしく、タミル語

4

2 に答える 2

3

jbellisのおかげで、出荷されているcassandraバージョンを活発にアップグレードし、デバッグモードを設定してcassandra-cliを実行しました。jbellisが述べたように、私は意味のある例外を受け取りました。

UnavailableException-レプリケーションファクターを満たすのに十分なノードが稼働していません。

briskはbrisksnitchを使用するため、異なるDC間でbriskノードとcassandraノードをデプロイします。BriskDCのシードである4ノードクラスターの1つがダウンしました。それが私がその例外を受け取った理由だと思います。

そのため、すべてのノードを0.8.6でアップグレードし、キースペースをsimplestrategyでアップグレードしてクラスター全体を再起動しました。これは、デプロイメントに必要なデータセンターが1つだけであるためです。

今、私の挿入と投影はすべてうまくいっています:)活発なb2がすべての面で0.8.6と互換性があることを願っています

よろしく、タミル語。

于 2011-10-03T11:49:15.420 に答える
1

カウンター以外の列をインクリメントしようとしています。カウンターで使用するCFを作成する例については、http://www.datastax.com/dev/blog/whats-new-in-cassandra-0-8-part-2-countersを参照してください。

(Brisk b2には、現時点ではかなり古いバージョンのCassandraが付属しています。新しいバージョンでは、より役立つエラーメッセージが返されると思います。)

于 2011-09-30T16:51:14.823 に答える