Hi, I am new to Cassandra. I have started a Cassandra instance (Cassandra.bat), played with it for a while, created a keyspace Zodiac. When I kill Cassandra instance and restarted, the keyspace is gone but when I tried to recreate it, I got 'org.apache.thrift.transport.TTransportException' error. What have I done wrong here?
Following are screen shots: C:\cassandra-1.1.0>bin\cassandra-cli -host localhost -f C:\NoSqlProjects\dropZ.txt Starting Cassandra Client Connected to: "ssc2Cluster" on localhost/9160 Line 1 => Keyspace 'Zodiac' not found. C:\cassandra-1.1.0>bin\cassandra-cli -host localhost -f C:\NoSqlProjects\usageDB.txt Starting Cassandra Client Connected to: "ssc2Cluster" on localhost/9160 Line 1 => org.apache.thrift.transport.TTransportException Following is part of server error message: INFO 11:09:56,761 Node localhost/127.0.0.1 state jump to normal INFO 11:09:56,761 Bootstrap/Replace/Move completed! Now serving reads. INFO 11:09:56,761 Will not load MX4J, mx4j-tools.jar is not in the classpath INFO 11:09:56,781 Binding thrift service to localhost/127.0.0.1:9160 INFO 11:09:56,781 Using TFastFramedTransport with a max frame size of 15728640 bytes. INFO 11:09:56,791 Using synchronous/threadpool thrift server on localhost/127.0.0.1 : 9160 INFO 11:09:56,791 Listening for thrift clients... INFO 11:20:06,044 Enqueuing flush of Memtable-schema_keyspaces@1062244145(184/230 serialized/live bytes, 4 ops) INFO 11:20:06,054 Writing Memtable-schema_keyspaces@1062244145(184/230 serialized/live bytes, 4 ops) INFO 11:20:06,074 Completed flushing c:\cassandra_data\data\system\schema_keyspaces\system-schema_keyspaces-hc-62-Data. b (240 bytes) RROR 11:20:06,134 Exception in thread Thread[MigrationStage:1,5,main] ava.lang.AssertionError at org.apache.cassandra.db.DefsTable.updateKeyspace(DefsTable.java:441) at org.apache.cassandra.db.DefsTable.mergeKeyspaces(DefsTable.java:339) at org.apache.cassandra.db.DefsTable.mergeSchema(DefsTable.java:269) at org.apache.cassandra.service.MigrationManager$1.call(MigrationManager.java:214) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) RROR 11:20:06,134 Error occurred during processing of message. ava.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.AssertionError usageDB.txt: create keyspace Zodiac with placement_strategy = 'org.apache.cassandra.locator.SimpleStrategy' and strategy_options = {replication_factor:1}; use Zodiac; create column family ServiceUsage with comparator = UTF8Type and default_validation_class = UTF8Type and key_validation_class = LongType AND column_metadata = [ {column_name: 'TASK_ID', validation_class: IntegerType} {column_name: 'USAGE_COUNT', validation_class: IntegerType} {column_name: 'USAGE_TYPE', validation_class: UTF8Type} ]; From: Chong Zhang [mailto:chongz.zh...@gmail.com] Sent: Thursday, May 31, 2012 8:47 AM To: user@cassandra.apache.org Subject: Re: tokens and RF for multiple phases of deployment Thanks Aaron. I might use LOCAL_QUORUM to avoid the waiting on the ack from DC2. Another question, after I setup a new node with token +1 in a new DC, and updated a CF with RF {DC1:2, DC2:1}. When i update a column on one node in DC1, it's also updated in the new node in DC2. But all the other rows are not in the new node. Do I need to copy the data files from a node in DC1 to the new node? The ring (2 in DC1, 1 in DC2) looks OK, but the load on the new node in DC2 is almost 0%. Address DC Rack Status State Load Owns Token 85070591730234615865843651857942052864 10.10.10.1 DC1 RAC1 Up Normal 313.99 MB 50.00% 0 10.10.10.3 DC2 RAC1 Up Normal 7.07 MB 0.00% 1 10.10.10.2 DC1 RAC1 Up Normal 288.91 MB 50.00% 85070591730234615865843651857942052864 Thanks, Chong On Thu, May 31, 2012 at 5:48 AM, aaron morton <aa...@thelastpickle.com<mailto:aa...@thelastpickle.com>> wrote: Could you provide some guide on how to assign the tokens in this growing deployment phases? background http://www.datastax.com/docs/1.0/install/cluster_init#calculating-tokens-for-a-multi-data-center-cluster Start with tokens for a 4 node cluster. Add the next 4 between between each of the ranges. Add 8 in the new DC to have the same tokens as the first DC +1 Also if we use the same RF (3) in both DC, and use EACH_QUORUM for write and LOCAL_QUORUM for read, can the read also reach to the 2nd cluster? No. It will fail if there are not enough nodes available in the first DC. We'd like to keep both write and read on the same cluster. Writes go to all replicas. Using EACH_QUORUM means the client in the first DC will be waiting for the quorum from the second DC to ack the write. Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 31/05/2012, at 3:20 AM, Chong Zhang wrote: Hi all, We are planning to deploy a small cluster with 4 nodes in one DC first, and will expend that to 8 nodes, then add another DC with 8 nodes for fail over (not active-active), so all the traffic will go to the 1st cluster, and switch to 2nd cluster if the whole 1st cluster is down or on maintenance. Could you provide some guide on how to assign the tokens in this growing deployment phases? I looked at some docs but not very clear on how to assign tokens on the fail-over case. Also if we use the same RF (3) in both DC, and use EACH_QUORUM for write and LOCAL_QUORUM for read, can the read also reach to the 2nd cluster? We'd like to keep both write and read on the same cluster. Thanks in advance, Chong