This documentation is for WSO2 Storage Server 1.0.3. View documentation for the latest release.
Page Comparison - Cassandra Keysapce and Column Family Operations (v.2 vs v.3) - Storage Server 1.0.3 - WSO2 Documentation

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Table of Contents


This sample creates a keyspace with a column family and inserts a given number of rows with random data. It demonstrates how to insert random data into user-specified keyspace, column family and columns.


  • Java Development Kit / JRE version 1.6.* or 1.7.*
  • Apache Maven 3.x.x or later

Building the Sample

You can find the sample discussed here in $CARBON_HOME/samples/css/CLI/css-hector-sample directory.

1. Install and run the WSO2 Storage Server. Refer to the Installation Guide for instructions.

2. In a command prompt, switch to the sample directory:

For example, cd <AS_HOME>\samples\HelloWorldWebapp .

3. From there, execute the following command to build the project with Maven.


mvn clean install

 Optionally, you can build the project with dependency libraries using following maven build command.

Code Block
mvn clean assembly:assembly -o

4. Execute the program from the build jar which is located under target folder

Code Block
java -jar target/org.wso2.carbon.cassandra.examples-4.0.5-jar-with-dependencies.jar

Executing the Sample

Execute the program using the following command.

Code Block
java -jar target/org.wso2.carbon.cassandra.examples-4.0.5-jar-with-dependencies.jar