Return-Path: Delivered-To: apmail-incubator-cassandra-commits-archive@minotaur.apache.org Received: (qmail 67290 invoked from network); 27 Mar 2009 02:45:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Mar 2009 02:45:33 -0000 Received: (qmail 36858 invoked by uid 500); 27 Mar 2009 02:45:33 -0000 Delivered-To: apmail-incubator-cassandra-commits-archive@incubator.apache.org Received: (qmail 36837 invoked by uid 500); 27 Mar 2009 02:45:33 -0000 Mailing-List: contact cassandra-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cassandra-dev@incubator.apache.org Delivered-To: mailing list cassandra-commits@incubator.apache.org Received: (qmail 36826 invoked by uid 99); 27 Mar 2009 02:45:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Mar 2009 02:45:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Mar 2009 02:45:32 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 769EA238887D; Fri, 27 Mar 2009 02:45:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r759003 - /incubator/cassandra/trunk/src/org/apache/cassandra/config/DatabaseDescriptor.java Date: Fri, 27 Mar 2009 02:45:12 -0000 To: cassandra-commits@incubator.apache.org From: jbellis@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090327024512.769EA238887D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jbellis Date: Fri Mar 27 02:45:12 2009 New Revision: 759003 URL: http://svn.apache.org/viewvc?rev=759003&view=rev Log: add error checking of CF names for people migrating old-style configurations Modified: incubator/cassandra/trunk/src/org/apache/cassandra/config/DatabaseDescriptor.java Modified: incubator/cassandra/trunk/src/org/apache/cassandra/config/DatabaseDescriptor.java URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/config/DatabaseDescriptor.java?rev=759003&r1=759002&r2=759003&view=diff ============================================================================== --- incubator/cassandra/trunk/src/org/apache/cassandra/config/DatabaseDescriptor.java (original) +++ incubator/cassandra/trunk/src/org/apache/cassandra/config/DatabaseDescriptor.java Fri Mar 27 02:45:12 2009 @@ -119,7 +119,7 @@ // the path qualified config file (storage-conf.xml) name private static String configFileName_; - + static { try @@ -336,6 +336,10 @@ { Node columnFamily = columnFamilies.item(j); String cName = XMLUtils.getAttributeValue(columnFamily, "Name"); + if (cName == null) + { + throw new IllegalArgumentException("ColumnFamily element missing Name attribute: " + columnFamily); + } String xqlCF = xqlTable + "ColumnFamily[@Name='" + cName + "']/"; /* squirrel away the application column families */ @@ -407,10 +411,11 @@ seeds_.add( seeds[i] ); } } - catch (Exception e) { + catch (Exception e) + { throw new RuntimeException(e); } - + try { storeMetadata(); @@ -420,7 +425,6 @@ throw new RuntimeException(e); } } - /* * Create the metadata tables. This table has information about @@ -463,6 +467,8 @@ } } + + public static String getHashingStrategy() { return hashingStrategy_;