Skip to content
boneill42 edited this page Feb 7, 2012 · 4 revisions

Virgil is a services layer and GUI on top of Cassandra.

Goals

  1. Make Pig/Hadoop on Cassandra accessible via REST
  2. Provide a slick GUI that allows you to inspect and manipulate data via a browser
  3. Provide a REST interface for the majority of Cassandra's functions

Stay in Touch

Join the following Google Groups:

Getting Started

  1. Download the server

  2. Start the server by running:

    bin/virgil -host CASSANDRA_HOST

  3. This uses the log4j.xml file from the conf directory, which logs to log/virgil.log.

  4. Open http://localhost:8080/ to access the UI.

  5. Use the following curl commands to test it out.

Usage

REST Commands

Create Keyspace (playground)

curl -X PUT http://localhost:8080/virgil/data/playground/

Create Column Family (toys)

curl -X PUT http://localhost:8080/virgil/data/playground/toys/

Set a Row (rowkey = "swingset", columns [ foo:1, bar:22 ])

curl -X PUT http://localhost:8080/virgil/data/playground/toys/swingset -d "{\"foo\":\"1\",\"bar\":\"33\"}"

Update a Row (rowkey = "swingset", columns [ foo:1, bar:22 ])

Updates columns with new values or adds columns if they don't exist.

curl -X PATCH http://localhost:8080/virgil/data/playground/toys/swingset -d "{\"foo\":\"3\",\"erg\":\"42\"}"

Fetch Row (rowkey = "swingset")

curl -X GET http://localhost:8080/virgil/data/playground/toys/swingset/

Insert Column (rowkey = "swingset", columns [ snaf:lisa ])

curl -X PUT http://localhost:8080/virgil/data/playground/toys/swingset/snaf -d "lisa"

Delete Column (rowkey = "swingset")

curl -X DELETE http://localhost:8080/virgil/data/playground/toys/swingset/snaf

Delete Row

curl -X DELETE http://localhost:8080/virgil/data/playground/toys/swingset/

Delete Column Family

curl -X DELETE http://localhost:8080/virgil/data/playground/toys/

Delete Keyspace

curl -X DELETE http://localhost:8080/virgil/data/playground/