cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r898809 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
Date Wed, 13 Jan 2010 15:51:10 GMT
Author: jbellis
Date: Wed Jan 13 15:51:09 2010
New Revision: 898809

URL: http://svn.apache.org/viewvc?rev=898809&view=rev
Log:
include cf/keyspace name in sstable2json NPEs.  patch by jbellis

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=898809&r1=898808&r2=898809&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
(original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
Wed Jan 13 15:51:09 2010
@@ -939,7 +939,10 @@
     public static AbstractType getComparator(String tableName, String cfName)
     {
         assert tableName != null;
-        return getCFMetaData(tableName, cfName).comparator;
+        CFMetaData cfmd = getCFMetaData(tableName, cfName);
+        if (cfmd == null)
+            throw new NullPointerException("Unknown ColumnFamily " + cfName + " in keyspace
" + tableName);
+        return cfmd.comparator;
     }
 
     public static AbstractType getSubComparator(String tableName, String cfName)



Mime
View raw message