Permalink
Browse files

bug fixes found during backwards compatibility tests

  • Loading branch information...
1 parent a63db36 commit 3ebfcc4c5d559c2e57fe7923fea5d70d701f5a36 @nehanarkhede nehanarkhede committed Jun 13, 2010
View
@@ -15,6 +15,7 @@ Joshua Tuberville
Kirk True
Michael R. Head
Mike Frost
+Neha Narkhede
Padraig O'Sullivan
Paul Lindner
Rob Adams
@@ -3,6 +3,7 @@
import java.util.List;
import voldemort.VoldemortException;
+import voldemort.serialization.DefaultSerializerFactory;
import voldemort.serialization.SerializerFactory;
import voldemort.server.StoreRepository;
import voldemort.server.VoldemortConfig;
@@ -41,6 +42,8 @@ public void close() {}
throw new VoldemortException("View \"" + name + "\" has a target store \"" + targetName
+ "\" which does not exist.");
SerializerFactory factory = def.getSerializerFactory();
+ if(factory == null)
+ factory = new DefaultSerializerFactory();
/* Check if the values in the target store are compressed */
CompressionStrategy valueCompressionStrategy = null;
if(targetDef.getValueSerializer().hasCompression()) {
@@ -50,7 +53,8 @@ public void close() {}
return new ViewStorageEngine(name,
target,
factory.getSerializer(def.getValueSerializer()),
- factory.getSerializer(def.getTransformsSerializer()),
+ def.getTransformsSerializer() != null ? factory.getSerializer(def.getTransformsSerializer())
+ : null,
factory.getSerializer(targetDef.getKeySerializer()),
factory.getSerializer(targetDef.getValueSerializer()),
valueCompressionStrategy,
@@ -44,7 +44,6 @@
import voldemort.client.RoutingTier;
import voldemort.routing.RoutingStrategyType;
import voldemort.serialization.Compression;
-import voldemort.serialization.DefaultSerializerFactory;
import voldemort.serialization.SerializerDefinition;
import voldemort.serialization.SerializerFactory;
import voldemort.store.StoreDefinition;
@@ -220,7 +219,7 @@ private StoreDefinition readView(Element store, List<StoreDefinition> stores) {
STORE_PREFERRED_WRITES_ELMT,
target.getRequiredReads());
- SerializerFactory viewSerializerFactory = new DefaultSerializerFactory();
+ SerializerFactory viewSerializerFactory = null;
if(store.getChildText(VIEW_SERIALIZER_FACTORY_ELMT) != null) {
String serializerFactoryName = store.getChild(VIEW_SERIALIZER_FACTORY_ELMT).getText();
viewSerializerFactory = loadSerializerFactory(serializerFactoryName);

0 comments on commit 3ebfcc4

Please sign in to comment.