Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

10/31/2017

Reading time:2 min

Cassandra Cluster Admin

by John Doe

Cassandra Cluster Admin is a GUI tool to help people administrate their Apache Cassandra cluster.If you're like me and used MySQL for a while (and still using it!), you get used to phpMyAdmin and its simple and easy to use user interface. I thought it would be nice to have a similar tool for Cassandra and I couldn't find any, so I build my own!With Cassandra Cluster Admin, you can create/edit/drop keyspaces and column families, truncate a column family, create secondary indexes, display a row, browse data (get range slice), insert a row and much more!Bug report and/or pull request are always welcome!Screenshots Supported actionsKeyspace manipulation (add/edit/drop)Column Family manipulation (add/edit/truncate/drop)Row manipulation on column family and super column family (insert/edit/remove)Basic data browser to navigate in the data of a column familySupport Cassandra 0.8+ atomic countersSupport management of multiple Cassandra clustersGetting StartedIf you're under Windows, I suggest you install EasyPHP or XAMPP for a quick WAMP setup install.Once your Web server is setup, you copy all the files from the package you've just downloaded into a directory that can be accessed by a Web browser (ex: http://localhost/cassandra-cluster-admin). The server must have PHP installed (5.3+ recommended). Installing the Thrift PHP extension is also a good idea for performance (read "Thrift C extension" section below).All configuration is in include/conf.inc.php:If this Web server is accessible by everyone, you might want to password protect the application, so your data is secure. To do so, you can set CCA_LOGIN_REQUIRED to true and specify your desired username and password by altering CCA_USERNAME and CCA_PASSWORD respectivly.If your Cassandra server is not running on localhost or if you have multiple Cassandra nodes/clusters, you have to alter the $CASSANDRA_CLUSTERS array. This application support multiple Cassandra Cluster so you can alter $CASSANDRA_CLUSTERS accordingly. More info is found in the configuration file about multi cluster configuration.If you want to see JMX stats in Cassandra Cluster Admin, you will need to activate MX4J on all your Casandra nodes you want to see the JMX stats. Once this is done, if MX4J is not running on the default port (8081), you will also need to alter MX4J_HTTP_ADAPTOR_PORT in the configuration file of Cassandra Cluster Admin.Thrift C extensionIf you're in a test environnement or just want to get started with Cassandra, I suggest you skip this step as it's for performance improvement only. No extra feature by installing this.The C extension is crucial for phpcassa's performance.You need to configure and make to be able to use the C extension.cd include/phpcassa/thrift/ext/thrift_protocol phpize ./configure make sudo make install Add the following line to your php.ini file:extension=thrift_protocol.soDisclaimerThis software is still in beta so always be careful when using it on a production cluster. I won't take any responsability if for some reason this tool drops all your keyspaces and wipes all your data, although I really doubt it will happen =)Credits

Illustration Image

Cassandra Cluster Admin is a GUI tool to help people administrate their Apache Cassandra cluster.

If you're like me and used MySQL for a while (and still using it!), you get used to phpMyAdmin and its simple and easy to use user interface. I thought it would be nice to have a similar tool for Cassandra and I couldn't find any, so I build my own!

With Cassandra Cluster Admin, you can create/edit/drop keyspaces and column families, truncate a column family, create secondary indexes, display a row, browse data (get range slice), insert a row and much more!

Bug report and/or pull request are always welcome!

Screenshots

Viewing Keyspaces and Column Families Viewing Cluster Cassandra Cluster Admin Column family Definition and Actions Cassandra Cluster Admin List of Column Families in a Keyspace

Supported actions

  • Keyspace manipulation (add/edit/drop)
  • Column Family manipulation (add/edit/truncate/drop)
  • Row manipulation on column family and super column family (insert/edit/remove)
  • Basic data browser to navigate in the data of a column family
  • Support Cassandra 0.8+ atomic counters
  • Support management of multiple Cassandra clusters

Getting Started

If you're under Windows, I suggest you install EasyPHP or XAMPP for a quick WAMP setup install.

Once your Web server is setup, you copy all the files from the package you've just downloaded into a directory that can be accessed by a Web browser (ex: http://localhost/cassandra-cluster-admin). The server must have PHP installed (5.3+ recommended). Installing the Thrift PHP extension is also a good idea for performance (read "Thrift C extension" section below).

All configuration is in include/conf.inc.php:

If this Web server is accessible by everyone, you might want to password protect the application, so your data is secure. To do so, you can set CCA_LOGIN_REQUIRED to true and specify your desired username and password by altering CCA_USERNAME and CCA_PASSWORD respectivly.

If your Cassandra server is not running on localhost or if you have multiple Cassandra nodes/clusters, you have to alter the $CASSANDRA_CLUSTERS array. This application support multiple Cassandra Cluster so you can alter $CASSANDRA_CLUSTERS accordingly. More info is found in the configuration file about multi cluster configuration.

If you want to see JMX stats in Cassandra Cluster Admin, you will need to activate MX4J on all your Casandra nodes you want to see the JMX stats. Once this is done, if MX4J is not running on the default port (8081), you will also need to alter MX4J_HTTP_ADAPTOR_PORT in the configuration file of Cassandra Cluster Admin.

Thrift C extension

If you're in a test environnement or just want to get started with Cassandra, I suggest you skip this step as it's for performance improvement only. No extra feature by installing this.

The C extension is crucial for phpcassa's performance.

You need to configure and make to be able to use the C extension.

cd include/phpcassa/thrift/ext/thrift_protocol  
phpize  
./configure  
make  
sudo make install  

Add the following line to your php.ini file:

extension=thrift_protocol.so

Disclaimer

This software is still in beta so always be careful when using it on a production cluster. I won't take any responsability if for some reason this tool drops all your keyspaces and wipes all your data, although I really doubt it will happen =)

Credits

Related Articles

cassandra
tools
admin-monitor

Upgrading a Large Cassandra Cluster with cstar | Official Pythian® Blog

Valerie Parham-Thompson

1/27/2021

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

admin-monitor