Re: atomicity
Thanks a lot, Peter. K. - Original Message From: Peter Schuller peter.schul...@infidyne.com To: user@cassandra.apache.org Sent: Mon, 20 December, 2010 12:05:17 AM Subject: Re: atomicity Say I have two processes on separate machines, and a Cassandra cluster over several machines. If the first process writes (insert) to a column while the second process reads (get / get_slice / get_range_slices / others?) from that column (say the consistency level is QUORUM if that makes a difference), is the write atomic, or could the second process get corrupt (half-written) data? What if Cassandra is not a cluster, but runs on a single machine? I'm currently using version 0.6.3, but the question is general. You will never see an in-between value of a single column. You'd either see the old value or the new value. However, given a batch mutation will multiple changes in it your readers may see the results of said batch mutation being partially applied; so there is no snapshot consistency type semantics with respect to multiple values in a batch mutation. -- / Peter Schuller
Re: Cassandra Monitoring
How / what are you monitoring? Best practices someone? I recently set up monitoring using the cassandra-munin-plugins (https://github.com/jamesgolick/cassandra-munin-plugins). However, due to various little details that wasn't too fun to integrate properly with munin-node-configure and automated configuration management. A problem is also the starting of a JVM for each use of jmxquery, which can become a problem with many column families. I like your web server idea. Something persistent that can sit there and do the JMX acrobatics, and expose something more easily consumed for stuff like munin/zabbix/etc. It would be pretty nice to have that out of the box with Cassandra, though I expect that would be considered bloat. :) -- / Peter Schuller
Re: Cassandra Monitoring
mx4j? https://issues.apache.org/jira/browse/CASSANDRA-1068 On Sun, Dec 19, 2010 at 8:36 AM, Peter Schuller peter.schul...@infidyne.com wrote: How / what are you monitoring? Best practices someone? I recently set up monitoring using the cassandra-munin-plugins (https://github.com/jamesgolick/cassandra-munin-plugins). However, due to various little details that wasn't too fun to integrate properly with munin-node-configure and automated configuration management. A problem is also the starting of a JVM for each use of jmxquery, which can become a problem with many column families. I like your web server idea. Something persistent that can sit there and do the JMX acrobatics, and expose something more easily consumed for stuff like munin/zabbix/etc. It would be pretty nice to have that out of the box with Cassandra, though I expect that would be considered bloat. :) -- / Peter Schuller -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com
Re: Cassandra Monitoring
FYI, I just added an mx4j section to the bottom of this page http://wiki.apache.org/cassandra/Operations On Sun, Dec 19, 2010 at 4:30 PM, Jonathan Ellis jbel...@gmail.com wrote: mx4j? https://issues.apache.org/jira/browse/CASSANDRA-1068 On Sun, Dec 19, 2010 at 8:36 AM, Peter Schuller peter.schul...@infidyne.com wrote: How / what are you monitoring? Best practices someone? I recently set up monitoring using the cassandra-munin-plugins (https://github.com/jamesgolick/cassandra-munin-plugins). However, due to various little details that wasn't too fun to integrate properly with munin-node-configure and automated configuration management. A problem is also the starting of a JVM for each use of jmxquery, which can become a problem with many column families. I like your web server idea. Something persistent that can sit there and do the JMX acrobatics, and expose something more easily consumed for stuff like munin/zabbix/etc. It would be pretty nice to have that out of the box with Cassandra, though I expect that would be considered bloat. :) -- / Peter Schuller -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com -- /Ran
Cassandra not able to listen to incoming commands from PHPcassa
Hi I am using Cassandra 0.7 with PHPcassa on windows. I run the cassandra server from command prompt and then run my php script which include the phpcassa files, but my cassandra does not respond to the phpcassa calls. I get errors like phpcassa could not connect to cassandra server. My cassandra server runs fine on command prompt and im able to do some small interactions through cassandra-cli. I have also imported the schema beforehand using schematool from command prompt, but phpcassa could not connect to cassandra server. Please let me know how can I fix this..It has been really frustrating since past 3 days Thanks in advance.. -- ___ Raj
Re: Cassandra Monitoring
How does mx4j compare with the earlier jmx-to-rest bridge listed in the operations page: JMX-to-REST bridge available at http://code.google.com/p/polarrose-jmx-rest-bridge; Thanks Dave Viner On Sun, Dec 19, 2010 at 7:01 AM, Ran Tavory ran...@gmail.com wrote: FYI, I just added an mx4j section to the bottom of this page http://wiki.apache.org/cassandra/Operations On Sun, Dec 19, 2010 at 4:30 PM, Jonathan Ellis jbel...@gmail.com wrote: mx4j? https://issues.apache.org/jira/browse/CASSANDRA-1068 On Sun, Dec 19, 2010 at 8:36 AM, Peter Schuller peter.schul...@infidyne.com wrote: How / what are you monitoring? Best practices someone? I recently set up monitoring using the cassandra-munin-plugins (https://github.com/jamesgolick/cassandra-munin-plugins). However, due to various little details that wasn't too fun to integrate properly with munin-node-configure and automated configuration management. A problem is also the starting of a JVM for each use of jmxquery, which can become a problem with many column families. I like your web server idea. Something persistent that can sit there and do the JMX acrobatics, and expose something more easily consumed for stuff like munin/zabbix/etc. It would be pretty nice to have that out of the box with Cassandra, though I expect that would be considered bloat. :) -- / Peter Schuller -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com -- /Ran
Re: unsubscribe
On Sat, 2010-12-18 at 23:56 +0200, Dorin Dragutoiu wrote: http://goo.gl/xbyF2 -- Eric Evans eev...@rackspace.com
Re: Cassandra Monitoring
I'm currently working to configure AppDynamics to monitor cassandra. It does byte-code instrumentation, so there is an agent added to the cassandra JVM, which gives the ability to capture latency for requests and see where the bottleneck is coming from. We have been using it on our other Java apps. They have a free version to try it out. It doesn't track thrift calls out of the box, but I'm encouraging AD to figure out a way to do that, and working on a config for capturing the entry points in the meantime. The way the page cache works is that pages stay in memory linked to a specific file. If you delete that file, the pages are all considered invalid at that point, so get zero'ed out and go to the start of the free list. So compaction creates a new file first (which is competing with existing read traffic to try and keep its pages in memory) then removes the old files that were being merged, so at that point there is a supply of blank pages, but disk reads will be needed to warm up the cache again. The use case that I'm working with is more like a persistent memcached replacement, so we are trying to have more RAM than data on m2.4xl EC2 instances (~70GB) and keep all reads in memory all the time. Adrian On 12/19/10 5:36 AM, Peter Schuller peter.schul...@infidyne.com wrote: How / what are you monitoring? Best practices someone? I recently set up monitoring using the cassandra-munin-plugins (https://github.com/jamesgolick/cassandra-munin-plugins). However, due to various little details that wasn't too fun to integrate properly with munin-node-configure and automated configuration management. A problem is also the starting of a JVM for each use of jmxquery, which can become a problem with many column families. I like your web server idea. Something persistent that can sit there and do the JMX acrobatics, and expose something more easily consumed for stuff like munin/zabbix/etc. It would be pretty nice to have that out of the box with Cassandra, though I expect that would be considered bloat. :) -- / Peter Schuller
Re: Problem in using PHPcassa: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server'
I've not used the PHP client, but you can test connectivity to your cluster using the cassandra-cli command line client in the bin/ folder. Also check the ThriftAddress setting in your storage-config, this address is the one that the server will be listening on. Set it to 0.0.0.0 to listen on all. Aaron On 19/12/2010, at 8:45 AM, Rajkumar Gupta rajkumar@gmail.com wrote: Hi, I am trying to use phpcassa(Hoan's) with Cassandra 0.6.8 but when I try to run the following php script that includes phpcassa, ?php $GLOBALS['THRIFT_ROOT'] = 'Z:/wamp/bin/php/include/thrift/'; require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php'; include_once('Z:/wamp/bin/php/include/phpcassa.php'); include_once('Z:/wamp/bin/php/include/uuid.php'); CassandraConn::add_node('192.168.1.1', 9160); $users = new CassandraCF('Keyspace1', 'Users'); $users-insert('1', array('email' = 'hoan.tont...@gmail.com', 'password' = 'test')); ? on running above script I get this error: Fatal error: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server' in Z:\wamp\bin\php\include\phpcassa.php:70 Stack trace: #0 Z:\wamp\bin\php\include\phpcassa.php(193): CassandraConn::get_client() #1 Z:\wamp\www\PhpProject\index.php(38): CassandraCF-insert('1', Array) #2 {main} thrown in Z:\wamp\bin\php\include\phpcassa.php on line 70 Please let me know how can I make it work Thanks... --
Re: Problem in using PHPcassa: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server'
Forgot to say, 0.0.0.0 is not a good idea in production... http://wiki.apache.org/cassandra/FAQ#cant_listen_on_ip_any On 20/12/2010, at 9:12 AM, Aaron Morton aa...@thelastpickle.com wrote: I've not used the PHP client, but you can test connectivity to your cluster using the cassandra-cli command line client in the bin/ folder. Also check the ThriftAddress setting in your storage-config, this address is the one that the server will be listening on. Set it to 0.0.0.0 to listen on all. Aaron On 19/12/2010, at 8:45 AM, Rajkumar Gupta rajkumar@gmail.com wrote: Hi, I am trying to use phpcassa(Hoan's) with Cassandra 0.6.8 but when I try to run the following php script that includes phpcassa, ?php $GLOBALS['THRIFT_ROOT'] = 'Z:/wamp/bin/php/include/thrift/'; require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php'; include_once('Z:/wamp/bin/php/include/phpcassa.php'); include_once('Z:/wamp/bin/php/include/uuid.php'); CassandraConn::add_node('192.168.1.1', 9160); $users = new CassandraCF('Keyspace1', 'Users'); $users-insert('1', array('email' = 'hoan.tont...@gmail.com', 'password' = 'test')); ? on running above script I get this error: Fatal error: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server' in Z:\wamp\bin\php\include\phpcassa.php:70 Stack trace: #0 Z:\wamp\bin\php\include\phpcassa.php(193): CassandraConn::get_client() #1 Z:\wamp\www\PhpProject\index.php(38): CassandraCF-insert('1', Array) #2 {main} thrown in Z:\wamp\bin\php\include\phpcassa.php on line 70 Please let me know how can I make it work Thanks... --
Re: Installing Cassandra on windows
glad that helped, about the other issue i wont be able to assist you, im using cassandra on C# with thrift directly, might be some missconfiguration in your client Nicolas Santini On Fri, Dec 17, 2010 at 6:09 PM, Rajkumar Gupta rajkumar@gmail.comwrote: Thanks a ton Nicolas! This helped..its working now :) Can you also tell me where to keep the cassandra folder with phpcassa to use it with wamp server.. Thanks for your great help!! Regards Rajkumar On Fri, Dec 17, 2010 at 2:31 AM, Nick Santini nick.sant...@kaseya.comwrote: just tried my self seems to be that you are not starting the cassandra process first the cli is only to access it, not to start it execute cassandra first Nicolas Santini On Fri, Dec 17, 2010 at 9:55 AM, Rajkumar Gupta rajkumar@gmail.comwrote: yes I tried to connect through: *cassandra-cli -host localhost -9160* It gave me the error *java.net.connection exception: Connection refused* but still says: Welcome to Cassandra CLI. When I try to see the name of cluster by show, it says not connected to a cassandra instance On Fri, Dec 17, 2010 at 2:12 AM, Nick Bailey n...@riptano.com wrote: You are trying to connect through cassandra-cli? Does the cassandra log indicate it started correctly? Can you hit port 9160 (telnet localhost 9160)? On Thu, Dec 16, 2010 at 2:34 PM, Rajkumar Gupta rajkumar@gmail.com wrote: Hi there, I am trying to install Cassandra on windows.. I have downloaded the files and when I try to connect to the cassandra through command prompt I get an error: *java.net connection exception: Connection refused *I have set the environment variables properly pointed to my JDK installation. -- ___ Rajkumar Gupta Dihing 173, Indian Institute of Technology Guwahati India -- _ --
Re: Cassandra not able to listen to incoming commands from PHPcassa
Sounds like you're not connecting to the right ip/port. On Sun, Dec 19, 2010 at 10:10 AM, Rajkumar Gupta rajkumar@gmail.comwrote: Hi I am using Cassandra 0.7 with PHPcassa on windows. I run the cassandra server from command prompt and then run my php script which include the phpcassa files, but my cassandra does not respond to the phpcassa calls. I get errors like phpcassa could not connect to cassandra server. My cassandra server runs fine on command prompt and im able to do some small interactions through cassandra-cli. I have also imported the schema beforehand using schematool from command prompt, but phpcassa could not connect to cassandra server. Please let me know how can I fix this..It has been really frustrating since past 3 days Thanks in advance.. -- ___ Raj -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com
Re: Cassandra Monitoring
Can you share the code for run_column_family_stores.sh ? On Sun, Dec 19, 2010 at 6:14 PM, Edward Capriolo edlinuxg...@gmail.comwrote: On Sun, Dec 19, 2010 at 2:01 PM, Ran Tavory ran...@gmail.com wrote: Mx4j is in process, same jvm, you just need to throw mx4j-tools.jar in the lib before you start Cassandra jmx-to-rest runs in a separate jvm. It also has a nice useful HTML interface that you can look into any running host. On Sunday, December 19, 2010, Dave Viner davevi...@gmail.com wrote: How does mx4j compare with the earlier jmx-to-rest bridge listed in the operations page: JMX-to-REST bridge available at http://code.google.com/p/polarrose-jmx-rest-bridge; ThanksDave Viner On Sun, Dec 19, 2010 at 7:01 AM, Ran Tavory ran...@gmail.com wrote: FYI, I just added an mx4j section to the bottom of this page http://wiki.apache.org/cassandra/Operations On Sun, Dec 19, 2010 at 4:30 PM, Jonathan Ellis jbel...@gmail.com wrote: mx4j? https://issues.apache.org/jira/browse/CASSANDRA-1068 On Sun, Dec 19, 2010 at 8:36 AM, Peter Schuller peter.schul...@infidyne.com wrote: How / what are you monitoring? Best practices someone? I recently set up monitoring using the cassandra-munin-plugins (https://github.com/jamesgolick/cassandra-munin-plugins). However, due to various little details that wasn't too fun to integrate properly with munin-node-configure and automated configuration management. A problem is also the starting of a JVM for each use of jmxquery, which can become a problem with many column families. I like your web server idea. Something persistent that can sit there and do the JMX acrobatics, and expose something more easily consumed for stuff like munin/zabbix/etc. It would be pretty nice to have that out of the box with Cassandra, though I expect that would be considered bloat. :) -- / Peter Schuller -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of Riptano, the source for professional Cassandra support http://riptano.com -- /Ran -- /Ran There is a lot of overhead on your monitoring station to kick up so many JMX connections. There can also be nat/hostname problems for remote JMX. My solution is to execute JMX over nagios remote plugin executor (NRPE). command[run_column_family_stores]=/usr/lib64/nagios/plugins/run_column_family_stores.sh $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ Maybe not as fancy as a rest-jmx bridge, but solves most of the RMI issues involved in pulling stats over JMX,
Re: Problem in using PHPcassa: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server'
I am able to connect to cassandra through cassandra-cli command at command prompt but not through my php script. I also checked after changing the rpc address to 0.0.0.0 in cassandra.yaml file but it still does not work! On Mon, Dec 20, 2010 at 1:47 AM, Aaron Morton aa...@thelastpickle.com wrote: Forgot to say, 0.0.0.0 is not a good idea in production... http://wiki.apache.org/cassandra/FAQ#cant_listen_on_ip_any On 20/12/2010, at 9:12 AM, Aaron Morton aa...@thelastpickle.com wrote: I've not used the PHP client, but you can test connectivity to your cluster using the cassandra-cli command line client in the bin/ folder. Also check the ThriftAddress setting in your storage-config, this address is the one that the server will be listening on. Set it to 0.0.0.0 to listen on all. Aaron On 19/12/2010, at 8:45 AM, Rajkumar Gupta rajkumar@gmail.com wrote: Hi, I am trying to use phpcassa(Hoan's) with Cassandra 0.6.8 but when I try to run the following php script that includes phpcassa, ?php $GLOBALS['THRIFT_ROOT'] = 'Z:/wamp/bin/php/include/thrift/'; require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php'; include_once('Z:/wamp/bin/php/include/phpcassa.php'); include_once('Z:/wamp/bin/php/include/uuid.php'); CassandraConn::add_node('192.168.1.1', 9160); $users = new CassandraCF('Keyspace1', 'Users'); $users-insert('1', array('email' = 'hoan.tont...@gmail.com', 'password' = 'test')); ? on running above script I get this error: Fatal error: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server' in Z:\wamp\bin\php\include\phpcassa.php:70 Stack trace: #0 Z:\wamp\bin\php\include\phpcassa.php(193): CassandraConn::get_client() #1 Z:\wamp\www\PhpProject\index.php(38): CassandraCF-insert('1', Array) #2 {main} thrown in Z:\wamp\bin\php\include\phpcassa.php on line 70 Please let me know how can I make it work Thanks... -- -- ___ Rajkumar Gupta Dihing 173, Indian Institute of Technology Guwahati India http://in.linkedin.com/in/rajkumargupta1
Re: Problem in using PHPcassa: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server'
It would probably help if you posted the code you are trying to use from your php script. I don't know much about the php client but I now someone on this list does. On Sun, Dec 19, 2010 at 10:55 PM, Rajkumar Gupta rajkumar@gmail.comwrote: I am able to connect to cassandra through cassandra-cli command at command prompt but not through my php script. I also checked after changing the rpc address to 0.0.0.0 in cassandra.yaml file but it still does not work! On Mon, Dec 20, 2010 at 1:47 AM, Aaron Morton aa...@thelastpickle.com wrote: Forgot to say, 0.0.0.0 is not a good idea in production... http://wiki.apache.org/cassandra/FAQ#cant_listen_on_ip_any On 20/12/2010, at 9:12 AM, Aaron Morton aa...@thelastpickle.com wrote: I've not used the PHP client, but you can test connectivity to your cluster using the cassandra-cli command line client in the bin/ folder. Also check the ThriftAddress setting in your storage-config, this address is the one that the server will be listening on. Set it to 0.0.0.0 to listen on all. Aaron On 19/12/2010, at 8:45 AM, Rajkumar Gupta rajkumar@gmail.com wrote: Hi, I am trying to use phpcassa(Hoan's) with Cassandra 0.6.8 but when I try to run the following php script that includes phpcassa, ?php $GLOBALS['THRIFT_ROOT'] = 'Z:/wamp/bin/php/include/thrift/'; require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php'; require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php'; require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php'; include_once('Z:/wamp/bin/php/include/phpcassa.php'); include_once('Z:/wamp/bin/php/include/uuid.php'); CassandraConn::add_node('192.168.1.1', 9160); $users = new CassandraCF('Keyspace1', 'Users'); $users-insert('1', array('email' = 'hoan.tont...@gmail.com', 'password' = 'test')); ? on running above script I get this error: Fatal error: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server' in Z:\wamp\bin\php\include\phpcassa.php:70 Stack trace: #0 Z:\wamp\bin\php\include\phpcassa.php(193): CassandraConn::get_client() #1 Z:\wamp\www\PhpProject\index.php(38): CassandraCF-insert('1', Array) #2 {main} thrown in Z:\wamp\bin\php\include\phpcassa.php on line 70 Please let me know how can I make it work Thanks... -- -- ___ Rajkumar Gupta Dihing 173, Indian Institute of Technology Guwahati India http://in.linkedin.com/in/rajkumargupta1