ring: Address DC Rack Status State Load Effective-Owership Token 127.0.0.1 datacenter1 rack1 Up Normal 23.76 KB 0.00% 108009671136512928162101339008489993198
info: Token : 108009671136512928162101339008489993198 Gossip active : true Load : 23.76 KB Generation No : 1338041673 Uptime (seconds) : 236 Heap Memory (MB) : 40.36 / 490.00 Data Center : datacenter1 Rack : rack1 Exceptions : 0 Key Cache : size 144 (bytes), capacity 25165824 (bytes), 13 hits, 16 requests, 1.000 recent hit rate, 14400 save period in seconds Row Cache : size 0 (bytes), capacity 0 (bytes), 0 hits, 0 requests, NaN recent hit rate, 0 save period in seconds and describe ks; Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy Durable Writes: true Options: [DC1:1] Column Families: ColumnFamily: rr Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type Default column value validator: org.apache.cassandra.db.marshal.BytesType Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type GC grace seconds: 864000 Compaction min/max thresholds: 4/32 Read repair chance: 0.1 DC Local Read repair chance: 0.0 Replicate on write: true Caching: KEYS_ONLY Bloom Filter FP chance: default Built indexes: [] Column Metadata: Column Name: boo Validation Class: org.apache.cassandra.db.marshal.UTF8Type Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy Compression Options: sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor What should I set, I never managed to make this configuration of keyspace (networktopo) ever work (I mean be able to read write on CF's) , with 1 node yet or multiple but based on localhost aliases. Is it necessary to have two physical different nodes (strictly different IP's) 2012/5/26 Jeremiah Jordan <jeremiah.jor...@morningstar.com> > What is the output of nodetool ring? Does the cluster actually think > your node is in DC1? > > -Jeremiah > > On May 26, 2012, at 6:36 AM, Cyril Auburtin wrote: > > I get the same issue on Cassandra 1.1: > > create keyspace ks with strategy_class = 'NetworkTopologyStrategy' AND > strategy_options ={DC1:1}; > > then for example > > [default@ks] create column family rr WITH key_validation_class=UTF8Type > and comparator = UTF8Type and column_metadata = [{column_name: boo, > validation_class: UTF8Type}]; > 5c6d0b86-86f2-3444-8335-fe4bdaa4745d > Waiting for schema agreement... > ... schemas agree across the cluster > [default@ks] set rr['1']['boo'] = '1'; > null > UnavailableException() > at > org.apache.cassandra.thrift.Cassandra$insert_result.read(Cassandra.java:15898) > at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78) > at > org.apache.cassandra.thrift.Cassandra$Client.recv_insert(Cassandra.java:788) > at org.apache.cassandra.thrift.Cassandra$Client.insert(Cassandra.java:772) > at org.apache.cassandra.cli.CliClient.executeSet(CliClient.java:896) > at > org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:213) > at > org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:219) > at org.apache.cassandra.cli.CliMain.main(CliMain.java:346) > > > > 2012/5/26 Cyril Auburtin <cyril.aubur...@gmail.com> > >> thx, but still not >> >> I did: >> >> update keyspace ks with strategy_options = [{DC1:1}] and >> placement_strategy = 'org.apache.cassandra.locator.NetworkTopologyStrategy'; >> >> then in cassandra-cli : >> >> [default@ks] list Position; >> Using default limit of 100 >> Internal error processing get_range_slices >> >> and in cassandra console: >> >> INFO 11:10:52,680 Keyspace updated. Please perform any manual >> operations. >> ERROR 11:13:37,565 Internal error processing get_range_slices >> java.lang.IllegalStateException: datacenter (DC1) has no more endpoints, >> (1) replicas still needed >> at >> org.apache.cassandra.locator.NetworkTopologyStrategy.calculateNaturalEndpoints(NetworkTopologyStrategy.java:118) >> at >> org.apache.cassandra.locator.AbstractReplicationStrategy.getNaturalEndpoints(AbstractReplicationStrategy.java:101) >> at >> org.apache.cassandra.service.StorageService.getLiveNaturalEndpoints(StorageService.java:1538) >> >> How do I have to set the cassndra-topology.properties for a single node >> in ths DC? >> I will try to do the same thing with C1.1, it could work >> >> 2012/5/26 Edward Capriolo <edlinuxg...@gmail.com> >> >>> replication_factor = 1 and strategy_options = [{DC1:0}] >>> >>> You should not be setting both of these. >>> >>> All you should need is: >>> strategy_options = [{DC1:1}] >>> >>> On Fri, May 25, 2012 at 1:47 PM, Cyril Auburtin >>> <cyril.aubur...@gmail.com> wrote: >>> > I was using a single node, on cassandra 0.7.10 >>> > >>> > with Network strategy = SimpleStrategy, and replication factor = 1, >>> > everything is fine, I was using a consistency level of ONE, for >>> > reading/writing >>> > >>> > I have updated the keyspace to >>> > >>> > update keyspace Mymed with replication_factor = 1 and strategy_options >>> = >>> > [{DC1:0}] and placement_strategy = >>> > 'org.apache.cassandra.locator.NetworkTopologyStrategy'; >>> > >>> > with conf/cassandra-topology.properties having just this for the >>> moment: >>> > >>> > default=DC1:r1 >>> > >>> > the keyspace could update, I could use ks; also, but can't read >>> anything >>> > >>> > even from Thrift using ConsistencyLevel.ONE; it will complain that this >>> > strategy require Quorum >>> > >>> > I tried with ConsistencyLevel.LOCAL_QUORUM; but get an exception >>> like : >>> > >>> > org.apache.thrift.TApplicationException: Internal error processing >>> get_slice >>> > >>> > and in cassandra console: >>> > >>> > DEBUG 19:45:02,013 Command/ConsistencyLevel is >>> > SliceFromReadCommand(table='Mymed', >>> > key='637972696c2e617562757274696e40676d61696c2e636f6d', >>> > column_parent='QueryPath(columnFamilyName='Authentication', >>> > superColumnName='null', columnName='null')', start='', finish='', >>> > reversed=false, count=100)/LOCAL_QUORUM >>> > ERROR 19:45:02,014 Internal error processing get_slice >>> > java.lang.NullPointerException >>> > at >>> > >>> org.apache.cassandra.locator.NetworkTopologyStrategy.getReplicationFactor(NetworkTopologyStrategy.java:139) >>> > at >>> > >>> org.apache.cassandra.service.DatacenterReadCallback.determineBlockFor(DatacenterReadCallback.java:83) >>> > at >>> org.apache.cassandra.service.ReadCallback.<init>(ReadCallback.java:77) >>> > at >>> > >>> org.apache.cassandra.service.DatacenterReadCallback.<init>(DatacenterReadCallback.java:48) >>> > at >>> > >>> org.apache.cassandra.service.StorageProxy.getReadCallback(StorageProxy.java:461) >>> > at >>> > >>> org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:326) >>> > at >>> org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:291) >>> > >>> > So probably I guess Network topology strategy can't work with just one >>> node? >>> > >>> > thx for any feedback >>> >> >> > >