You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ee...@apache.org on 2010/06/15 21:10:13 UTC
svn commit: r955002 - in /cassandra/trunk:
src/java/org/apache/cassandra/avro/CassandraServer.java
test/system/__init__.py
Author: eevans
Date: Tue Jun 15 19:10:13 2010
New Revision: 955002
URL: http://svn.apache.org/viewvc?rev=955002&view=rev
Log:
fixed NullPointerException in reconciler setup
Patch by eevans
Modified:
cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java
cassandra/trunk/test/system/__init__.py
Modified: cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java?rev=955002&r1=955001&r2=955002&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/avro/CassandraServer.java Tue Jun 15 19:10:13 2010
@@ -53,8 +53,6 @@ import org.apache.cassandra.service.Stor
import static org.apache.cassandra.utils.FBUtilities.UTF8;
import org.apache.cassandra.service.StorageService;
-import org.apache.cassandra.thrift.*;
-import org.apache.thrift.TException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.apache.cassandra.avro.AvroRecordFactory.*;
@@ -511,12 +509,14 @@ public class CassandraServer implements
Collection<CFMetaData> cfDefs = new ArrayList<CFMetaData>((int)ksDef.cf_defs.size());
for (CfDef cfDef : ksDef.cf_defs)
{
- String cfType, compare, subCompare;
+ String cfType, compare, subCompare, reconcilerName;
cfType = cfDef.column_type == null ? D_CF_CFTYPE : cfDef.column_type.toString();
ClockType clockType = ClockType.create(cfDef.clock_type == null ? D_CF_CFCLOCKTYPE : cfDef.clock_type.toString());
compare = cfDef.comparator_type == null ? D_CF_COMPTYPE : cfDef.comparator_type.toString();
subCompare = cfDef.subcomparator_type == null ? D_CF_SUBCOMPTYPE : cfDef.subcomparator_type.toString();
- AbstractReconciler reconciler = DatabaseDescriptor.getReconciler(cfDef.reconciler.toString());
+ reconcilerName = cfDef.reconciler == null ? null : cfDef.reconciler.toString();
+
+ AbstractReconciler reconciler = DatabaseDescriptor.getReconciler(reconcilerName);
if (reconciler == null)
{
if (clockType == ClockType.Timestamp)
Modified: cassandra/trunk/test/system/__init__.py
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/system/__init__.py?rev=955002&r1=955001&r2=955002&view=diff
==============================================================================
--- cassandra/trunk/test/system/__init__.py (original)
+++ cassandra/trunk/test/system/__init__.py Tue Jun 15 19:10:13 2010
@@ -207,6 +207,7 @@ class AvroTester(BaseTester):
'column_type': 'Super',
'comparator_type': 'BytesType',
'subcomparator_type': 'LongType',
+ 'reconciler': '',
'comment': '',
'row_cache_size': 1000,
'preload_row_cache': False,