usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject [27/33] usergrid git commit: Initial UniqueValueSerialization conversion to CQL.
Date Wed, 11 May 2016 05:46:20 GMT
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0c609878/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/migration/AbstractMvccEntityDataMigrationV1ToV3ImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/migration/AbstractMvccEntityDataMigrationV1ToV3ImplTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/migration/AbstractMvccEntityDataMigrationV1ToV3ImplTest.java
index 9be979b..046aaf5 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/migration/AbstractMvccEntityDataMigrationV1ToV3ImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/migration/AbstractMvccEntityDataMigrationV1ToV3ImplTest.java
@@ -22,6 +22,7 @@ package org.apache.usergrid.persistence.collection.serialization.impl.migration;
 
 import java.util.UUID;
 
+import com.datastax.driver.core.Session;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -87,6 +88,8 @@ public abstract class AbstractMvccEntityDataMigrationV1ToV3ImplTest
     @Inject
     public Keyspace keyspace;
     @Inject
+    public Session session;
+    @Inject
     public VersionedMigrationSet<MvccEntitySerializationStrategy> allVersions;
     @Inject
     public MvccEntitySerializationStrategyV3Impl mvccEntitySerializationStrategyV3;
@@ -148,7 +151,7 @@ public abstract class AbstractMvccEntityDataMigrationV1ToV3ImplTest
         assertEquals( "Same instance for to", v3Impl.getClass(), tuple.to.getClass() );
 
 
-        MvccEntityDataMigrationImpl mvccEntityDataMigrationImpl = new MvccEntityDataMigrationImpl(keyspace,
allVersions, mvccEntitySerializationStrategyV3, uniqueValueSerializationStrategy,  mvccLogEntrySerializationStrategy,
migrationProvider);
+        MvccEntityDataMigrationImpl mvccEntityDataMigrationImpl = new MvccEntityDataMigrationImpl(keyspace,
session, allVersions, mvccEntitySerializationStrategyV3, uniqueValueSerializationStrategy,
 mvccLogEntrySerializationStrategy, migrationProvider);
 
 
         //now migration

http://git-wip-us.apache.org/repos/asf/usergrid/blob/0c609878/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/datastax/impl/DataStaxClusterImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/datastax/impl/DataStaxClusterImpl.java
b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/datastax/impl/DataStaxClusterImpl.java
index 34cfec8..c7b736f 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/datastax/impl/DataStaxClusterImpl.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/datastax/impl/DataStaxClusterImpl.java
@@ -46,6 +46,9 @@ public class DataStaxClusterImpl implements DataStaxCluster {
         this.cassandraFig = cassandraFig;
         this.cluster = buildCluster();
 
+        // always initialize the keyspaces
+        this.createOrUpdateKeyspace();
+
         logger.info("Initialized datastax cluster client. Hosts={}, Idle Timeout={}s,  Pool
Timeout={}s",
             cluster.getMetadata().getAllHosts().toString(),
             cluster.getConfiguration().getPoolingOptions().getIdleTimeoutSeconds(),


Mime
View raw message