sebgiroux / Cassandra-Cluster-Admin

Manage your Cassandra cluster in your Web browser!
http://www.wajam.com
MIT License
206 stars 66 forks source link

[Feature request] CCA working with some cluster nodes down #11

Closed wildstray closed 12 years ago

wildstray commented 12 years ago

I'm deploying a Cassandra cluster and using CCA I noticed that it works perfectly with all cluster nodes up. In case of some nodes down operations with CCA works in a intermittent manner (and JMX view cease to works at all expecially if the first node of the cluster is down). I solved with some modifications to CCA and phpcassa, using ConnectionPool instead of ConnectionWrapper for instantiating SystemManager, and don't using getRandomNode anymore. In JMX view I added node selection (the condition of JMX unreacheble could be due to missing mx4j as like as node down).

I'd like to submit a pull request regarding the code I modified, but I'm in trouble with the structure of the code... phpcassa is included in Cassandra Cluster Admin. But phpcassa is a standalone repository. And I forked it and made a change to SystemManager() class. So... how to manage this situation? Is it possibile to link phpcassa into a directory of CCA? Or it would be better to drop entirely phpcassa from CCA? (PS: Usually I use Google Code, I'm a newbe on github, thanks in advance for your support)

sebgiroux commented 12 years ago

Good idea!

You can just paste your phpcassa mods into the phpcassa folder of the CCA project. I'm using a totally unmodified version of phpcassa. Then you can pull reuquest me all these mods :)

Thank you!

wildstray commented 12 years ago

Ok Sébastien, I'll do in this manner. I asked it because I'm corcerned about phpcassa updates: it will be an hand labor to sync the repositories.

sebgiroux commented 12 years ago

Yep, I understand your concern. The problem also is that phpcassa is currently in a major refactoring, so probably that some CCA code will need to change to use the new phpcassa. In the mean time, I think this fix is important enough to commit it like that for now :)