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 AC634B293 for ; Wed, 18 Jan 2012 08:28:00 +0000 (UTC) Received: (qmail 94329 invoked by uid 500); 18 Jan 2012 08:27:58 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 93694 invoked by uid 500); 18 Jan 2012 08:27:46 -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 91220 invoked by uid 99); 18 Jan 2012 08:27:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jan 2012 08:27:36 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a54.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jan 2012 08:27:29 +0000 Received: from homiemail-a54.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a54.g.dreamhost.com (Postfix) with ESMTP id B2DA53A4074 for ; Wed, 18 Jan 2012 00:27:08 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=qubKh6Ov2u A+y28gtx0J8yTDNAshUurWE5e7pXu27UF4blQj8xfDvviaJI7JCgtPeLWzoc5qkR A3uTzx4VYfg8zhj5uDgqtij5L6KJONekSum+qZdLJMEO0vvzRy4OApD1RY4/96+J zvgquQGi016dm8Fl9t+6sRCDrWNB1/Qp0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=ZNmTsMtbY8A2YXw7 P9K3EFLsW40=; b=JXvcN/wXuc1g/T4IoBZGZQRLmrnG9vyMqmrDyvyOPTn/W8B6 ODn/lwGq/51VyhCFkiRqjD7PFRubVkljFEJeRwjMD6+XbQMHwj/tyTsc7eKhQv3B uoZArSiu0wdNNFk+10oMImn6QWBmgvzQMW1Ld4eIuLzZr6009zFuKS3tdWM= Received: from [172.16.1.4] (125-236-193-159.adsl.xtra.co.nz [125.236.193.159]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a54.g.dreamhost.com (Postfix) with ESMTPSA id E8BF83A4065 for ; Wed, 18 Jan 2012 00:27:07 -0800 (PST) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: multipart/alternative; boundary="Apple-Mail=_F7FACF62-1CC6-4C9D-B876-41D562B9E4CA" Subject: Re: specifying initial cassandra schema Date: Wed, 18 Jan 2012 21:27:04 +1300 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: <53BA03CA-FE22-405C-BFC3-4ED224E7938F@thelastpickle.com> X-Mailer: Apple Mail (2.1251.1) --Apple-Mail=_F7FACF62-1CC6-4C9D-B876-41D562B9E4CA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 check the command line help for cassandra-cli, you can pass it a file = name.=20 e.g. cassandra --host localhost --file schema.txt Cheers ----------------- Aaron Morton Freelance Developer @aaronmorton http://www.thelastpickle.com On 18/01/2012, at 9:35 AM, Carlos P=E9rez Miguel wrote: > Hi Ramesh >=20 > You can use the schematool command. I am using it for the same > purposes in Cassandra 0.7.9. >=20 > I use the following line in my cassandra startup script: >=20 > $CASSANDRA_HOME/bin/schematool HOSTNAME 8080 import >=20 > where HOSTNAME is the hostname of your test machine. It will import > the schema from your cassandra.yaml file. > If you execute it and there is already a schema in the cassandra > cluster, you'll get a exception from schematool but no impact to the > cluster. >=20 > Bye >=20 > Carlos P=E9rez Miguel >=20 >=20 >=20 > 2012/1/17 Ramesh Natarajan : >> I usually start cassandra and then use cassandra-cli to import a >> schema. Is there any automated way to load a fixed schema when >> cassandra starts automatically? >>=20 >> I have a test setup where i run cassandra on a single node. I have a >> OS image packaged with cassandra and it automatically starts = cassandra >> as a part of OS boot up. >>=20 >> I saw some old references to specify schema in cassandra.yaml. Is >> this still supported in Cassandra 1.x? Are there any examples? >>=20 >> thanks >> Ramesh --Apple-Mail=_F7FACF62-1CC6-4C9D-B876-41D562B9E4CA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 check = the command line help for cassandra-cli, you can pass it a file = name. 

e.g. cassandra --host localhost --file = schema.txt

Cheers

http://www.thelastpickle.com

On 18/01/2012, at 9:35 AM, Carlos P=E9rez Miguel = wrote:

Hi Ramesh

You can use the schematool command. = I am using it for the same
purposes in Cassandra 0.7.9.

I use = the following line in my cassandra startup = script:

$CASSANDRA_HOME/bin/schematool HOSTNAME 8080 = import

where HOSTNAME is the hostname of your test machine. It = will import
the schema from your cassandra.yaml file.
If you = execute it and there is already a schema in the cassandra
cluster, = you'll get a exception from schematool but no impact to = the
cluster.

Bye

Carlos P=E9rez = Miguel



2012/1/17 Ramesh Natarajan <ramesh25@gmail.com>:
I usually start cassandra and then use cassandra-cli = to import a
schema.   Is = there any  automated way to load a fixed schema = when
cassandra starts = automatically?

I have a test = setup where i run cassandra on a single node. I have = a
OS image packaged with = cassandra and it automatically starts = cassandra
as a part of OS boot = up.

I saw some old references to specify schema in = cassandra.yaml.  Is
this = still supported in Cassandra 1.x?  Are there any = examples?

thanks
Ramesh

= --Apple-Mail=_F7FACF62-1CC6-4C9D-B876-41D562B9E4CA--