Showing posts with label Column. Show all posts
Showing posts with label Column. Show all posts

Monday, 21 May 2012

Cassandra and Hector #1

Hector and Andromache
by Giorgio de Chirico, 1917
Galleria Nazionale d'Arte Moderna
Rome, Italy, Oil on canvas
Following the previous post on Apache Cassandra, this one will serve as a step-by-step beginner's guide to Hector; a Java API for accessing the Cassandra Key-Value Store. [It is assumed that you have already installed Cassandra, version 1.1.0.]. We will learn how to create a Keyspace and a Column Family, how to register data and retrieve values given their key.

Thrift

Thrift is a client API to the Cassandra database. Thrift is a low-level API not intended to be used directly by developers unless they need to build their own library for accessing Cassandra (for example for a not-supported programming language). In this tutorial we'll be using Hector - a high-level API for Java; but before that we need to install Thrift. For that download version 0.8.0 from http://thrift.apache.org/download/ or from the terminal:

Thursday, 17 May 2012

Cassandra - The Legend

According to the myth, Cassandra, the daughter of Priam - king of Troy - and Hecuba, was asked by the god Apollo for her love and devotion. Cassandra had resorted to giving divination as a freelancer after a long period in unemployment. Her decline to Apollo's proposal provoked the god's wrath who cursed her to have a bad lot as a prophet; her divination would not be believed any longer. A long period of frustration followed; but Cassandra was cunning and along with some native Americans, the Apache, they built a Key-Value store called after their names... That's more or less how Apache Cassandra was created.