You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Yang <te...@gmail.com> on 2012/11/02 01:45:01 UTC

Networktopology with SimpleSnitch, never returns a get()?

my code uses EC2MultiRegion snitch and NetworkTopologyStrategy in
production. Since the NetworkTopology is specified as part of
schema creation, which is part of my code, I also have to use this strategy
in test.

but in test, I normally use a single-node cluster on my laptop. so I can't
use the EC2Multiregion Snitch, but just use a SimpleSnitch.

the problem is, I can create the schema, I can successfully write, but when
I do a get('my_key', policy=LOCAL_QUORUM), it never returns, probably
because the  policy has some issues with my networktopology+simpleSnitch
usage.


what am I doing wrong?

:~/tools/apache-cassandra-1.1.2-src$ bin/nodetool  -h localhost ring
Address         DC          Rack        Status State   Load
 Effective-Ownership Token
127.0.0.1       datacenter1 rack1       Up     Normal  58.2 KB
100.00%             75114219348151468943896475823188760004


[default@blah1] show schema;
create keyspace blah1
  with placement_strategy = 'NetworkTopologyStrategy'
  and strategy_options = {datacenter1 : 1}
  and durable_writes = true;

use blah1;

create column family cf1
  with column_type = 'Standard'
  and comparator = 'BytesType'
  and default_validation_class = 'BytesType'
  and key_validation_class = 'BytesType'
  and read_repair_chance = 0.1
  and dclocal_read_repair_chance = 0.0
  and gc_grace = 864000
  and min_compaction_threshold = 4
  and max_compaction_threshold = 32
  and replicate_on_write = true
  and compaction_strategy =
'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
  and caching = 'KEYS_ONLY'
  and compression_options = {'sstable_compression' :
'org.apache.cassandra.io.compress.SnappyCompressor'};



Thanks
Yang