Simple usage of Cassandra driver on Java for CRUD operation
- JDK >= 1.7
- Maven
- Cassandra
-
Resolve maven dependency
$ mvn dependency:copy-dependencies
-
Build
jar
using mavenmvn
$ mvn package
Run Twitter
from the generated jar
in target
folder
$ java -cp target/dependency/*:target/cassandra-twitter-1.0.jar com.edmundophie.cassandra.Twitter <host> <replication_strategy> <replication_factor>
Note that parameter host
, replication_strategy
, and replication_factor
are optional. If any of them are not provided then they will be set to each own default value
Default value:
host
:127.0.0.1
replication_strategy
:SimpleStrategy
replication_factor
:1
List of command available in the application:
register <username> <password>
follow <follower_username> <followed_username>
addtweet <username> <tweet>
viewtweet <username>
timeline <username>
exit
- Edmund Ophie/ 13512095
- Kevin/ 13512097