usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject [25/38] usergrid git commit: Move CassandraConfig out of astyanax package.
Date Wed, 17 Aug 2016 21:48:32 GMT
Move CassandraConfig out of astyanax package.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/f28abda0
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/f28abda0
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/f28abda0

Branch: refs/heads/master
Commit: f28abda041378884999e665e1af073e24557f953
Parents: 190e519
Author: Michael Russo <mrusso@apigee.com>
Authored: Sun May 1 17:43:20 2016 +0800
Committer: Michael Russo <mrusso@apigee.com>
Committed: Sun May 1 17:43:20 2016 +0800

----------------------------------------------------------------------
 .../impl/ScopedCacheSerializationImpl.java      |   1 +
 .../mvcc/stage/write/WriteUniqueVerify.java     |   2 +-
 .../mvcc/stage/write/WriteUniqueVerifyTest.java |   2 +-
 .../persistence/core/CassandraConfig.java       |  77 +++++++++++
 .../persistence/core/CassandraConfigImpl.java   | 136 ++++++++++++++++++
 .../core/astyanax/CassandraClusterImpl.java     |   1 +
 .../core/astyanax/CassandraConfig.java          |  77 -----------
 .../core/astyanax/CassandraConfigImpl.java      | 137 -------------------
 .../persistence/core/guice/CommonModule.java    |   2 +
 .../core/astyanax/ColumnNameIteratorTest.java   |   1 +
 .../MultiKeyColumnNameIteratorTest.java         |   1 +
 .../astyanax/MultiRowColumnIteratorTest.java    |   1 +
 .../impl/EdgeMetadataSerializationV1Impl.java   |   2 +-
 .../impl/EdgeMetadataSerializationV2Impl.java   |   2 +-
 .../impl/EdgeSerializationImpl.java             |   2 +-
 .../impl/NodeSerializationImpl.java             |   2 +-
 .../shard/impl/EdgeShardSerializationImpl.java  |   4 +-
 .../impl/ShardedEdgeSerializationImpl.java      |   2 +-
 .../map/impl/MapSerializationImpl.java          |   2 +-
 19 files changed, 229 insertions(+), 225 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
b/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
index f8dcccc..1334650 100644
--- a/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
+++ b/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
@@ -29,6 +29,7 @@ import com.google.common.base.Preconditions;
 import com.google.common.hash.Funnel;
 import com.google.inject.Inject;
 import org.apache.usergrid.persistence.cache.CacheScope;
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.astyanax.*;
 import org.apache.usergrid.persistence.core.datastax.CQLUtils;
 import org.apache.usergrid.persistence.core.datastax.TableDefinition;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
index d05f838..585c26e 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerify.java
@@ -35,7 +35,7 @@ import org.apache.usergrid.persistence.collection.serialization.UniqueValue;
 import org.apache.usergrid.persistence.collection.serialization.UniqueValueSerializationStrategy;
 import org.apache.usergrid.persistence.collection.serialization.UniqueValueSet;
 import org.apache.usergrid.persistence.collection.serialization.impl.UniqueValueImpl;
-import org.apache.usergrid.persistence.core.astyanax.CassandraConfig;
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
 import org.apache.usergrid.persistence.model.entity.Entity;
 import org.apache.usergrid.persistence.model.entity.Id;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerifyTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerifyTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerifyTest.java
index b9a1565..09876fb 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerifyTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteUniqueVerifyTest.java
@@ -27,7 +27,7 @@ import org.apache.usergrid.persistence.collection.guice.TestCollectionModule;
 import org.apache.usergrid.persistence.collection.mvcc.stage.CollectionIoEvent;
 import org.apache.usergrid.persistence.collection.serialization.SerializationFig;
 import org.apache.usergrid.persistence.collection.serialization.UniqueValueSerializationStrategy;
-import org.apache.usergrid.persistence.core.astyanax.CassandraConfig;
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.guice.MigrationManagerRule;
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
 import org.apache.usergrid.persistence.core.test.ITRunner;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfig.java
