From user-return-17300-apmail-cassandra-user-archive=cassandra.apache.org@cassandra.apache.org Fri Jun 3 16:36:26 2011 Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AFB4C6AA3 for ; Fri, 3 Jun 2011 16:36:26 +0000 (UTC) Received: (qmail 3065 invoked by uid 500); 3 Jun 2011 16:36:24 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 3047 invoked by uid 500); 3 Jun 2011 16:36:24 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 3035 invoked by uid 99); 3 Jun 2011 16:36:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2011 16:36:24 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_FONT_FACE_BAD,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of robertj@promedicalinc.com designates 97.66.157.146 as permitted sender) Received: from [97.66.157.146] (HELO zixvpm01.promedicalinc.com) (97.66.157.146) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Jun 2011 16:36:19 +0000 Received: from zixvpm01.promedicalinc.com (ZixVPM [127.0.0.1]) by Outbound.promedicalinc.com (Proprietary) with ESMTP id C763F19D80BA for ; Fri, 3 Jun 2011 11:50:24 -0400 (EDT) Received: from mail.promedicalinc.com (mail.promedicalinc.com [97.66.157.136]) by zixvpm01.promedicalinc.com (Proprietary) with ESMTP id 9651A19D80B9 for ; Fri, 3 Jun 2011 11:50:23 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.promedicalinc.com (Postfix) with ESMTP id 256BF19F6014 for ; Fri, 3 Jun 2011 12:36:54 -0400 (EDT) X-Virus-Scanned: amavisd-new at promedicalinc.com Received: from mail.promedicalinc.com ([127.0.0.1]) by localhost (mail.promedicalinc.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1bhgYkRBX9n2 for ; Fri, 3 Jun 2011 12:36:51 -0400 (EDT) Received: from mail.promedicalinc.com (mail.promedicalinc.com [97.66.157.136]) by mail.promedicalinc.com (Postfix) with ESMTP id A4FBE19F6012 for ; Fri, 3 Jun 2011 12:36:51 -0400 (EDT) Date: Fri, 03 Jun 2011 12:36:51 -0400 (EDT) From: Robert Jackson To: user@cassandra.apache.org Subject: Re: Loading Keyspace from YAML in 0.8 Message-ID: In-Reply-To: <152DDA3B-CAA9-41AC-AD0F-27DB64E8EFE6@gmail.com> Content-Type: multipart/alternative; boundary="=_8c9ae063-60c3-4b89-9803-042f988dad28" MIME-Version: 1.0 X-Originating-IP: [192.168.100.110] X-Mailer: Zimbra 7.0.1_GA_3105 (ZimbraWebClient - SAF3 (Mac)/7.0.1_GA_3105) --=_8c9ae063-60c3-4b89-9803-042f988dad28 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: http://www.datastax.com/docs/0.8/cli/using_cli Robert Jackson ----- Original Message ----- From: "Jeremy Hanna" 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 . 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 --=_8c9ae063-60c3-4b89-9803-042f988dad28 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <= div style=3D'font-family: Times New Roman; font-size: 12pt; color: #000000'= >Enter the cli with:

bin/cassandra-cli --host localho= st
<= br>
Then execute the commands to create the keyspaces and column families you= need:

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


<= /div>See the DataStax documentation for more info:

http://www.datastax.com/docs/0.8/cli/using_cli

Robert Jackson


From: "Jeremy Han= na" <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 s= cript 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. &nb= sp;You just pass it to the cli with -f <file.txt>.

On Jun 3, 2= 011, 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 s= eed node. This node installs the schema using StorageService.instance.loadK= eyspacesFromYAML(). 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/paul= loy


--=_8c9ae063-60c3-4b89-9803-042f988dad28--