Skip to content
Example cassandra application, written in Java using Hector.
Java Shell
Find file
Pull request Compare This branch is 5 commits ahead of pmcfadin:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
src
.gitignore
README.md
create-database-cli.txt
pom.xml
setup.cql

README.md

Example application for "Building a Cassandra Application from Scratch" talk at Cassandra 2012

This is a simple example application to demonstrate some of the techiques of creating a Cassandra based application. This example is written in Java and uses the Hector library for connectivity.

Database setup

To setup the database, run the creation script using the cassandra-cli using the following format:

cassandra-cli -host localhost -port 9160 -f create-database-cli.txt

cqlsh -k Killrvideo -3 < setup.cql

Stubbed methods

There are a few methods that have been stubbed-out for you to implement if you would like to try your hand at Cassandra application code. If you just want to see the completed code, a solutions branch will be made available soon.

The stubbed methods are:

getUser
setVideoWithUserIndex
getComments
getRating
getVideoLastStopEvent
getCommentsOnTimeSlice

Something went wrong with that request. Please try again.