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 AEF3C7E8C for ; Thu, 22 Sep 2011 06:34:28 +0000 (UTC) Received: (qmail 25115 invoked by uid 500); 22 Sep 2011 06:34:26 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 25072 invoked by uid 500); 22 Sep 2011 06:34:26 -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 25062 invoked by uid 99); 22 Sep 2011 06:34:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Sep 2011 06:34:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of watanabe.maki@gmail.com designates 209.85.214.44 as permitted sender) Received: from [209.85.214.44] (HELO mail-bw0-f44.google.com) (209.85.214.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Sep 2011 06:34:18 +0000 Received: by bkaq10 with SMTP id q10so2514623bka.31 for ; Wed, 21 Sep 2011 23:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=l2Zu38bIWEs+VS8TAu+Wxg+z6Hg07bCEwdGF0qAAPio=; b=YHHemyUpqKhGUcKLL7p83vzg4ryrE6K7nKci4fZX3/e4YhpXRTsrT7OX+iuw+4C1YI w8CFI8iWPwWx4tJGj1tnNtgYUfma5ZPji2gMDSg358vaAGcgRH525K/9Q4OJsRQ7ObFJ fUUna6AYpu4OeZ8DZ584rVUGkMr20ltXD3zMs= MIME-Version: 1.0 Received: by 10.204.7.92 with SMTP id c28mr1225546bkc.68.1316673238262; Wed, 21 Sep 2011 23:33:58 -0700 (PDT) Received: by 10.204.156.139 with HTTP; Wed, 21 Sep 2011 23:33:58 -0700 (PDT) In-Reply-To: References: Date: Thu, 22 Sep 2011 15:33:58 +0900 Message-ID: Subject: Re: Cassandra yaml configuration From: Maki Watanabe To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org The book is a bit out dated now. You should better to use cassandra-cli to define your application schema. Please refer to conf/schema-sample.txt and help in cassandra-cli. % cassandra-cli [default@unknown] help; [default@unknown] help create keyspace; [default@unknown] help create column family; You can load schema defined in text file by cassandra-cli: % cassandra-cli -h host -p port --file your-schema-definition.txt maki 2011/9/22 Sajith Kariyawasam : > Hi all, > Im refering to the book authored by Eben Hewitt, named Cassandra The > Definitive Guide > > There, in the Sample Application chapter (Chapter 4), example 4.1, a samp= le > schema is given in a file named "cassandra.yaml". (I have mentioned it > below) > I'm=A0using Cassandra 0.8.6 version. > My question is that, whether the given format of the file is correct? if = so, > where i have to mention in the cassandra configuration to load this yaml > file? > because the format of the sample schema =A0comes with Cassandra > (conf/schema-sample.txt) is bit different from the sample given in the bo= ok. > > Schema definition in cassandra.yaml > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > keyspaces: > - name: Hotelier > replica_placement_strategy: org.apache.cassandra.locator.RackUnawareStrat= egy > replication_factor: 1 > column_families: > - name: Hotel > compare_with: UTF8Type > - name: HotelByCity > compare_with: UTF8Type > - name: Guest > compare_with: BytesType > - name: Reservation > compare_with: TimeUUIDType > - name: PointOfInterest > column_type: Super > compare_with: UTF8Type > compare_subcolumns_with: UTF8Type > - name: Room > compare_with: BytesType > compare_subcolumns_with: BytesType > - name: RoomAvailability > column_type: Super > compare_with: BytesType > compare_subcolumns_with: BytesType > > -- > Best Regards > Sajith > --=20 w3m