incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre Chalamet" <pie...@chalamet.net>
Subject Re: NetworkTopologyStrategy with 1 node
Date Sat, 26 May 2012 15:22:07 GMT
Your datacenter is 'datacenter1' not 'DC1'.

- Pierre

-----Original Message-----
From: Cyril Auburtin <cyril.auburtin@gmail.com>
Date: Sat, 26 May 2012 16:51:38 
To: <user@cassandra.apache.org>
Reply-To: user@cassandra.apache.org
Subject: Re: NetworkTopologyStrategy with 1 node

Here is what happen with 2 cassandra nodes

I use 127.0.0.1 and 127.0.0.2 which is pingable but doesn't resolve to
anything

tic@_:/home/tic/cassandra1.1/bin$ nslookup 127.0.0.2
Server: 138.96.0.10
Address: 138.96.0.10#53

** server can't find 2.0.0.127.in-addr.arpa.: NXDOMAIN

tic@_:/home/tic/cassandra1.1/bin$ nslookup 127.0.0.1
Server: 138.96.0.10
Address: 138.96.0.10#53

1.0.0.127.in-addr.arpa name = localhost.

nodes are in this ring:

tic@_:/home/tic/cassandra1.1/bin$ ./nodetool -h 127.0.0.1 -p 4202 ring
Note: Ownership information does not include topology, please specify a
keyspace.
Address         DC          Rack        Status State   Load            Owns
               Token

               85070591730234615865843651857942052864
127.0.0.1       datacenter1 rack1       Up     Normal  20.1 KB
50.00%              0
127.0.0.2       datacenter1 rack1       Up     Normal  9.09 KB
50.00%              85070591730234615865843651857942052864

tic@_:/home/tic/cassandra1.1/bin$ ./nodetool -h 127.0.0.1 -p 4202 info
Token            : 0
Gossip active    : true
Load             : 20.1 KB
Generation No    : 1338042981
Uptime (seconds) : 33
Heap Memory (MB) : 19.61 / 490.00
Data Center      : datacenter1
Rack             : rack1
Exceptions       : 0
Key Cache        : size 480 (bytes), capacity 25165824 (bytes), 7 hits, 14
requests, 0.500 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

then I do
tic@_:/home/tic/cassandra1.1/bin$ ./cassandra-cli -h 127.0.0.1 -p 4201
--jmxport 4202
Connected to: "Test Cluster" on 127.0.0.1/4201
Welcome to Cassandra CLI version 1.1.0

Type 'help;' or '?' for help.
Type 'quit;' or 'exit;' to quit.

[default@unknown] create keyspace ks with strategy_options = [{DC1:1}] and
placement_strategy ='NetworkTopologyStrategy';
WARNING: [{}] strategy_options syntax is deprecated, please use {}
619d6daf-d58a-3f60-9928-f9546ca1bcae
Waiting for schema agreement...
... schemas agree across the cluster
[default@unknown] use ks;
Authenticated to keyspace: ks
[default@ks] create column family rr WITH key_validation_class=UTF8Type and
comparator = UTF8Type and column_metadata = [{column_name: boo,
validation_class: UTF8Type}];
dcbf362a-ef30-305f-bc58-debc73d0f61a
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)


It works of course with a simpleStrategy keyspace

thanks for your help

Does the problem comes from using multiple localhost node?

Mime
View raw message