b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfig.java
new file mode 100644
index 0000000..595b65f
--- /dev/null
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfig.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.usergrid.persistence.core;
+
+
+import com.netflix.astyanax.model.ConsistencyLevel;
+
+
+/**
+ *
+ * Wraps our fig configuration since it doesn't support enums yet.  Once enums are supported,
remove this wrapper and
+ * replace with the fig configuration itself
+ *
+ */
+public interface CassandraConfig {
+
+    /**
+     * Get the currently configured ReadCL
+     * @return
+     */
+    ConsistencyLevel getReadCL();
+
+    /**
+     * Get the currently configured ReadCL that is more consitent than getAstyanaxReadCL
+     * @return
+     */
+    ConsistencyLevel getConsistentReadCL();
+
+    /**
+     * Get the currently configured write CL
+     * @return
+     */
+    ConsistencyLevel getWriteCL();
+
+
+    /**
+     * Get the currently configured read CL for DataStax driver
+     * @return
+     */
+    com.datastax.driver.core.ConsistencyLevel getDataStaxReadCl();
+
+    /**
+     * Get the currently configured write CL for DataStax driver
+     * @return
+     */
+    com.datastax.driver.core.ConsistencyLevel getDataStaxWriteCl();
+
+    /**
+     * Get the currently configured consistent read CL for DataStax driver
+     * @return
+     */
+    com.datastax.driver.core.ConsistencyLevel getDataStaxReadConsistentCl();
+
+    /**
+     * Return the number of shards that has been set in the property file
+     * @return
+     */
+    int[] getShardSettings();
+
+
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfigImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfigImpl.java
b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfigImpl.java
new file mode 100644
index 0000000..5dbf162
--- /dev/null
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfigImpl.java
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.usergrid.persistence.core;
+
+
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import com.netflix.astyanax.model.ConsistencyLevel;
+
+
+/**
+ *  Simple configuration to wrap GuicyFig until it supports enums.  Need to be removed once
it does
+ *
+ */
+@Singleton
+public class CassandraConfigImpl implements CassandraConfig {
+
+
+    private ConsistencyLevel readCl;
+    private ConsistencyLevel writeCl;
+    private int[] shardSettings;
+    private ConsistencyLevel consistentCl;
+
+    // DataStax driver's CL
+    private com.datastax.driver.core.ConsistencyLevel dataStaxReadCl;
+    private com.datastax.driver.core.ConsistencyLevel dataStaxWriteCl;
+    private com.datastax.driver.core.ConsistencyLevel dataStaxReadConsistentCl;
+
+
+
+    @Inject
+    public CassandraConfigImpl( final CassandraFig cassandraFig ) {
+
+        this.readCl = ConsistencyLevel.valueOf( cassandraFig.getAstyanaxReadCL() );
+
+        this.writeCl = ConsistencyLevel.valueOf( cassandraFig.getAstyanaxWriteCL() );
+
+        this.shardSettings = parseShardSettings( cassandraFig.getShardValues() );
+
+        this.consistentCl = ConsistencyLevel.valueOf(cassandraFig.getAstyanaxConsistentReadCL());
+
+        this.dataStaxReadCl = com.datastax.driver.core.ConsistencyLevel.valueOf( cassandraFig.getReadCl());
+
+        this.dataStaxReadConsistentCl = com.datastax.driver.core.ConsistencyLevel.valueOf(
cassandraFig.getReadCl());
+
+        this.dataStaxWriteCl = com.datastax.driver.core.ConsistencyLevel.valueOf( cassandraFig.getWriteCl()
);
+
+        //add the listeners to update the values
+        cassandraFig.addPropertyChangeListener( new PropertyChangeListener() {
+            @Override
+            public void propertyChange( final PropertyChangeEvent evt ) {
+                final String propName = evt.getPropertyName();
+
+                if ( CassandraFig.ASTYANAX_READ_CL.equals( propName ) ) {
+                    readCl = ConsistencyLevel.valueOf( evt.getNewValue().toString() );
+                }
+
+                else if ( CassandraFig.ASTYANAX_WRITE_CL.equals( propName ) ) {
+                    writeCl = ConsistencyLevel.valueOf( evt.getNewValue().toString() );
+                }
+                else if (CassandraFig.SHARD_VALUES.equals(propName)){
+                    shardSettings = parseShardSettings( cassandraFig.getShardValues() );
+                }
+            }
+        } );
+    }
+
+
+    @Override
+    public ConsistencyLevel getReadCL() {
+        return readCl;
+    }
+
+    @Override
+    public ConsistencyLevel getConsistentReadCL() {
+        return consistentCl;
+    }
+
+    @Override
+    public ConsistencyLevel getWriteCL() {
+        return writeCl;
+    }
+
+    @Override
+    public com.datastax.driver.core.ConsistencyLevel getDataStaxReadCl() {
+        return dataStaxReadCl;
+    }
+
+    @Override
+    public com.datastax.driver.core.ConsistencyLevel getDataStaxWriteCl() {
+        return dataStaxWriteCl;
+    }
+
+    @Override
+    public com.datastax.driver.core.ConsistencyLevel getDataStaxReadConsistentCl() {
+        return dataStaxReadConsistentCl;
+    }
+
+
+    @Override
+    public int[] getShardSettings() {
+      return shardSettings;
+    }
+
+    private int[] parseShardSettings(final String value){
+        final String[] shardHistory = value.split( "," );
+
+        int[] settings = new int [shardHistory.length];
+
+        for(int i = 0; i < shardHistory.length; i ++){
+            settings[i] = Integer.parseInt( shardHistory[i] );
+        }
+
+      return settings;
+    }
+}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraClusterImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraClusterImpl.java
b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraClusterImpl.java
index 06fadfc..9f5d4ac 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraClusterImpl.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraClusterImpl.java
@@ -36,6 +36,7 @@ import com.netflix.astyanax.connectionpool.impl.SimpleAuthenticationCredentials;
 import com.netflix.astyanax.connectionpool.impl.Slf4jConnectionPoolMonitorImpl;
 import com.netflix.astyanax.impl.AstyanaxConfigurationImpl;
 import com.netflix.astyanax.thrift.ThriftFamilyFactory;
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.CassandraFig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraConfig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraConfig.java
b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraConfig.java
deleted file mode 100644
index 8cb96ac..0000000
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraConfig.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.usergrid.persistence.core.astyanax;
-
-
-import com.netflix.astyanax.model.ConsistencyLevel;
-
-
-/**
- *
- * Wraps our fig configuration since it doesn't support enums yet.  Once enums are supported,
remove this wrapper and
- * replace with the fig configuration itself
- *
- */
-public interface CassandraConfig {
-
-    /**
-     * Get the currently configured ReadCL
-     * @return
-     */
-    ConsistencyLevel getReadCL();
-
-    /**
-     * Get the currently configured ReadCL that is more consitent than getAstyanaxReadCL
-     * @return
-     */
-    ConsistencyLevel getConsistentReadCL();
-
-    /**
-     * Get the currently configured write CL
-     * @return
-     */
-    ConsistencyLevel getWriteCL();
-
-
-    /**
-     * Get the currently configured read CL for DataStax driver
-     * @return
-     */
-    com.datastax.driver.core.ConsistencyLevel getDataStaxReadCl();
-
-    /**
-     * Get the currently configured write CL for DataStax driver
-     * @return
-     */
-    com.datastax.driver.core.ConsistencyLevel getDataStaxWriteCl();
-
-    /**
-     * Get the currently configured consistent read CL for DataStax driver
-     * @return
-     */
-    com.datastax.driver.core.ConsistencyLevel getDataStaxReadConsistentCl();
-
-    /**
-     * Return the number of shards that has been set in the property file
-     * @return
-     */
-    int[] getShardSettings();
-
-
-}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraConfigImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraConfigImpl.java
b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraConfigImpl.java
deleted file mode 100644
index 0135c95..0000000
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/astyanax/CassandraConfigImpl.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.usergrid.persistence.core.astyanax;
-
-
-import java.beans.PropertyChangeEvent;
-import java.beans.PropertyChangeListener;
-
-
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-import com.netflix.astyanax.model.ConsistencyLevel;
-import org.apache.usergrid.persistence.core.CassandraFig;
-
-
-/**
- *  Simple configuration to wrap GuicyFig until it supports enums.  Need to be removed once
it does
- *
- */
-@Singleton
-public class CassandraConfigImpl implements CassandraConfig {
-
-
-    private ConsistencyLevel readCl;
-    private ConsistencyLevel writeCl;
-    private int[] shardSettings;
-    private ConsistencyLevel consistentCl;
-
-    // DataStax driver's CL
-    private com.datastax.driver.core.ConsistencyLevel dataStaxReadCl;
-    private com.datastax.driver.core.ConsistencyLevel dataStaxWriteCl;
-    private com.datastax.driver.core.ConsistencyLevel dataStaxReadConsistentCl;
-
-
-
-    @Inject
-    public CassandraConfigImpl( final CassandraFig cassandraFig ) {
-
-        this.readCl = ConsistencyLevel.valueOf( cassandraFig.getAstyanaxReadCL() );
-
-        this.writeCl = ConsistencyLevel.valueOf( cassandraFig.getAstyanaxWriteCL() );
-
-        this.shardSettings = parseShardSettings( cassandraFig.getShardValues() );
-
-        this.consistentCl = ConsistencyLevel.valueOf(cassandraFig.getAstyanaxConsistentReadCL());
-
-        this.dataStaxReadCl = com.datastax.driver.core.ConsistencyLevel.valueOf( cassandraFig.getReadCl());
-
-        this.dataStaxReadConsistentCl = com.datastax.driver.core.ConsistencyLevel.valueOf(
cassandraFig.getReadCl());
-
-        this.dataStaxWriteCl = com.datastax.driver.core.ConsistencyLevel.valueOf( cassandraFig.getWriteCl()
);
-
-        //add the listeners to update the values
-        cassandraFig.addPropertyChangeListener( new PropertyChangeListener() {
-            @Override
-            public void propertyChange( final PropertyChangeEvent evt ) {
-                final String propName = evt.getPropertyName();
-
-                if ( CassandraFig.ASTYANAX_READ_CL.equals( propName ) ) {
-                    readCl = ConsistencyLevel.valueOf( evt.getNewValue().toString() );
-                }
-
-                else if ( CassandraFig.ASTYANAX_WRITE_CL.equals( propName ) ) {
-                    writeCl = ConsistencyLevel.valueOf( evt.getNewValue().toString() );
-                }
-                else if (CassandraFig.SHARD_VALUES.equals(propName)){
-                    shardSettings = parseShardSettings( cassandraFig.getShardValues() );
-                }
-            }
-        } );
-    }
-
-
-    @Override
-    public ConsistencyLevel getReadCL() {
-        return readCl;
-    }
-
-    @Override
-    public ConsistencyLevel getConsistentReadCL() {
-        return consistentCl;
-    }
-
-    @Override
-    public ConsistencyLevel getWriteCL() {
-        return writeCl;
-    }
-
-    @Override
-    public com.datastax.driver.core.ConsistencyLevel getDataStaxReadCl() {
-        return dataStaxReadCl;
-    }
-
-    @Override
-    public com.datastax.driver.core.ConsistencyLevel getDataStaxWriteCl() {
-        return dataStaxWriteCl;
-    }
-
-    @Override
-    public com.datastax.driver.core.ConsistencyLevel getDataStaxReadConsistentCl() {
-        return dataStaxReadConsistentCl;
-    }
-
-
-    @Override
-    public int[] getShardSettings() {
-      return shardSettings;
-    }
-
-    private int[] parseShardSettings(final String value){
-        final String[] shardHistory = value.split( "," );
-
-        int[] settings = new int [shardHistory.length];
-
-        for(int i = 0; i < shardHistory.length; i ++){
-            settings[i] = Integer.parseInt( shardHistory[i] );
-        }
-
-      return settings;
-    }
-}

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
index 94aac60..4681674 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
@@ -21,6 +21,8 @@ package org.apache.usergrid.persistence.core.guice;
 
 import com.datastax.driver.core.Session;
 import com.netflix.astyanax.Keyspace;
+import org.apache.usergrid.persistence.core.CassandraConfig;
+import org.apache.usergrid.persistence.core.CassandraConfigImpl;
 import org.apache.usergrid.persistence.core.CassandraFig;
 import org.apache.usergrid.persistence.core.astyanax.*;
 import org.apache.usergrid.persistence.core.datastax.DataStaxCluster;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/ColumnNameIteratorTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/ColumnNameIteratorTest.java
b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/ColumnNameIteratorTest.java
index 415eafa..caa6294 100644
--- a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/ColumnNameIteratorTest.java
+++ b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/ColumnNameIteratorTest.java
@@ -24,6 +24,7 @@ package org.apache.usergrid.persistence.core.astyanax;
 
 import java.util.HashMap;
 
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.CassandraFig;
 import org.junit.Before;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/MultiKeyColumnNameIteratorTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/MultiKeyColumnNameIteratorTest.java
b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/MultiKeyColumnNameIteratorTest.java
index 55ed421..b31fa2f 100644
--- a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/MultiKeyColumnNameIteratorTest.java
+++ b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/MultiKeyColumnNameIteratorTest.java
@@ -26,6 +26,7 @@ import java.util.Arrays;
 import java.util.Comparator;
 import java.util.HashMap;
 
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.CassandraFig;
 import org.junit.Before;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/MultiRowColumnIteratorTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/MultiRowColumnIteratorTest.java
b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/MultiRowColumnIteratorTest.java
index 882febd..ea5359e 100644
--- a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/MultiRowColumnIteratorTest.java
+++ b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/astyanax/MultiRowColumnIteratorTest.java
@@ -28,6 +28,7 @@ import java.util.Comparator;
 import java.util.HashMap;
 import java.util.concurrent.CountDownLatch;
 
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.CassandraFig;
 import org.junit.Before;
 import org.junit.Test;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationV1Impl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationV1Impl.java
b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationV1Impl.java
index 870ba16..d7a5c80 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationV1Impl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationV1Impl.java
@@ -28,7 +28,7 @@ import java.util.Iterator;
 import org.apache.cassandra.db.marshal.BytesType;
 import org.apache.cassandra.db.marshal.UTF8Type;
 
-import org.apache.usergrid.persistence.core.astyanax.CassandraConfig;
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.astyanax.ColumnNameIterator;
 import org.apache.usergrid.persistence.core.astyanax.CompositeFieldSerializer;
 import org.apache.usergrid.persistence.core.astyanax.IdRowCompositeSerializer;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationV2Impl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationV2Impl.java
b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationV2Impl.java
index c9faf5f..1f81864 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationV2Impl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeMetadataSerializationV2Impl.java
@@ -29,7 +29,7 @@ import org.apache.cassandra.db.marshal.UTF8Type;
 
 import org.apache.usergrid.persistence.core.astyanax.BucketScopedRowKey;
 import org.apache.usergrid.persistence.core.astyanax.BucketScopedRowKeySerializer;
-import org.apache.usergrid.persistence.core.astyanax.CassandraConfig;
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.astyanax.ColumnSearch;
 import org.apache.usergrid.persistence.core.astyanax.CompositeFieldSerializer;
 import org.apache.usergrid.persistence.core.astyanax.IdRowCompositeSerializer;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeSerializationImpl.java
b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeSerializationImpl.java
index 0f4d722..984365f 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeSerializationImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/EdgeSerializationImpl.java
@@ -27,7 +27,7 @@ import java.util.UUID;
 import javax.inject.Inject;
 
 import com.google.common.base.Optional;
-import org.apache.usergrid.persistence.core.astyanax.CassandraConfig;
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.consistency.TimeService;
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
 import org.apache.usergrid.persistence.core.util.ValidationUtils;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/NodeSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/NodeSerializationImpl.java
b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/NodeSerializationImpl.java
index 8a2da54..2429d5a 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/NodeSerializationImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/NodeSerializationImpl.java
@@ -32,7 +32,7 @@ import javax.inject.Inject;
 import org.apache.cassandra.db.marshal.BooleanType;
 import org.apache.cassandra.db.marshal.BytesType;
 
-import org.apache.usergrid.persistence.core.astyanax.CassandraConfig;
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.astyanax.IdRowCompositeSerializer;
 import org.apache.usergrid.persistence.core.astyanax.MultiTenantColumnFamily;
 import org.apache.usergrid.persistence.core.astyanax.MultiTenantColumnFamilyDefinition;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/EdgeShardSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/EdgeShardSerializationImpl.java
b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/EdgeShardSerializationImpl.java
index 651bc64..098c152 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/EdgeShardSerializationImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/EdgeShardSerializationImpl.java
@@ -24,10 +24,9 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Iterator;
 
-import com.google.common.util.concurrent.ExecutionError;
 import org.apache.cassandra.db.marshal.BytesType;
 
-import org.apache.usergrid.persistence.core.astyanax.CassandraConfig;
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.astyanax.ColumnNameIterator;
 import org.apache.usergrid.persistence.core.astyanax.ColumnParser;
 import org.apache.usergrid.persistence.core.astyanax.ColumnTypes;
@@ -41,7 +40,6 @@ import org.apache.usergrid.persistence.core.util.ValidationUtils;
 import org.apache.usergrid.persistence.graph.GraphFig;
 import org.apache.usergrid.persistence.graph.serialization.impl.shard.DirectedEdgeMeta;
 import org.apache.usergrid.persistence.graph.serialization.impl.shard.EdgeShardSerialization;
-import org.apache.usergrid.persistence.graph.serialization.impl.shard.NodeShardCache;
 import org.apache.usergrid.persistence.graph.serialization.impl.shard.Shard;
 import org.apache.usergrid.persistence.graph.serialization.impl.shard.impl.serialize.EdgeShardRowKeySerializer;
 import org.apache.usergrid.persistence.graph.serialization.impl.shard.impl.serialize.ShardSerializer;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
index 65a6f40..8259df4 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
@@ -30,7 +30,7 @@ import javax.annotation.Nullable;
 import javax.inject.Inject;
 
 import com.google.common.base.Optional;
-import org.apache.usergrid.persistence.core.astyanax.CassandraConfig;
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.astyanax.MultiTenantColumnFamily;
 import org.apache.usergrid.persistence.core.astyanax.ScopedRowKey;
 import org.apache.usergrid.persistence.core.consistency.TimeService;

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f28abda0/stack/corepersistence/map/src/main/java/org/apache/usergrid/persistence/map/impl/MapSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/map/src/main/java/org/apache/usergrid/persistence/map/impl/MapSerializationImpl.java
b/stack/corepersistence/map/src/main/java/org/apache/usergrid/persistence/map/impl/MapSerializationImpl.java
index e2ea681..735f2b8 100644
--- a/stack/corepersistence/map/src/main/java/org/apache/usergrid/persistence/map/impl/MapSerializationImpl.java
+++ b/stack/corepersistence/map/src/main/java/org/apache/usergrid/persistence/map/impl/MapSerializationImpl.java
@@ -28,7 +28,7 @@ import com.datastax.driver.core.querybuilder.Clause;
 import com.datastax.driver.core.querybuilder.QueryBuilder;
 import com.datastax.driver.core.querybuilder.Using;
 
-import org.apache.usergrid.persistence.core.astyanax.CassandraConfig;
+import org.apache.usergrid.persistence.core.CassandraConfig;
 import org.apache.usergrid.persistence.core.astyanax.MultiTenantColumnFamilyDefinition;
 import org.apache.usergrid.persistence.core.datastax.CQLUtils;
 import org.apache.usergrid.persistence.core.datastax.TableDefinition;


Mime
View raw message