Enter the cli with:

bin/cassandra-cli --host localhost

Then execute the commands to create the keyspaces and column families you need:

create keyspace Twitter with
  placement_strategy = 'org.apache.cassandra.locator.LocalStrategy' AND
  strategy_options = [{replication_factor:1}];
use Twitter;
create column family Users with comparator = 'UTF8Type';
create column family UserAudits with comparator = 'UTF8Type';

See the DataStax documentation for more info:


Robert Jackson

From: "Jeremy Hanna" <jeremy.hanna1234@gmail.com>
To: user@cassandra.apache.org
Sent: Friday, June 3, 2011 12:17:06 PM
Subject: Re: Loading Keyspace from YAML in 0.8

In 0.8 (and 0.7) you can have a script that you create that you can run on the CLI that creates your schema.  We create something like a ddl file and run it on a new cluster.  You just pass it to the cli with -f <file.txt>.

On Jun 3, 2011, at 11:14 AM, Paul Loy wrote:

> We embed cassandra in our app. When we first load a cluster, we specify one node in the cluster as the seed node. This node installs the schema using StorageService.instance.loadKeyspacesFromYAML(). This call has disappeared in 0.8.
> How can we do the same thing in Cassandra 0.8?
> Thanks,
> --
> ---------------------------------------------
> Paul Loy
> paul@keteracel.com
> http://uk.linkedin.com/in/paulloy