Category Archives: cassandra

[DEPRECATED] CentOS 6: Install Datastax Cassandra OpsCenter Community Edition

Versions

  • CentOS 6.4
  • Oracle Java JDK 1.6
  • OpsCenter Community 3.0.2

Prerequisites

Install

1. Edit /etc/yum.repos.d/datastax.repo

2. Install Opscenter Free

Configure

Note: by default opscener will only accept connections from 127.0.0.1:8888. This guide won’t change that setting but it can be changed by editing /etc/opscenter/opscenterd.conf

1. Start opscenter:

4. Start cassandra on boot:

Test

1. Reconnect ssh session and tunnel the default opscenter port (8888):

2. Connect to 127.0.0.1:8888 with a browser
3. Click “Use Existing Cluster”
DataStax OpsCenter - Google Chrome_026
4. Enter a seed cluster node hostname or IP
Note: you can enter a new-line separated list of all nodes, but this is unnecessary
DataStax OpsCenter - Google Chrome_027
5. Click “Save cluster”
DataStax OpsCenter - Google Chrome_028

Sources

[DEPRECATED] When WSO2 Data Services Server 3.0.1 and Cassandra 1.1 CQL 2 JDBC driver — doesn’t support BLOB

Attempted to use the following CQL 2 schema with two BLOBs:

With the following DSS configuration:

But received the following error:

[DEPRECATED] WSO2 Data Services Server 3.0.1 doesn’t work with Cassandra CQL 3

WSO2 Data Services Server 3.0.1 comes with support for an unspecified Cassandra version. However, in their documentation they call out 1.1.X. After much frustration and many NullPointerExceptions from WSO2, I discovered that while Cassandra 1.1 supports CQL 3, it defaults to CQL 2 in the JDBC driver. I also noticed that despite general JDBC support in DSS, the Cassandra JDBC driver is bundled with DSS 3.0.1 and appears to have been customized by WSO2 to support specifically Cassandra 1.1 and DSS 3.0.1.

Tonight I attempted to use the Cassandra JDBC 1.2 driver with WSO2 DSS’s support for “generic” JDBC data sources. I was able to get DSS to connect to the Cassandra server, but running even a simple SELECT query failed with a NullPointerException. To meet my current objectives, I’ve rolled back Cassandra to 1.1 to be compatible with WSO2 DSS 3.0.1 and reverted to using CQL 2. This is a bit of a disappointment since CQL 2 doesn’t seem to have any support for leveraging Cassandra’s “schema-free” features that CQL 3 does (map, set, list, etc).

[DEPRECATED] CentOS 6: Install Apache Cassandra using Datastax

Versions

  • CentOS 6.3
  • Oracle Java JDK 1.6
  • Note: if running with WSO2 Data Services Server 3.0.1, only Apache Cassandra 1.1 is supported
  • Apache Cassandra 1.2.3 or 1.1.9
  • JNA 3.5.1

Prerequisites

  • WARNING: Cassandra will fail with no or an erroneous error message if run with openjdk 1.6!
  • Install Oracle JDK

Install

1. Edit /etc/yum.repos.d/datastax.repo

2. Install Cassandra

For Apache Cassandra 1.2.3:

For Apache Cassandra 1.1.9:

3. Install a copy of JNA jar just for Cassandra
Note: JNA from base repo is 3.2.4 while Cassandra requires 3.2.7+

4. Fix permissions

Configure

1. Edit /etc/profile.d/cassandra.sh

2. Load into current session:

3. Edit the following settings in /etc/cassandra/conf/cassandra.yaml:

Note: for more details about configuring and optimizing a multi-node cluster, see sources.

Example:

4. Open ports

  • 7199 for JMX
  • 9160 for Cassandra Thrift
  • 7000 for Cassandra Gossip

See Open a port for iptables

5. Start cassandra:

6. Start cassandra on boot:

Test

Test First Node

Note: only use this test on the first node of the cluster

Enter at cassandra-cli:

Verify:

Test Other Nodes

Output:

See Open a port for iptables

Sources