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 704A97E2F for ; Tue, 4 Oct 2011 15:02:13 +0000 (UTC) Received: (qmail 82805 invoked by uid 500); 4 Oct 2011 15:02:11 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 82776 invoked by uid 500); 4 Oct 2011 15:02:10 -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 82768 invoked by uid 99); 4 Oct 2011 15:02:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2011 15:02:10 +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 (athena.apache.org: domain of jbellis@gmail.com designates 209.85.215.172 as permitted sender) Received: from [209.85.215.172] (HELO mail-ey0-f172.google.com) (209.85.215.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2011 15:02:06 +0000 Received: by eye4 with SMTP id 4so643000eye.31 for ; Tue, 04 Oct 2011 08:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=y7tyX2BBE3FQLB0imyK4MuslVGBWWjwICKt04U7eV5s=; b=GJ04cigk8ZeDZpe3YANWA2foK0RK3ynxFMAksbRfWoao6H3ooNgurFEHAB7VNYHb1m 0INbcOi3LnBMC0V/MJT+vMJlz/lQVyMeOLF5duL6f0+8vUUDU1jgAWZqNAOI8y87DQyz Y7meascmk9BVvWlg1ggc0udKe5tIjdzPK38B0= Received: by 10.213.9.136 with SMTP id l8mr713451ebl.128.1317740505155; Tue, 04 Oct 2011 08:01:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.20.81 with HTTP; Tue, 4 Oct 2011 08:01:25 -0700 (PDT) In-Reply-To: References: From: Jonathan Ellis Date: Tue, 4 Oct 2011 10:01:25 -0500 Message-ID: Subject: Re: How to speed up "Waiting for schema agreement" for a single node Cassandra cluster? To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hmm... Maybe disable compaction, since that can block schema changes. Otherwise the big win will be in https://issues.apache.org/jira/browse/CASSANDRA-1391. On Tue, Oct 4, 2011 at 9:33 AM, Joseph Norton w= rote: > > I didn't consider using truncate because a set of potentially random Colu= mn Families are created dynamically during the test. > > Are there any configuration knobs that could be adjusted for drop + recre= ate? > > thanks in advance, > > - Joe N > > > Joseph Norton > norton@alum.mit.edu > > > > On Oct 4, 2011, at 11:19 PM, Jonathan Ellis wrote: > >> Truncate is faster than drop + recreate. >> >> On Tue, Oct 4, 2011 at 9:15 AM, Joseph Norton wrote: >>> >>> Hello. >>> >>> For unit test purposes, I have a single node Cassandra cluster. =A0I ne= ed to drop and re-create several keyspaces between each test iteration. =A0= This process takes approximately 10 seconds for a single node installation. >>> >>> Can you recommend any tricks or recipes to reduce the time required for= such operations and/or for "Waiting for schema agreement" to complete? >>> >>> regards, >>> >>> - Joe N. >>> >>> >>> >>> >>> $ time ./setupDB.sh >>> Deleteing cassandra keyspaces >>> Connected to: "Foo" on 127.0.0.1/9160 >>> ed9c7fc0-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> ee8c36f0-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> eeb14b20-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> Insert data >>> Creating cassandra keyspaces >>> Connected to: "Foo" on 127.0.0.1/9160 >>> ef1a6d30-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> Authenticated to keyspace: Bars >>> ef4af310-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> ef9bab20-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> efbceec0-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> f00e4310-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> f0589280-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> f0821380-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> f0c44ca0-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> Authenticated to keyspace: Baz >>> f121d5f0-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> f1619e10-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> f18b4620-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> Authenticated to keyspace: Buz >>> f1debd50-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> f20690a0-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> f25043d0-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> f29a1e10-ee91-11e0-0000-534d24a6e7f7 >>> Waiting for schema agreement... >>> ... schemas agree across the cluster >>> Inserting data in cassandra >>> Connected to: "Foo" on 127.0.0.1/9160 >>> Authenticated to keyspace: Boo >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> Value inserted. >>> >>> real =A0 =A00m9.554s >>> user =A0 =A00m2.729s >>> sys =A0 =A0 0m0.194s >>> >>> >>> Joseph Norton >>> norton@alum.mit.edu >>> >>> >>> >>> >> >> >> >> -- >> Jonathan Ellis >> Project Chair, Apache Cassandra >> co-founder of DataStax, the source for professional Cassandra support >> http://www.datastax.com > > --=20 Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com