-
Notifications
You must be signed in to change notification settings - Fork 56
Building Cassandra
ATTENTION: Please note that the verified version of this package is currently using an older version of log4j which has the security vulnerabilities. Please see here for more details.
Apache Cassandra is a scalable and fault-tolerant distributed NoSQL database with support for column indexes and denormalized collections. The stable release of Cassandra has been built and tested on Linux on z Systems.
The following build instructions have been tested with Cassandra 2.0.14 on Linux on z Systems with IBM Java 1.7.
Note: This recipe is specific to IBM Java 1.7 and thus cannot be used with OpenJDK.
Please refer to the Cassandra documentation for building with alternative JVMs.
Note: When following the steps below please use a standard permission user unless otherwise specified.
-
Install the pre-requisite packages:
RHEL 7 # use sudo yum remove <package-name> to remove openjdk if installed. sudo yum install java-1.7.1-ibm.s390x, libstdc++.s390x, libstdc++-devel.s390x SLES 12 # use sudo zypper remove <package-name> to remove openjdk if installed. sudo zypper install java-1_7_1-ibm java-1_7_1-ibm-devel java-1_7_1-ibm-jdbc libstdc++-staticThe unit tests for Cassandra 2.0.14 work best with Apache Ant(TM) version 1.9.2. If this version is not available on the system, install the binaries using these commands:
wget http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.2-bin.tar.gz tar -xvf apache-ant-1.9.2-bin.tar.gz cd apache-ant-1.9.2 export ANT_HOME=`pwd` cd bin export PATH=$PATH:`pwd` -
Get the Cassandra 2.0.14 source code from the Apache mirror, and unpack the files.
wget http://archive.apache.org/dist/cassandra/2.0.14/apache-cassandra-2.0.14-src.tar.gz tar -xvf apache-cassandra-2.0.14-src.tar.gz cd apache-cassandra-2.0.14-src -
Patch the code to make it work correctly with IBM Java.
wget https://raw.githubusercontent.com/linux-on-ibm-z/docs/master/patches/cassandra-2.0.14-ibm-java.patch patch -p1 < cassandra-2.0.14-ibm-java.patch -
Download the latest version of Snappy-Java and replace the original Snappy-Java JAR file in the lib folder with the new one:
wget http://search.maven.org/remotecontent?filepath=org/xerial/snappy/snappy-java/1.1.2/snappy-java-1.1.2.jar rm ./lib/snappy-java-1.0.5.jar mv snappy-java-1.1.2.jar ./lib/ -
Build Cassandra:
antThe Cassandra JAR file is available under the bin folder.
-
(Optional) Run the unit tests:
ant test
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.