add error checking of CF names for people migrating old-style configurations

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@759003 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Ellis 2009-03-27 02:45:12 +00:00
parent 09bc045e26
commit 76f3302753
1 changed files with 10 additions and 4 deletions

View File

@ -119,7 +119,7 @@ public class DatabaseDescriptor
// the path qualified config file (storage-conf.xml) name
private static String configFileName_;
static
{
try
@ -336,6 +336,10 @@ public class DatabaseDescriptor
{
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 @@ public class DatabaseDescriptor
seeds_.add( seeds[i] );
}
}
catch (Exception e) {
catch (Exception e)
{
throw new RuntimeException(e);
}
try
{
storeMetadata();
@ -420,7 +425,6 @@ public class DatabaseDescriptor
throw new RuntimeException(e);
}
}
/*
* Create the metadata tables. This table has information about
@ -463,6 +467,8 @@ public class DatabaseDescriptor
}
}
public static String getHashingStrategy()
{
return hashingStrategy_;