Re: How to release a customised Cassandra from Eclipse?
Its ant artifacts Bye Norman 2011/8/7, Alvin UW alvi...@gmail.com: Thanks guys. The problem is solved. I copied cassandra and cassandra.in to my bin folder. Then used ant release to generate my customized cassandra.jar in dist folder. it worked. To Aaron: I tried ant artefacts, but it failed. is it because I am using Cassandra 0.7? What's the difference between ant artefacts and ant release? 2011/8/6 aaron morton aa...@thelastpickle.com Have a look at this file in the source repo https://github.com/apache/cassandra/blob/trunk/bin/cassandra try using ant artefacts and look in the build/dist dir. cheers - Aaron Morton Freelance Cassandra Developer @aaronmorton http://www.thelastpickle.com On 7 Aug 2011, at 03:58, Alvin UW wrote: Thanks. I am a beginner. I checked bin folder under myCassandra. There are only some classes without executable file. after ant release, I got the jar file from build folder. 2011/8/6 Jonathan Ellis jbel...@gmail.com look at bin/cassandra, you can't just run it with java -jar On Sat, Aug 6, 2011 at 10:43 AM, Alvin UW alvi...@gmail.com wrote: Hello, I set up a Cassandra project in Eclipse following http://wiki.apache.org/cassandra/RunningCassandraInEclipse Then, I made a few modifications on it to form a customised Cassandra. But I don't know how can I release this new Cassandra from Eclipse as a jar file to use in EC2. I tried ant release command in command line. It can successful build .jar file. Then I typed java -jar apache-cassandra-0.7.0-beta1-SNAPSHOT.jar Error: Failed to load Main-Class manifest attribute from I edited a MANIFEST.MF like: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.7.1 Created-By: 16.3-b01 (Sun Microsystems Inc.) Implementation-Title: Cassandra Implementation-Version: 0.7.0-beta1-SNAPSHOT Implementation-Vendor: Apache Main-Class: org.apache.cassandra.thrift.CassandraDaemon and tried again. the error is like below: Exception in thread main java.lang.NoClassDefFoundError: org/apache/thrift/transport/TTransportException Caused by: java.lang.ClassNotFoundException: org.apache.thrift.transport.TTransportException at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:319) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:264) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332) Could not find the main class: org.apache.cassandra.thrift.CassandraDaemon. Program will exit. So what's the problem? Thanks. Alvin -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com
Re: Last manual repair time
On 4 August 2011 22:59, Teijo Holzer thol...@wetafx.co.nz wrote: End of every repair: grep 'No neighbors to repair with' system.log Thanks - very helpful. Already wrote a tiny nagios plugin to go through this and alert when needed.
per node meta data configuration
When cassandra loaded from the xml file it was easy to experiment with different settings. With new row cache providers and the new sstable compression there is a problem. While these can be tested for correctness on staging gear. In production these things have to be rolled out all nodes or none. Ideally I would like to be able to test this out on one node in a live cluster. Any plan for that? Per node meta overrides. Edward
Re: batch mutates throughput
Hmm, can you create a ticket with a simple way to reproduce that? We should be giving back an InvalidRequestException for multiple-mutations-on-same-key instead of erroring out later and causing timeouts. On Mon, Aug 8, 2011 at 12:34 AM, Philippe watche...@gmail.com wrote: Hi Boris, Thanks for the suggestion, I didn't know there was one. I believe have finally figured it out and it turns out my last two questions are related. First, my batch loading was ignoring a bunch of rows when reading the first file (so it took hundreds of potential mutations for the problem to show up) and secondly, the ReplicateOnWriteStage error was generated by the batch mutations themselves and explained the TimedOutException : I was doing multiple mutations on the same key in one batch 2011/8/8 Boris Yen yulin...@gmail.com Maybe you could try to adjust the setting cassandraThriftSocketTimeout of hector. https://github.com/rantav/hector/wiki/User-Guide On Mon, Aug 8, 2011 at 6:54 AM, Philippe watche...@gmail.com wrote: Quick followup. I have pushed the RPC timeout to 30s. Using Hector, I'm doing 1 thread doing batches of 10 mutates at a time so that's even slower than when I was doing 16 threads in parallel doing non-batched mutations. After a couple hundred execute() calls, I get a timeout for every node; I have a 15 second grace period between retries. tpstats indicate no pendings on any of the nodes. I never recover from that I then set the batch size to one and it seems to work a lot better. The only difference I note is that the Mutator.execute() method returns a result than sometimes has a null host and 0 microsecond time in the batch sizes of ten but never in batch sizes of 1. I'm stumped ! Any ideas ? Thanks -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com
Re: Setup Cassandra0.8 in Eclipse
you can simply run: ant generate-eclipse-files then import the project On Sun, Aug 7, 2011 at 5:39 PM, Alvin UW alvi...@gmail.com wrote: Hello, I am trying to Setup Cassandra0.8 in Eclipse following http://wiki.apache.org/cassandra/RunningCassandraInEclipse After right clicking on the build.xml - Run As - Ant Build. Error appeared as follows: Buildfile: /workspace/Cassandra0.8/build.xml maven-ant-tasks-localrepo: maven-ant-tasks-download: [echo] Downloading Maven ANT Tasks... [mkdir] Created dir: /workspace/Cassandra0.8/build [get] Getting: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar [get] To: /workspace/Cassandra0.8/build/maven-ant-tasks-2.1.3.jar maven-ant-tasks-init: [mkdir] Created dir: /workspace/Cassandra0.8/build/lib scm-svn-info: BUILD FAILED /workspace/Cassandra0.83/build.xml:235: Execute failed: java.io.IOException: Cannot run program svn: java.io.IOException: error=2, No such file or directory Total time: 992 milliseconds It seems svn wasn't installed, but i did install it. Thanks. Alvin -- http://twitter.com/tjake
Re: Chronologic
I've been working on Chronologic for the past several months. I'm doing a presentation on it this weekend at Lone Star Ruby Conference. It will be open source by Sunday 8/14 :). More info on the talk: http://speakerrate.com/talks/7808 On Aug 6, 2011, at 3:57 AM, Sal Fuentes wrote: Hello Scott, I noticed you had previously posted this snippet: https://gist.github.com/832414 And I was curious to know if there were any plans to open source Chronologic in the future? If so, I think the Cassandra and Ruby communities would thank you for it. :) -- Sal
Re: batch mutates throughput
Hmm, can you create a ticket with a simple way to reproduce that? We should be giving back an InvalidRequestException for multiple-mutations-on-same-key instead of erroring out later and causing timeouts. Will do but I'm supposed to be on vacation for a couple weeks now so it will take a while to sanitize stuff before posting it. This is now hitting me in another part of the app where I had batched stuff... oh well On Mon, Aug 8, 2011 at 12:34 AM, Philippe watche...@gmail.com wrote: Hi Boris, Thanks for the suggestion, I didn't know there was one. I believe have finally figured it out and it turns out my last two questions are related. First, my batch loading was ignoring a bunch of rows when reading the first file (so it took hundreds of potential mutations for the problem to show up) and secondly, the ReplicateOnWriteStage error was generated by the batch mutations themselves and explained the TimedOutException : I was doing multiple mutations on the same key in one batch 2011/8/8 Boris Yen yulin...@gmail.com Maybe you could try to adjust the setting cassandraThriftSocketTimeout of hector. https://github.com/rantav/hector/wiki/User-Guide On Mon, Aug 8, 2011 at 6:54 AM, Philippe watche...@gmail.com wrote: Quick followup. I have pushed the RPC timeout to 30s. Using Hector, I'm doing 1 thread doing batches of 10 mutates at a time so that's even slower than when I was doing 16 threads in parallel doing non-batched mutations. After a couple hundred execute() calls, I get a timeout for every node; I have a 15 second grace period between retries. tpstats indicate no pendings on any of the nodes. I never recover from that I then set the batch size to one and it seems to work a lot better. The only difference I note is that the Mutator.execute() method returns a result than sometimes has a null host and 0 microsecond time in the batch sizes of ten but never in batch sizes of 1. I'm stumped ! Any ideas ? Thanks -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com
Kundera 2.0.3 Released
We are happy to announce release of Kundera 2.0.3 Kundera is a JPA 2.0 based, Object-Datastore Mapping Library for NoSQL Datastores. The idea behind Kundera is to make working with NoSQL Databases drop-dead simple and fun. It currently supports Cassandra, HBase and MongoDB. Cassandra 0.8 support has been added to Kundera in this release. (Earlier it supported Cassandra 0.7.x) What's keeping us busy: --- We are actively working on adding new features and improving existing ones in Kundera. Some of them are: - Cross-store persistence - Support for nested embedding - Plugin architecture to let developers create their own plugin for a NoSQL database support. - Transaction support To download, use or contribute to Kundera, visit: http://github.com/impetus-opensource/Kundera An example twitter like application built using Kundera can be found at: http://github.com/impetus-opensource/Kundera-Examples NOSQL is as easy as SQL, if done through Kundera ! Happy working with NoSQL!!
Re: batch mutates throughput
Hmm, can you create a ticket with a simple way to reproduce that? We should be giving back an InvalidRequestException for multiple-mutations-on-same-key instead of erroring out later and causing timeouts. Humm... this is actually quite confusing. When I look at the error, I don't see the same super column although it is the same columns. It does look like it's the same key. I thought that was possible. Isn't this really https://issues.apache.org/jira/browse/CASSANDRA-2949except I get a sligthly different log message ? Sylvain, is this really the same ? Any idea of when 8.1.3 will be voted on ? ERROR [ReplicateOnWriteStage:409] 2011-08-08 16:49:11,182 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[ReplicateOnWriteStage:409,5,main] java.lang.RuntimeException: java.lang.IllegalArgumentException: ColumnFamily ColumnFamily(PUBLIC_MONTHLY_17 [SuperColumn(ghcisco [01:false:[{223a4de0-b5fb-11e0--826f85850cbd, 4, 8}*,{224ceb80-b5fb-11e0--848783ceb9bf, 1, 2}]@1312814951133!-9223372036854775808,010001:false:[{223a4de0-b5fb-11e0--826f85850cbd, 4, -776}*,{224ceb80-b5fb-11e0--848783ceb9bf, 1, -194}]@1312814951133!-9223372036854775808,]),]) already has modifications in this mutation: ColumnFamily(PUBLIC_MONTHLY_17 [SuperColumn(gdwls [01:false:[{223a4de0-b5fb-11e0--826f85850cbd, 4, 8}*,{224ceb80-b5fb-11e0--848783ceb9bf, 1, 2}]@1312814951133!-9223372036854775808,010001:false:[{223a4de0-b5fb-11e0--826f85850cbd, 4, -756}*,{224ceb80-b5fb-11e0--848783ceb9bf, 1, -189}]@1312814951133!-9223372036854775808,]),]) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.IllegalArgumentException: ColumnFamily ColumnFamily(PUBLIC_MONTHLY_17 [SuperColumn(ghcisco [01:false:[{223a4de0-b5fb-11e0--826f85850cbd, 4, 8}*,{224ceb80-b5fb-11e0--848783ceb9bf, 1, 2}]@1312814951133!-9223372036854775808,010001:false:[{223a4de0-b5fb-11e0--826f85850cbd, 4, -776}*,{224ceb80-b5fb-11e0--848783ceb9bf, 1, -194}]@1312814951133!-9223372036854775808,]),]) already has modifications in this mutation: ColumnFamily(PUBLIC_MONTHLY_17 [SuperColumn(gdwls [01:false:[{223a4de0-b5fb-11e0--826f85850cbd, 4, 8}*,{224ceb80-b5fb-11e0--848783ceb9bf, 1, 2}]@1312814951133!-9223372036854775808,010001:false:[{223a4de0-b5fb-11e0--826f85850cbd, 4, -756}*,{224ceb80-b5fb-11e0--848783ceb9bf, 1, -189}]@1312814951133!-9223372036854775808,]),]) at org.apache.cassandra.db.RowMutation.add(RowMutation.java:123) at org.apache.cassandra.db.CounterMutation.makeReplicationMutation(CounterMutation.java:120) at org.apache.cassandra.service.StorageProxy$5$1.runMayThrow(StorageProxy.java:455) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30) ... 3 more On Mon, Aug 8, 2011 at 12:34 AM, Philippe watche...@gmail.com wrote: Hi Boris, Thanks for the suggestion, I didn't know there was one. I believe have finally figured it out and it turns out my last two questions are related. First, my batch loading was ignoring a bunch of rows when reading the first file (so it took hundreds of potential mutations for the problem to show up) and secondly, the ReplicateOnWriteStage error was generated by the batch mutations themselves and explained the TimedOutException : I was doing multiple mutations on the same key in one batch 2011/8/8 Boris Yen yulin...@gmail.com Maybe you could try to adjust the setting cassandraThriftSocketTimeout of hector. https://github.com/rantav/hector/wiki/User-Guide On Mon, Aug 8, 2011 at 6:54 AM, Philippe watche...@gmail.com wrote: Quick followup. I have pushed the RPC timeout to 30s. Using Hector, I'm doing 1 thread doing batches of 10 mutates at a time so that's even slower than when I was doing 16 threads in parallel doing non-batched mutations. After a couple hundred execute() calls, I get a timeout for every node; I have a 15 second grace period between retries. tpstats indicate no pendings on any of the nodes. I never recover from that I then set the batch size to one and it seems to work a lot better. The only difference I note is that the Mutator.execute() method returns a result than sometimes has a null host and 0 microsecond time in the batch sizes of ten but never in batch sizes of 1. I'm stumped ! Any ideas ? Thanks -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com
Re: Setup Cassandra0.8 in Eclipse
Thanks guys. After installing svn, it works. But when I followed the last step If Eclipse still complains about compile errors it is because 'src' (and not 'src/java') is added as source folder. To fix this I recommend to remove 'src' from build path and add 'src/java' to the build path (just like you did for the thrift and avro generated code). There are still some errors in the following packages. src/java org.apache.cassandra.service org.apache.cassandra.streaming org.apache.cassandra.thrift org.apache.cassandra.utils org.apache.cassandra.utils.obs The common error info is The declared package org.apache.cassandra.xxx does not match the expected package java.org.apache.cassandra.xxx Alvin 2011/8/8 Jake Luciani jak...@gmail.com you can simply run: ant generate-eclipse-files then import the project On Sun, Aug 7, 2011 at 5:39 PM, Alvin UW alvi...@gmail.com wrote: Hello, I am trying to Setup Cassandra0.8 in Eclipse following http://wiki.apache.org/cassandra/RunningCassandraInEclipse After right clicking on the build.xml - Run As - Ant Build. Error appeared as follows: Buildfile: /workspace/Cassandra0.8/build.xml maven-ant-tasks-localrepo: maven-ant-tasks-download: [echo] Downloading Maven ANT Tasks... [mkdir] Created dir: /workspace/Cassandra0.8/build [get] Getting: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar [get] To: /workspace/Cassandra0.8/build/maven-ant-tasks-2.1.3.jar maven-ant-tasks-init: [mkdir] Created dir: /workspace/Cassandra0.8/build/lib scm-svn-info: BUILD FAILED /workspace/Cassandra0.83/build.xml:235: Execute failed: java.io.IOException: Cannot run program svn: java.io.IOException: error=2, No such file or directory Total time: 992 milliseconds It seems svn wasn't installed, but i did install it. Thanks. Alvin -- http://twitter.com/tjake
Re: Setup Cassandra0.8 in Eclipse
here is what I normally do: I do not use the ant-generated eclipse files from the build.xml, because that uses external ant build, and every time you make some small code changes, the ant job is invoked, which is annoying. I just create an eclipse java project, select the java sources to be src/java test/unit src/gen-java interface/thrift/gen-java these ignore some of the builds that are of no interest to me, but if you want to build the others, it should be similar. also you need to remove the apache-rat*.jar and commons-lang-2.1*.jar from build path, should use commons-lang-2.4 On Sun, Aug 7, 2011 at 2:39 PM, Alvin UW alvi...@gmail.com wrote: Hello, I am trying to Setup Cassandra0.8 in Eclipse following http://wiki.apache.org/cassandra/RunningCassandraInEclipse After right clicking on the build.xml - Run As - Ant Build. Error appeared as follows: Buildfile: /workspace/Cassandra0.8/build.xml maven-ant-tasks-localrepo: maven-ant-tasks-download: [echo] Downloading Maven ANT Tasks... [mkdir] Created dir: /workspace/Cassandra0.8/build [get] Getting: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar [get] To: /workspace/Cassandra0.8/build/maven-ant-tasks-2.1.3.jar maven-ant-tasks-init: [mkdir] Created dir: /workspace/Cassandra0.8/build/lib scm-svn-info: BUILD FAILED /workspace/Cassandra0.83/build.xml:235: Execute failed: java.io.IOException: Cannot run program svn: java.io.IOException: error=2, No such file or directory Total time: 992 milliseconds It seems svn wasn't installed, but i did install it. Thanks. Alvin
Re: Replicate on write stage errors
On Sun, Aug 7, 2011 at 11:27 PM, Philippe watche...@gmail.com wrote: hello, I've got new errors showing up in my cassandra log file since I starting testing batch mutates (and it failed). I have done a rolling restart and they are not disappearing. How can I fix this ? It's a known bug: https://issues.apache.org/jira/browse/CASSANDRA-2949 You can fix by applying the patch attached to that issue or waiting for 0.8.3. Good news being, it is under a vote, and unless a big regression if found, it should be released very soon (tomorrow, maybe today). -- Sylvain What is this really saying about my data and my cluster ? Thanks ERROR [ReplicateOnWriteStage:35] 2011-08-07 23:22:39,147 AbstractCassandraDaemon.java (line 139) Fatal exception in thread Thread[ReplicateOnWriteStage:35,5,main] java.lang.RuntimeException: java.lang.IllegalArgumentException: ColumnFamily ColumnFamily(PUBLIC_MONTHLY_11 [SuperColumn(310260 [000200:false:[{223a4de0-b5fb-11e0--826f85850cbd, 2, 6}*,{e0db20e0-b5ff-11e0--01687c4831ff, 2, 6}]@1312752159034!-9223372036854775808,000201:false:[{223a4de0-b5fb-11e0--826f85850cbd, 2, -378}*,{e0db20e0-b5ff-11e0--01687c4831ff, 2, -378}]@1312752159034!-9223372036854775808,000300:false:[{223a4de0-b5fb-11e0--826f85850cbd, 17, 12124}*,{224ceb80-b5fb-11e0--848783ceb9bf, 28, 14097},{e0db20e0-b5ff-11e0--01687c4831ff, 15, 3737}]@1312752159034!-9223372036854775808,000301:false:[{223a4de0-b5fb-11e0--826f85850cbd, 17, -917234}*,{224ceb80-b5fb-11e0--848783ceb9bf, 28, -1148333},{e0db20e0-b5ff-11e0--01687c4831ff, 15, -287859}]@1312752159034!-9223372036854775808,]),]) already has modifications in this mutation: ColumnFamily(PUBLIC_MONTHLY_11 [SuperColumn(31026 [000200:false:[{223a4de0-b5fb-11e0--826f85850cbd, 13, 387}*,{224ceb80-b5fb-11e0--848783ceb9bf, 8, 1991},{e0db20e0-b5ff-11e0--01687c4831ff, 6, 237}]@1312752159034!-9223372036854775808,000201:false:[{223a4de0-b5fb-11e0--826f85850cbd, 13, -31485}*,{224ceb80-b5fb-11e0--848783ceb9bf, 8, -138769},{e0db20e0-b5ff-11e0--01687c4831ff, 6, -18209}]@1312752159034!-9223372036854775808,000300:false:[{223a4de0-b5fb-11e0--826f85850cbd, 2, 8}*,{e0db20e0-b5ff-11e0--01687c4831ff, 2, 8}]@1312752159034!-9223372036854775808,000301:false:[{223a4de0-b5fb-11e0--826f85850cbd, 2, -708}*,{e0db20e0-b5ff-11e0--01687c4831ff, 2, -708}]@1312752159034!-9223372036854775808,]),]) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:34) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.IllegalArgumentException: ColumnFamily ColumnFamily(PUBLIC_MONTHLY_11 [SuperColumn(310260 [000200:false:[{223a4de0-b5fb-11e0--826f85850cbd, 2, 6}*,{e0db20e0-b5ff-11e0--01687c4831ff, 2, 6}]@1312752159034!-9223372036854775808,000201:false:[{223a4de0-b5fb-11e0--826f85850cbd, 2, -378}*,{e0db20e0-b5ff-11e0--01687c4831ff, 2, -378}]@1312752159034!-9223372036854775808,000300:false:[{223a4de0-b5fb-11e0--826f85850cbd, 17, 12124}*,{224ceb80-b5fb-11e0--848783ceb9bf, 28, 14097},{e0db20e0-b5ff-11e0--01687c4831ff, 15, 3737}]@1312752159034!-9223372036854775808,000301:false:[{223a4de0-b5fb-11e0--826f85850cbd, 17, -917234}*,{224ceb80-b5fb-11e0--848783ceb9bf, 28, -1148333},{e0db20e0-b5ff-11e0--01687c4831ff, 15, -287859}]@1312752159034!-9223372036854775808,]),]) already has modifications in this mutation: ColumnFamily(PUBLIC_MONTHLY_11 [SuperColumn(31026 [000200:false:[{223a4de0-b5fb-11e0--826f85850cbd, 13, 387}*,{224ceb80-b5fb-11e0--848783ceb9bf, 8, 1991},{e0db20e0-b5ff-11e0--01687c4831ff, 6, 237}]@1312752159034!-9223372036854775808,000201:false:[{223a4de0-b5fb-11e0--826f85850cbd, 13, -31485}*,{224ceb80-b5fb-11e0--848783ceb9bf, 8, -138769},{e0db20e0-b5ff-11e0--01687c4831ff, 6, -18209}]@1312752159034!-9223372036854775808,000300:false:[{223a4de0-b5fb-11e0--826f85850cbd, 2, 8}*,{e0db20e0-b5ff-11e0--01687c4831ff, 2, 8}]@1312752159034!-9223372036854775808,000301:false:[{223a4de0-b5fb-11e0--826f85850cbd, 2, -708}*,{e0db20e0-b5ff-11e0--01687c4831ff, 2, -708}]@1312752159034!-9223372036854775808,]),]) at org.apache.cassandra.db.RowMutation.add(RowMutation.java:123) at org.apache.cassandra.db.CounterMutation.makeReplicationMutation(CounterMutation.java:120) at org.apache.cassandra.service.StorageProxy$5$1.runMayThrow(StorageProxy.java:455) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30) ... 3 more
Re: Replicate on write stage errors
thanks sylvain. I'd ended up finding that issue. and you answered my subsequent questions. Merci Le 8 août 2011 19:32, Sylvain Lebresne sylv...@datastax.com a écrit :
how to verify the row key is evenly distributed
Hi all, I have a CF using incremental integer as row keys. In a 5-node cluster with RandomPartitioner, I've noticed the rows are not assigned evenly across nodes--two of them are 5 times heavier loaded than the rest. In nodetool, I can do *getendpoints keyspace cf key - Print the end points that owns the key* But is there any API I can call programmatically to determine the endpoints on a given set of row keys? -- View this message in context: http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/how-to-verify-the-row-key-is-evenly-distributed-tp6665277p6665277.html Sent from the cassandra-u...@incubator.apache.org mailing list archive at Nabble.com.
Re: Chronologic
This is great news. Thank you Adam and team! I look forward to this gem ... pun intended. :) On Mon, Aug 8, 2011 at 6:54 AM, Adam Keys adamkk...@gmail.com wrote: I've been working on Chronologic for the past several months. I'm doing a presentation on it this weekend at Lone Star Ruby Conference. It will be open source by Sunday 8/14 :). More info on the talk: http://speakerrate.com/talks/7808 -- Salvador Fuentes Jr.
Cannot insert when RF=2
Running: apache-cassandra08-0.8.2 Attempting to use QUORUM reads and writes only works on a keyspace with RF = 1. With RF set to 2 or 3, the write fails and reads return unavailable. These CLI commands will reproduce the issue: create keyspace rftest with strategy_options=[{replication_factor:2}]; use rftest; create column family TestData with comparator = UTF8Type; set TestData[utf8('foo')]['bar'] = 'bad'; Here is my ring: Address DC RackStatus State LoadOwns Token 127605887595351923798765477786913079296 10.200.99.5 datacenter1 rack1 Up Normal 379.48 KB 25.00% 0 10.200.99.6 datacenter1 rack1 Up Normal 387.3 KB25.00% 42535295865117307932921825928971026432 10.200.99.13datacenter1 rack1 Up Normal 369.41 KB 25.00% 85070591730234615865843651857942052864 10.200.99.14datacenter1 rack1 Up Normal 378.17 KB 25.00% 127605887595351923798765477786913079296
Re: Cannot insert when RF=2
CLI defaults to NTS. You need to specify SimpleStrategy if that's what you want. https://issues.apache.org/jira/browse/CASSANDRA-2960 On Mon, Aug 8, 2011 at 3:10 PM, Bret Palsson b...@getjive.com wrote: Running: apache-cassandra08-0.8.2 Attempting to use QUORUM reads and writes only works on a keyspace with RF = 1. With RF set to 2 or 3, the write fails and reads return unavailable. These CLI commands will reproduce the issue: create keyspace rftest with strategy_options=[{replication_factor:2}]; use rftest; create column family TestData with comparator = UTF8Type; set TestData[utf8('foo')]['bar'] = 'bad'; Here is my ring: Address DC Rack Status State Load Owns Token 127605887595351923798765477786913079296 10.200.99.5 datacenter1 rack1 Up Normal 379.48 KB 25.00% 0 10.200.99.6 datacenter1 rack1 Up Normal 387.3 KB 25.00% 42535295865117307932921825928971026432 10.200.99.13 datacenter1 rack1 Up Normal 369.41 KB 25.00% 85070591730234615865843651857942052864 10.200.99.14 datacenter1 rack1 Up Normal 378.17 KB 25.00% 127605887595351923798765477786913079296 -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com
[update] Cannot insert when RF=2
Sorry about that sent the last email a little prematurely. -- Does anyone have a solution or have seen this type of behavior? Running: apache-cassandra08-0.8.2 Attempting to use QUORUM reads and writes only works on a keyspace with = RF =3D 1. With RF set to 2 or 3, the write fails and reads return = unavailable. These CLI commands will reproduce the issue: create keyspace rftest with strategy_options=3D[{replication_factor:2}]; use rftest; create column family TestData with comparator =3D UTF8Type; set TestData[utf8('foo')]['bar'] =3D 'bad'; Here is my ring: Address DC RackStatus State Load= OwnsToken = 127605887595351923798765477786913079296 10.200.99.5 datacenter1 rack1 Up Normal 379.48 KB = 25.00% 0 10.200.99.6 datacenter1 rack1 Up Normal 387.3 KB= 25.00% 42535295865117307932921825928971026432 10.200.99.13datacenter1 rack1 Up Normal 369.41 KB = 25.00% 85070591730234615865843651857942052864 10.200.99.14datacenter1 rack1 Up Normal 378.17 KB = 25.00% 127605887595351923798765477786913079296 cassandra-cli: # cassandra-cli -h cassandra1 Connected to: Jive Core on cassandra1/9160 Welcome to the Cassandra CLI. Type 'help;' or '?' for help. Type 'quit;' or 'exit;' to quit. [default@unknown] use rftest; Authenticated to keyspace: rftest [default@rftest] set TestData[utf8('foo')]['bar'] =3D 'baz'; null [default@rftest]=20 Debug output: Aug 8 14:13:57 DEBUG 14:13:57,691 insert=
Re: Chronologic
Cool! Do post the slides when you're done. On Mon, Aug 8, 2011 at 8:54 AM, Adam Keys adamkk...@gmail.com wrote: I've been working on Chronologic for the past several months. I'm doing a presentation on it this weekend at Lone Star Ruby Conference. It will be open source by Sunday 8/14 :). More info on the talk: http://speakerrate.com/talks/7808 On Aug 6, 2011, at 3:57 AM, Sal Fuentes wrote: Hello Scott, I noticed you had previously posted this snippet: https://gist.github.com/832414 And I was curious to know if there were any plans to open source Chronologic in the future? If so, I think the Cassandra and Ruby communities would thank you for it. :) -- Sal -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com
[RELEASE] Apache Cassandra 0.8.3 released
The Cassandra team is pleased to announce the release of Apache Cassandra version 0.8.3. Cassandra is a highly scalable second-generation distributed database, bringing together Dynamo's fully distributed design and Bigtable's ColumnFamily-based data model. You can read more here: http://cassandra.apache.org/ Downloads of source and binary distributions are listed in our download section: http://cassandra.apache.org/download/ This version is a bug fix release[1]. In particular it fixes a fairly serious regression of 0.8, introduced by a refactoring of the commit log due to counters, by which some commit log segments may be deleted before the totality of the data they contain is fully flushed. Upgrade is by consequence highly recommended, but please always pay close attention to the release notes[2] before upgrading. If you were to encounter any problem, let us know[3]. Have fun! [1]: http://goo.gl/R8H51 (CHANGES.txt) [2]: http://goo.gl/omMtt (NEWS.txt) [3]: https://issues.apache.org/jira/browse/CASSANDRA
Re: Trying to find the problem with a broken pipe
Tim do you know if this is the actual reason that is causing the broken pipe? I'm having a hard time convincing my team that modifying this value will fix the issue. Jonathan, do you know if there is a valid explanation on why Tim no longer has the problem based on this change? Anthony Ikeda On Thu, Aug 4, 2011 at 11:13 PM, Tim Snyder t...@proinnovations.com wrote: I no longer get the error on the loader program. The steps I took to fix it are increasing the thrift_max_message_length_in_mb msg length, stopping cassandra, blowing away the prior data store, and then restarting cassandra. Tim Original Message Subject: Re: Trying to find the problem with a broken pipe From: aaron morton aa...@thelastpickle.com Date: Fri, August 05, 2011 12:58 am To: user@cassandra.apache.org It's probably a network thing. The only thing I can think of in cassandra is thrift_max_message_length_in_mb in the config. That config setting will result in a TException thrown on the server side (i think), not sure if that makes the server kill the socket. I would hope the error returns to the client. Perhaps check the server log. Cheers - Aaron Morton Freelance Cassandra Developer @aaronmorton http://www.thelastpickle.com On 4 Aug 2011, at 23:05, Tim Snyder wrote: I am getting the same problem (Broken Pipe) on a loader program, after about 8 million read, write pairs. I am pushing serialized objects into a column with the program, the object it seems to be doing it on is much larger than the prior objects, so I am wondering if it is possibly a column size streaming issue through the thrift api? I am using Cassandra 0.8.0 and Hector 0.8.0-1 Tim Original Message Subject: Re: Trying to find the problem with a broken pipe From: Anthony Ikeda anthony.ikeda@gmail.com Date: Tue, August 02, 2011 10:43 pm To: user@cassandra.apache.org Very interesting. After the second host goes down do you see me.prettyprint.hector.api.exceptions.HectorException: All host pools marked down. Retry burden pushed out to client? No, the last message is: 2011-08-02 08:43:06,561 INFO [me.prettyprint.cassandra.connection.HConnectionManager] - Client CassandraClientcassandradevrk2:9393-49 released to inactive or dead pool. Closing. Does your client recover after a period of time? The application seems to be fine for now but my concern is the connection pooling as well - I mean do we have one pool or multiple? I'll post to the Hector user group about the pooling because the incident seems so isolated. We also have our infrastructure team looking into the communication between the application server and the cassandra nodes. So far it's still a mystery. On Tue, Aug 2, 2011 at 1:25 PM, Jim Ancona j...@anconafamily.com wrote: On Tue, Aug 2, 2011 at 6:13 PM, Anthony Ikeda anthony.ikeda@gmail.com wrote: The link (which I may be misreading) is http://groups.google.com/group/hector-users/browse_thread/thread/8d7004b6f85a0f2e I hadn't found that one, but I doubt that our issue is related to that. It's only started happening today and happened on 2 occassions (8:43 and 10:21) performing the same function (querying a column family). It seems to be trying to access a connection on one of the servers The client accesses the first node: 2011-08-02 08:43:06,541 ERROR [me.prettyprint.cassandra.connection.HThriftClient] - Could not flush transport (to be expected if the pool is shutting down) in close for client: CassandraClientcassandradevrk1:9393-33 org.apache.thrift.transport.TTransportException: java.net.SocketException: Broken pipe ... 2011-08-02 08:43:06,544 WARN [me.prettyprint.cassandra.connection.HConnectionManager] - Could not fullfill request on this host CassandraClientcassandradevrk1:9393-33 ... 2011-08-02 08:43:06,543 ERROR [me.prettyprint.cassandra.connection.HConnectionManager] - MARK HOST AS DOWN TRIGGERED for host cassandradevrk1(10.130.202.34):9393 2011-08-02 08:43:06,543 ERROR [me.prettyprint.cassandra.connection.HConnectionManager] - Pool state on shutdown: ConcurrentCassandraClientPoolByHost:{cassandradevrk1(10.130.202.34):9393}; IsActive?: true; Active: 1; Blocked: 0; Idle: 15; NumBeforeExhausted: 49 2011-08-02 08:43:06,543 ERROR [me.prettyprint.cassandra.connection.ConcurrentHClientPool] - Shutdown triggered on ConcurrentCassandraClientPoolByHost:{cassandradevrk1(10.130.202.34):9393} 2011-08-02 08:43:06,544 ERROR [me.prettyprint.cassandra.connection.ConcurrentHClientPool] - Shutdown complete on ConcurrentCassandraClientPoolByHost:{cassandradevrk1(10.130.202.34):9393} 2011-08-02 08:43:06,544 INFO [me.prettyprint.cassandra.connection.CassandraHostRetryService] - Host detected as down was added to retry queue: cassandradevrk1(10.130.202.34):9393
5 node cluster - Recommended seed configuration.
We have a 5 node Cassandra cluster. We use version 0.7.4. What is the recommended seed configuration. Here are some configurations, i have noticed. Example 1: --- One node being seed to itself. node1: seeds: node1, autobootstrap=false node2: seeds: node1, node3, autobootstrap=true node3: seeds: node2, node4, autobootstrap=true node4: seeds: node3, node5, autobootstrap=true node5: seeds: node1, node2, autobootstrap=true Example 2: --- node1: seeds: node5,node2, autobootstrap=true node2: seeds: node1, node3, autobootstrap=true node3: seeds: node2, node4, autobootstrap=true node4: seeds: node3, node5, autobootstrap=true node5: seeds: node1, node2, autobootstrap=true Thanks Selva
SOLVED: Bind the JMX port to a specific IP address/interface
Hi, I was following this blog about running multiple nodes on the same host: http://www.onemanclapping.org/2010/03/running-multiple-cassandra-nodes-on.html The main nuisance here was that there is no easy way to specify the host IP address for JMX to bind to, it would always bind to all interfaces. The 'java.rmi.server.hostname' property did not work and I didn't want to pick different ports for all the different instances on the same host. Also, I didn't want to create my own RMIServerSocketFactory with all the complexities associated with it, I was after a simple patch to the existing code. I've fixed this by patching the default JVM RMI socket factory that is responsible for creating this server socket. It now supports the new 'com.sun.management.jmxremote.host' property. To get this to work, save the Java code below into a file named sun/rmi/transport/proxy/RMIDirectSocketFactory.java. Compile and create jmx_patch.jar from it and place it into the cassandra lib/ folder. You then need to add the following line to conf/cassandra-env.sh: JVM_OPTS=$JVM_OPTS -Xbootclasspath/p:../lib/jmx_patch.jar -Dcom.sun.management.jmxremote.host=127.0.0.2 This will then bind the JMX service only to address 127.0.0.2. The 2 other random RMI listening ports will still bind to all interfaces, but that is fine as they always pick a free port anyway. You can now run multiple cassandra instances on a single host with all the default ports intact (e.g. 8080 for JMX for all of them). Cheers, T. === package sun.rmi.transport.proxy; import java.io.IOException; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.rmi.server.RMISocketFactory; public class RMIDirectSocketFactory extends RMISocketFactory { public Socket createSocket(String host, int port) throws IOException { return new Socket(host, port); } public ServerSocket createServerSocket(int port) throws IOException { String jmx_host = System.getProperty(com.sun.management.jmxremote.host); String jmx_port = System.getProperty(com.sun.management.jmxremote.port); // Allow JMX to bind to specific address if (jmx_host != null jmx_port != null port != 0 Integer.toString(port).equals(jmx_port)) { InetAddress[] inetAddresses = InetAddress.getAllByName(jmx_host); if (inetAddresses.length 0) { return new ServerSocket(port, 50, inetAddresses[0]); } } return new ServerSocket(port); } }
Re: 5 node cluster - Recommended seed configuration.
It is recommended that seed list should be same in all server so all server on same state. It should be Lan IP not Loopback IP. In seed node, auto bootstrap should be false 2 seed should be enough. In your case it should be like: node1: seeds: node1, autobootstrap=false node2: seeds: node1,autobootstrap=true node3: seeds: node1, autobootstrap=true node4: seeds: node1, autobootstrap=true node5: seeds: node1, autobootstrap=true or node1: seeds: node1,node2, autobootstrap=false node2: seeds: node1,node2,autobootstrap=false (set it false after bootstrap) node3: seeds: node1,node2, autobootstrap=true node4: seeds: node1, node2,autobootstrap=true node5: seeds: node1,node2, autobootstrap=true /Samal On Tue, Aug 9, 2011 at 9:16 AM, Selva Kumar wwgse...@yahoo.com wrote: We have a 5 node Cassandra cluster. We use version 0.7.4. What is the recommended seed configuration. Here are some configurations, i have noticed. Example 1: --- One node being seed to itself. node1: seeds: node1, autobootstrap=false node2: seeds: node1, node3, autobootstrap=true node3: seeds: node2, node4, autobootstrap=true node4: seeds: node3, node5, autobootstrap=true node5: seeds: node1, node2, autobootstrap=true Example 2: --- node1: seeds: node5,node2, autobootstrap=true node2: seeds: node1, node3, autobootstrap=true node3: seeds: node2, node4, autobootstrap=true node4: seeds: node3, node5, autobootstrap=true node5: seeds: node1, node2, autobootstrap=true Thanks Selva
Enormous counter problem?
Hi, I am not sure if this is a bug or we use the counter the wrong way, but I keep getting a enormous counter number in our deployment. After a few tries, I am finally able to reproduce it. The following are the settings of my development: - I have two-node cluster with the following keyspace and column family settings. Cluster Information: Snitch: org.apache.cassandra.locator.SimpleSnitch Partitioner: org.apache.cassandra.dht.RandomPartitioner Schema versions: 63fda700-c243-11e0--2d03dcafebdf: [172.17.19.151, 172.17.19.152] Keyspace: test: Replication Strategy: org.apache.cassandra.locator.NetworkTopologyStrategy Durable Writes: true Options: [datacenter1:2] Column Families: ColumnFamily: testCounter (Super) APP status information. Key Validation Class: org.apache.cassandra.db.marshal.BytesType Default column value validator: org.apache.cassandra.db.marshal.CounterColumnType Columns sorted by: org.apache.cassandra.db.marshal.BytesType/org.apache.cassandra.db.marshal.BytesType Row cache size / save period in seconds: 0.0/0 Key cache size / save period in seconds: 20.0/14400 Memtable thresholds: 1.1578125/1440/247 (millions of ops/MB/minutes) GC grace seconds: 864000 Compaction min/max thresholds: 4/32 Read repair chance: 1.0 Replicate on write: true Built indexes: [] Then, I use a test program based on hector to add a counter column (testCounter[sc][column]) 1000 times. In the middle the adding process, I intentional shut down the node 172.17.19.152. In addition to that, the test program is smart enough to switch the consistency level from Quorum to One, so that the following adding actions would not fail. After all the adding actions are done, I start the cassandra on 172.17.19.152, and I use cassandra-cli to check if the counter is correct on both nodes, and I got a result 1001 which should be reasonable because hector will retry once. However, when I shut down 172.17.19.151 and after 172.17.19.152 is aware of 172.17.19.151 is down, I try to start the cassandra on 172.17.19.151 again. Then, I check the counter again, this time I got a result 481387 which is so wrong. I was wondering if anyone could explain why this happens, is this a bug or do I use the counter the wrong way?. Regards Boris
Re: 5 node cluster - Recommended seed configuration.
Hi, Rule of thumb, you should identify two servers in the cluster to be your seed nodes. And all the servers should point to these two seeds.. You should bring up the seed nodes first with autobootstrap set to false.. All other nodes should be added to the ring with autobootstrap=true and pointing to the same seed nodes. -indra On Mon, Aug 8, 2011 at 8:46 PM, Selva Kumar wwgse...@yahoo.com wrote: We have a 5 node Cassandra cluster. We use version 0.7.4. What is the recommended seed configuration. Here are some configurations, i have noticed. Example 1: --- One node being seed to itself. node1: seeds: node1, autobootstrap=false node2: seeds: node1, node3, autobootstrap=true node3: seeds: node2, node4, autobootstrap=true node4: seeds: node3, node5, autobootstrap=true node5: seeds: node1, node2, autobootstrap=true Example 2: --- node1: seeds: node5,node2, autobootstrap=true node2: seeds: node1, node3, autobootstrap=true node3: seeds: node2, node4, autobootstrap=true node4: seeds: node3, node5, autobootstrap=true node5: seeds: node1, node2, autobootstrap=true Thanks Selva -- *Indranath Ghosh Phone: 408-813-9207*