-
Notifications
You must be signed in to change notification settings - Fork 56
Building Cassandra
The following build instructions have been tested on Linux on z System with IBM Java 1.7
The following are the steps to build Cassandra 2.0.14 from source 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 JVM's.
NOTE: When following the steps below please use a standard permission user unless otherwise specified.
-
Download the requirements
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 the version is not available on the system, install the binaries using the command:
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`Cassandra also requires Snappy Java. The next step is to build Snappy Java as a jar with IBM JDK.
-
Get the Cassandra source from the Apache mirror. 2.0.14 is the current most stable release.
wget http://archive.apache.org/dist/cassandra/2.0.14/apache-cassandra-2.0.14-src.tar.gz -
Extract and apply patch.
tar -xvf apache-cassandra-2.0.14-src.tar.gz cd apache-cassandra-2.0.14-src # apply the patch. 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 # replace the original Snappy jar in the source and copy over the IBM compatible jar into the lib folder. rm ./lib/snappy-java-1.0.5.jar cp snappy-java-<version>-SNAPSHOT.jar ./lib -
Build Cassandra
antThe Cassandra jar is available under the bin folder.
-
Run the unit test.
cd apache-cassandra-2.0.14-src 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.