You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/01/21 22:21:30 UTC

[01/20] git commit: adding chop integration for distributed performance stress tests

Updated Branches:
  refs/heads/two-dot-o 53e2ade8e -> 2c6e7e486
  refs/pull/18/merge [deleted] 2709c964e


adding chop integration for distributed performance stress tests


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

Branch: refs/heads/two-dot-o
Commit: 879cd3149bd2b987ebe4ac828ad1e5be3304da4a
Parents: 6671849
Author: Alex Karasulu <ak...@gmail.com>
Authored: Wed Jan 8 17:56:24 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Wed Jan 8 17:56:24 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml        | 46 +++++++++++++++++++-
 .../collection/cassandra/CassandraRule.java     |  4 +-
 ...MvccEntitySerializationStrategyImplTest.java |  2 +
 3 files changed, 49 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/879cd314/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index 1a64919..d061204 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -12,9 +12,10 @@
 
   <properties>
     <guice.version>3.0</guice.version>
-    <guicyfig.version>3.2-SNAPSHOT</guicyfig.version>
+    <guicyfig.version>3.2</guicyfig.version>
     <slf4j.version>1.7.2</slf4j.version>
     <log4j.version>1.2.17</log4j.version>
+    <chop.version>1.0-SNAPSHOT</chop.version>
   </properties>
 
   <artifactId>collection</artifactId>
@@ -53,6 +54,43 @@
           </execution>
         </executions>
       </plugin>
+
+      <plugin>
+        <groupId>org.safehaus.chop</groupId>
+        <artifactId>chop-maven-plugin</artifactId>
+        <version>1.0-SNAPSHOT</version>
+
+        <!--
+        NOTE: you should be putting most of these variables into your settings.xml
+        as an automatically activated profile.
+        -->
+
+        <configuration>
+          <accessKey>${aws.s3.key}</accessKey>
+          <secretKey>${aws.s3.secret}</secretKey>
+          <bucketName>${aws.s3.bucket}</bucketName>
+          <managerAppUsername>admin</managerAppUsername>
+          <managerAppPassword>${manager.app.password}</managerAppPassword>
+          <testPackageBase>org.safehaus.chop.example</testPackageBase>
+          <runnerSSHKeyFile>${runner.ssh.key.file}</runnerSSHKeyFile>
+          <failIfCommitNecessary>false</failIfCommitNecessary>
+          <amiID>${ami.id}</amiID>
+          <awsSecurityGroup>${security.group}</awsSecurityGroup>
+          <runnerKeyPairName>${runner.keypair.name}</runnerKeyPairName>
+          <minimumRunners>5</minimumRunners>
+          <maximumRunners>8</maximumRunners>
+          <securityGroupExceptions>
+            <!--
+            Add your own IP address as an exception to allow access
+            but please do this in the settings.xml file .. essentially
+            all parameters should be in the settings.xml file.
+            -->
+            <param>${myip.address}/32:8080</param>
+            <param>${myip.address}/32:22</param>
+          </securityGroupExceptions>
+        </configuration>
+      </plugin>
+
     </plugins>
   </build>
 
@@ -96,6 +134,12 @@
     </dependency>
 
     <dependency>
+      <groupId>org.safehaus.chop</groupId>
+      <artifactId>chop-api</artifactId>
+      <version>${chop.version}</version>
+    </dependency>
+
+    <dependency>
       <groupId>org.jukito</groupId>
       <artifactId>jukito</artifactId>
       <version>${jukito.version}</version>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/879cd314/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
index 62b0ad0..bd37c1f 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
@@ -4,7 +4,7 @@ package org.apache.usergrid.persistence.collection.cassandra;
 import java.io.File;
 import java.io.IOException;
 
-import org.junit.rules.ExternalResource;
+import org.safehaus.guicyfig.EnvironResource;
 import org.safehaus.guicyfig.GuicyFigModule;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -22,7 +22,7 @@ import com.netflix.astyanax.test.EmbeddedCassandra;
  * @TODO - I wanted this in the test module but unfortunately that will create a circular dep
  *         due to the inclusion of the MigrationManager
  */
-public class CassandraRule extends ExternalResource {
+public class CassandraRule extends EnvironResource {
     private static final Logger LOG = LoggerFactory.getLogger( CassandraRule.class );
 
     public static final int THRIFT_PORT = AvailablePortFinder.getNextAvailable();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/879cd314/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
index 23a2d8f..061023e 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
@@ -14,6 +14,7 @@ import org.junit.ClassRule;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.safehaus.chop.api.IterationChop;
 import org.safehaus.guicyfig.Env;
 import org.safehaus.guicyfig.Option;
 import org.safehaus.guicyfig.Overrides;
@@ -57,6 +58,7 @@ import static org.mockito.Mockito.mock;
 
 
 /** @author tnine */
+@IterationChop( iterations = 1000, runners = 6, threads = 9 )
 @RunWith( JukitoRunner.class )
 @UseModules( CollectionModule.class )
 public class MvccEntitySerializationStrategyImplTest {


[07/20] git commit: Merge branch 'two-dot-o' of https://github.com/usergrid/usergrid into two-dot-o

Posted by sn...@apache.org.
Merge branch 'two-dot-o' of https://github.com/usergrid/usergrid into two-dot-o


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

Branch: refs/heads/two-dot-o
Commit: 35fddfe1257acb227fbbd7a7922dceb6a4e625f2
Parents: cfe5f4d 2697a21
Author: Alex Karasulu <ak...@gmail.com>
Authored: Thu Jan 16 01:30:07 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Thu Jan 16 01:30:07 2014 +0200

----------------------------------------------------------------------
 .../cassandra/RelationManagerImpl.java          | 27 +++++++-----
 .../rest/applications/ApplicationResource.java  |  6 +++
 .../users/ConnectionResourceTest.java           | 43 ++++++++++++++++++++
 3 files changed, 66 insertions(+), 10 deletions(-)
----------------------------------------------------------------------



[10/20] git commit: USERGRID-3037: added code to clean up connections and tweaked parameters to most taxing levels

Posted by sn...@apache.org.
USERGRID-3037: added code to clean up connections and tweaked parameters to most taxing levels


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

Branch: refs/heads/two-dot-o
Commit: 265d7dfed88d8906dd2926b2119d6713cee6ced8
Parents: 7072b85
Author: Alex Karasulu <ak...@gmail.com>
Authored: Thu Jan 16 07:18:36 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Thu Jan 16 07:18:36 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml                     | 2 +-
 .../collection/astyanax/AstyanaxKeyspaceProvider.java        | 3 +--
 .../impl/MvccEntitySerializationStrategyImplTest.java        | 8 +-------
 .../collection/src/test/resources/usergrid-CHOP.properties   | 2 +-
 4 files changed, 4 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/265d7dfe/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index f900cdb..6852486 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -78,7 +78,7 @@
           <coldRestartTomcat>true</coldRestartTomcat>
           <awsSecurityGroup>${security.group}</awsSecurityGroup>
           <runnerKeyPairName>${runner.keypair.name}</runnerKeyPairName>
-          <minimumRunners>6</minimumRunners>
+          <minimumRunners>9</minimumRunners>
           <maximumRunners>9</maximumRunners>
           <securityGroupExceptions>
             <!--

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/265d7dfe/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
index 923e7c3..0a71691 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
@@ -1,10 +1,8 @@
 package org.apache.usergrid.persistence.collection.astyanax;
 
 
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
-import java.util.concurrent.ConcurrentSkipListSet;
 
 import com.google.inject.Inject;
 import com.google.inject.Provider;
@@ -28,6 +26,7 @@ import com.netflix.astyanax.thrift.ThriftFamilyFactory;
 public class AstyanaxKeyspaceProvider implements Provider<Keyspace> {
     private final CassandraFig cassandraConfig;
 
+    // @todo aok - this being static is utterly horrible and needs to change
     private final static Set<AstyanaxContext<Keyspace>> contexts =
             new HashSet<AstyanaxContext<Keyspace>>();
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/265d7dfe/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
index 7248bac..a52be37 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
@@ -1,7 +1,6 @@
 package org.apache.usergrid.persistence.collection.serialization.impl;
 
 
-import java.io.IOException;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -10,7 +9,6 @@ import java.util.UUID;
 import org.jukito.JukitoRunner;
 import org.jukito.UseModules;
 import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Rule;
@@ -18,7 +16,6 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.safehaus.chop.api.IterationChop;
 import org.safehaus.guicyfig.Env;
-import org.safehaus.guicyfig.GuicyFigModule;
 import org.safehaus.guicyfig.Option;
 import org.safehaus.guicyfig.Overrides;
 
@@ -49,11 +46,8 @@ import org.apache.usergrid.persistence.model.field.UUIDField;
 import org.apache.usergrid.persistence.model.util.UUIDGenerator;
 
 import com.google.common.base.Optional;
-import com.google.inject.Guice;
 import com.google.inject.Inject;
-import com.google.inject.Injector;
 import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
-import com.netflix.config.ConfigurationManager;
 
 import static junit.framework.TestCase.assertEquals;
 import static junit.framework.TestCase.assertNotNull;
@@ -65,7 +59,7 @@ import static org.mockito.Mockito.mock;
 
 
 /** @author tnine */
-@IterationChop( iterations = 1, threads = 1 )
+@IterationChop( iterations = 1000, threads = 3 )
 @RunWith( JukitoRunner.class )
 @UseModules( CollectionModule.class )
 public class MvccEntitySerializationStrategyImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/265d7dfe/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
index d9c72be..a047fd7 100644
--- a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
+++ b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
@@ -1,6 +1,6 @@
 # These are for CHOP environment settings
 
-cassandra.connections=20
+cassandra.connections=30
 cassandra.port=9160
 cassandra.version=1.2
 


[16/20] git commit: merging in changes from upstream master

Posted by sn...@apache.org.
merging in changes from upstream master


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

Branch: refs/heads/two-dot-o
Commit: 8781eaf760bc71b869bc2af4b183c6aa64ca2ab3
Parents: 59f1b4e d8459de
Author: Alex Karasulu <ak...@gmail.com>
Authored: Mon Jan 20 06:41:24 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Mon Jan 20 06:41:24 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml        | 454 +++++-----
 .../DynamicCompositeFieldSerializer.java        |  48 +
 .../IdColDynamicCompositeSerializer.java        |  87 ++
 .../astyanax/MultiTennantColumnFamily.java      |  16 +-
 .../exception/CollectionRuntimeException.java   |  18 +-
 .../collection/guice/CollectionModule.java      |  31 +-
 .../collection/mvcc/entity/ValidationUtils.java |   1 -
 .../mvcc/stage/write/EntityVersion.java         |  62 ++
 .../stage/write/EntityVersionSerializer.java    |  67 ++
 .../mvcc/stage/write/FieldSerializer.java       | 102 +++
 .../mvcc/stage/write/UniqueValue.java           |  37 +
 .../mvcc/stage/write/UniqueValueImpl.java       | 121 +++
 .../write/UniqueValueSerializationStrategy.java |  64 ++
 .../UniqueValueSerializationStrategyImpl.java   | 171 ++++
 .../mvcc/stage/write/WriteCommit.java           |  64 +-
 .../collection/mvcc/stage/write/WriteFig.java   |  42 +
 .../mvcc/stage/write/WriteUniqueVerify.java     | 159 +++-
 .../collection/serialization/UniqueUpdate.java  |  28 -
 .../impl/CollectionScopedRowKeySerializer.java  |  38 +-
 .../MvccEntitySerializationStrategyImpl.java    |  21 +-
 .../MvccLogEntrySerializationStrategyImpl.java  |  20 +-
 .../serialization/impl/SerializationModule.java |   2 +
 .../collection/EntityCollectionManagerIT.java   |  61 +-
 .../changelog/ChangeLogGeneratorImplTest.java   |  20 -
 .../mvcc/stage/AbstractEntityStageTest.java     |  17 +
 .../mvcc/stage/AbstractIdStageTest.java         |  17 +
 .../mvcc/stage/AbstractMvccEntityStageTest.java |  76 +-
 .../mvcc/stage/InvalidMvccEntityGenerator.java  | 118 ---
 .../mvcc/stage/TestEntityGenerator.java         |  17 +
 .../mvcc/stage/delete/DeleteCommitTest.java     |   5 +-
 .../write/EntityVersionSerializerTest.java      |  40 +
 .../mvcc/stage/write/FieldSerializerTest.java   |  47 +
 ...niqueValueSerializationStrategyImplTest.java | 121 +++
 .../mvcc/stage/write/WriteCommitTest.java       |  26 +-
 .../mvcc/stage/write/WriteStartTest.java        |  17 +
 .../mvcc/stage/write/WriteUniqueVerifyTest.java |  66 +-
 .../impl/ScopedRowKeySerializerTest.java        |   7 +-
 .../collection/util/InvalidEntityGenerator.java |  31 +-
 .../collection/util/InvalidIdGenerator.java     |  69 +-
 .../util/InvalidMvccEntityGenerator.java        | 144 +++
 .../src/test/resources/log4j.properties         |   5 +-
 stack/corepersistence/graph/pom.xml             | 106 +--
 .../DynamicCompositeFieldSerializer.java        |  53 --
 .../IdColDynamicCompositeSerializer.java        |  93 --
 .../impl/EdgeMetadataSerializationImpl.java     |   3 +-
 .../impl/EdgeSerializationImpl.java             |   2 +-
 .../persistence/graph/EdgeManagerIT.java        |   8 +-
 .../persistence/model/field/AbstractField.java  |  43 +-
 .../persistence/model/field/BooleanField.java   |  22 +-
 .../persistence/model/field/DoubleField.java    |  33 +-
 .../usergrid/persistence/model/field/Field.java |   5 +
 .../persistence/model/field/IntegerField.java   |  33 +-
 .../persistence/model/field/LongField.java      |  35 +-
 .../persistence/model/field/StringField.java    |  36 +-
 .../persistence/model/field/UUIDField.java      |  37 +-
 .../persistence/model/field/EntityTest.java     |   4 +-
 stack/corepersistence/pom.xml                   | 108 ++-
 stack/pom.xml                                   |   1 +
 stack/query-validator/.gitignore                |   1 +
 stack/query-validator/README.md                 |   3 +
 stack/query-validator/pom.xml                   | 235 +++--
 stack/query-validator/sql.db                    | Bin 4096 -> 0 bytes
 .../query/validator/ApiServerRunner.java        |  49 +-
 .../validator/DefaultQueryResultsMatcher.java   |  32 +
 .../usergrid/query/validator/QueryEntity.java   |  31 +-
 .../usergrid/query/validator/QueryRequest.java  |  31 +-
 .../usergrid/query/validator/QueryResponse.java |  22 +-
 .../query/validator/QueryResultsMatcher.java    |  29 +
 .../usergrid/query/validator/QueryRunner.java   |  23 +-
 .../validator/QueryValidationConfiguration.java |  22 +-
 .../query/validator/QueryValidator.java         |  33 +-
 .../usergrid/query/validator/SqliteRunner.java  |  60 +-
 .../usergrid-query-validator-context.xml        |  16 +-
 .../query/validator/AbstractQueryIT.java        | 133 +++
 .../usergrid/query/validator/QueryITSuite.java  |  39 +
 .../query/validator/QueryValidationTest.java    | 339 -------
 .../query/validator/QueryValidatorRunner.java   | 209 -----
 .../query/validator/users/UserQueryIT.java      | 877 +++++++++++++++++++
 .../src/test/resources/log4j.properties         |   2 +-
 .../src/test/resources/project.properties       |   1 +
 .../src/test/resources/user.json                |  15 +-
 .../resources/usergrid-custom-test.properties   |  13 +-
 .../test/resources/usergrid-test-context.xml    |  24 +-
 .../test/java/org/usergrid/rest/ITSetup.java    |   9 +-
 .../java/org/usergrid/rest/TomcatResource.java  |  23 +-
 .../cassandra/ManagementServiceImpl.java        |  32 +-
 86 files changed, 3860 insertions(+), 1622 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8781eaf7/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --cc stack/corepersistence/collection/pom.xml
index e36371f,c004aa9..29a0c6b
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@@ -2,241 -2,178 +2,241 @@@
  <project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-   <parent>
-     <artifactId>persistence</artifactId>
-     <groupId>org.apache.usergrid</groupId>
-     <version>1.0-SNAPSHOT</version>
-   </parent>
-   <modelVersion>4.0.0</modelVersion>
-   <description>The module for handling all scope I/O</description>
 +
 +  <properties>
 +    <guice.version>3.0</guice.version>
 +    <guicyfig.version>3.3-SNAPSHOT</guicyfig.version>
 +    <slf4j.version>1.7.2</slf4j.version>
 +    <log4j.version>1.2.17</log4j.version>
 +    <chop.version>1.0-SNAPSHOT</chop.version>
 +  </properties>
 +
-   <artifactId>collection</artifactId>
- 
-   <build>
-     <resources>
-       <resource>
-         <directory>src/main/resources</directory>
-         <filtering>true</filtering>
-         <includes>
-           <include>**/*.properties</include>
-         </includes>
-       </resource>
-     </resources>
- 
-     <testResources>
-       <testResource>
-         <directory>src/test/resources</directory>
-         <filtering>true</filtering>
-         <includes>
-           <include>**/*.properties</include>
-         </includes>
-       </testResource>
-     </testResources>
- 
-     <plugins>
-       <plugin>
-         <groupId>org.apache.maven.plugins</groupId>
-         <artifactId>maven-jar-plugin</artifactId>
-         <version>2.4</version>
-         <executions>
-           <execution>
-             <goals>
-               <goal>test-jar</goal>
-             </goals>
-           </execution>
-         </executions>
-       </plugin>
- 
-       <plugin>
-         <groupId>org.safehaus.chop</groupId>
-         <artifactId>chop-maven-plugin</artifactId>
+     <parent>
+         <artifactId>persistence</artifactId>
+         <groupId>org.apache.usergrid</groupId>
          <version>1.0-SNAPSHOT</version>
- 
-         <!--
-         NOTE: you should be putting most of these variables into your settings.xml
-         as an automatically activated profile.
-         -->
- 
-         <configuration>
-           <accessKey>${aws.s3.key}</accessKey>
-           <secretKey>${aws.s3.secret}</secretKey>
-           <availabilityZone>${availabilityZone}</availabilityZone>
-           <bucketName>${aws.s3.bucket}</bucketName>
-           <managerAppUsername>admin</managerAppUsername>
-           <managerAppPassword>${manager.app.password}</managerAppPassword>
-           <testPackageBase>org.apache.usergrid</testPackageBase>
-           <runnerSSHKeyFile>${runner.ssh.key.file}</runnerSSHKeyFile>
-           <failIfCommitNecessary>false</failIfCommitNecessary>
-           <amiID>${ami.id}</amiID>
-           <instanceType>m1.large</instanceType>
-           <resultsDirectory>${resultsDirectory}</resultsDirectory>
-           <dumpType>${dumpType}</dumpType>
-           <coldRestartTomcat>true</coldRestartTomcat>
-           <awsSecurityGroup>${security.group}</awsSecurityGroup>
-           <runnerKeyPairName>${runner.keypair.name}</runnerKeyPairName>
-           <runnerCount>12</runnerCount>
-           <securityGroupExceptions>
-             <!--
-             Add your own IP address as an exception to allow access
-             but please do this in the settings.xml file .. essentially
-             all parameters should be in the settings.xml file.
-             -->
-             <param>${myip.address}/32:8080</param>
-             <param>${myip.address}/32:22</param>
-           </securityGroupExceptions>
-         </configuration>
-       </plugin>
- 
-     </plugins>
-   </build>
- 
-   <dependencies>
- 
-     <!-- Depends on the basic models -->
-     <dependency>
-       <groupId>${project.parent.groupId}</groupId>
-       <artifactId>model</artifactId>
-       <version>${project.version}</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>com.netflix.astyanax</groupId>
-       <artifactId>astyanax-core</artifactId>
-       <version>${astyanax.version}</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>com.netflix.astyanax</groupId>
-       <artifactId>astyanax-thrift</artifactId>
-       <version>${astyanax.version}</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>com.netflix.astyanax</groupId>
-       <artifactId>astyanax-cassandra</artifactId>
-       <version>${astyanax.version}</version>
-       <exclusions>
-         <exclusion>
-           <artifactId>servlet-api</artifactId>
-           <groupId>org.mortbay.jetty</groupId>
-         </exclusion>
-       </exclusions>
-     </dependency>
- 
-     <dependency>
-       <groupId>org.safehaus.guicyfig</groupId>
-       <artifactId>guicyfig</artifactId>
-       <version>${guicyfig.version}</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>org.safehaus.chop</groupId>
-       <artifactId>chop-api</artifactId>
-       <version>${chop.version}</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>org.jukito</groupId>
-       <artifactId>jukito</artifactId>
-       <version>${jukito.version}</version>
-       <scope>test</scope>
-     </dependency>
- 
-     <!-- lang utils for setting uuids etc -->
-     <dependency>
-       <groupId>org.apache.commons</groupId>
-       <artifactId>commons-lang3</artifactId>
-       <version>3.1</version>
-     </dependency>
-     <!-- Serialization libraries -->
- 
-     <dependency>
-       <groupId>org.codehaus.jackson</groupId>
-       <artifactId>jackson-smile</artifactId>
-       <version>1.9.13</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>com.esotericsoftware.kryo</groupId>
-       <artifactId>kryo</artifactId>
-       <version>2.22</version>
-     </dependency>
- 
-     <!-- helper serializers for kryo -->
-     <dependency>
-       <groupId>de.javakaffee</groupId>
-       <artifactId>kryo-serializers</artifactId>
-       <version>0.26</version>
-     </dependency>
- 
-     <!-- Google Guice -->
-     <dependency>
-       <groupId>com.google.inject</groupId>
-       <artifactId>guice</artifactId>
-       <version>${guice.version}</version>
-     </dependency>
- 
-     <!-- RX java -->
- 
- 
-     <dependency>
-       <groupId>com.netflix.rxjava</groupId>
-       <artifactId>rxjava-core</artifactId>
-       <version>0.15.1</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>com.google.inject.extensions</groupId>
-       <artifactId>guice-multibindings</artifactId>
-       <version>${guice.version}</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>com.google.inject.extensions</groupId>
-       <artifactId>guice-assistedinject</artifactId>
-       <version>${guice.version}</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>org.slf4j</groupId>
-       <artifactId>slf4j-api</artifactId>
-       <version>${slf4j.version}</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>org.slf4j</groupId>
-       <artifactId>slf4j-log4j12</artifactId>
-       <version>${slf4j.version}</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>log4j</groupId>
-       <artifactId>log4j</artifactId>
-       <version>${log4j.version}</version>
-     </dependency>
- 
-     <dependency>
-       <groupId>com.netflix.hystrix</groupId>
-       <artifactId>hystrix-core</artifactId>
-       <version>${hystrix.version}</version>
-     </dependency>
-     <!-- Google Guice Integration Test Injectors -->
- 
-     <dependency>
-       <groupId>${project.parent.groupId}</groupId>
-       <artifactId>testutils</artifactId>
-       <version>${project.version}</version>
-       <scope>test</scope>
-     </dependency>
- 
-   </dependencies>
- 
+     </parent>
+     <modelVersion>4.0.0</modelVersion>
+     <description>The module for handling all scope I/O</description>
+ 
+     <artifactId>collection</artifactId>
+ 
+     <build>
+         <resources>
+             <resource>
+                 <directory>src/main/resources</directory>
+                 <filtering>true</filtering>
+                 <includes>
+                     <include>**/*.properties</include>
+                 </includes>
+             </resource>
+         </resources>
+ 
+         <testResources>
+             <testResource>
+                 <directory>src/test/resources</directory>
+                 <filtering>true</filtering>
+                 <includes>
+                     <include>**/*.properties</include>
+                 </includes>
+             </testResource>
+         </testResources>
+ 
+         <plugins>
+             <plugin>
+                 <groupId>org.apache.maven.plugins</groupId>
+                 <artifactId>maven-jar-plugin</artifactId>
+                 <version>2.4</version>
+                 <executions>
+                     <execution>
+                         <goals>
+                             <goal>test-jar</goal>
+                         </goals>
+                     </execution>
+                 </executions>
+             </plugin>
 -        </plugins>
++
++        <plugin>
++          <groupId>org.safehaus.chop</groupId>
++          <artifactId>chop-maven-plugin</artifactId>
++          <version>1.0-SNAPSHOT</version>
++
++          <!--
++          NOTE: you should be putting most of these variables into your settings.xml
++          as an automatically activated profile.
++          -->
++
++          <configuration>
++            <accessKey>${aws.s3.key}</accessKey>
++            <secretKey>${aws.s3.secret}</secretKey>
++            <availabilityZone>${availabilityZone}</availabilityZone>
++            <bucketName>${aws.s3.bucket}</bucketName>
++            <managerAppUsername>admin</managerAppUsername>
++            <managerAppPassword>${manager.app.password}</managerAppPassword>
++            <testPackageBase>org.apache.usergrid</testPackageBase>
++            <runnerSSHKeyFile>${runner.ssh.key.file}</runnerSSHKeyFile>
++            <failIfCommitNecessary>false</failIfCommitNecessary>
++            <amiID>${ami.id}</amiID>
++            <instanceType>m1.large</instanceType>
++            <resultsDirectory>${resultsDirectory}</resultsDirectory>
++            <dumpType>${dumpType}</dumpType>
++            <coldRestartTomcat>true</coldRestartTomcat>
++            <awsSecurityGroup>${security.group}</awsSecurityGroup>
++            <runnerKeyPairName>${runner.keypair.name}</runnerKeyPairName>
++            <runnerCount>12</runnerCount>
++            <securityGroupExceptions>
++              <!--
++              Add your own IP address as an exception to allow access
++              but please do this in the settings.xml file .. essentially
++              all parameters should be in the settings.xml file.
++              -->
++              <param>${myip.address}/32:8080</param>
++              <param>${myip.address}/32:22</param>
++            </securityGroupExceptions>
++          </configuration>
++        </plugin>
++      </plugins>
+     </build>
+ 
+     <dependencies>
+ 
++      <dependency>
++        <groupId>org.safehaus.chop</groupId>
++        <artifactId>chop-api</artifactId>
++        <version>${chop.version}</version>
++      </dependency>
++
++      <!-- Google Guice Integration Test Injectors -->
++
++      <dependency>
++        <groupId>${project.parent.groupId}</groupId>
++        <artifactId>testutils</artifactId>
++        <version>${project.version}</version>
++        <scope>test</scope>
++      </dependency>
++
+         <!-- Depends on the basic models -->
+         <dependency>
+             <groupId>${project.parent.groupId}</groupId>
+             <artifactId>model</artifactId>
+             <version>${project.version}</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>com.netflix.astyanax</groupId>
+             <artifactId>astyanax-core</artifactId>
+             <version>${astyanax.version}</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>com.netflix.astyanax</groupId>
+             <artifactId>astyanax-thrift</artifactId>
+             <version>${astyanax.version}</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>com.netflix.astyanax</groupId>
+             <artifactId>astyanax-cassandra</artifactId>
+             <version>${astyanax.version}</version>
+             <exclusions>
+                 <exclusion>
+                     <artifactId>servlet-api</artifactId>
+                     <groupId>org.mortbay.jetty</groupId>
+                 </exclusion>
+             </exclusions>
+         </dependency>
+ 
+         <dependency>
+             <groupId>org.safehaus.guicyfig</groupId>
+             <artifactId>guicyfig</artifactId>
+             <version>${guicyfig.version}</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>org.jukito</groupId>
+             <artifactId>jukito</artifactId>
+             <version>${jukito.version}</version>
+             <scope>test</scope>
+         </dependency>
+ 
+         <!-- lang utils for setting uuids etc -->
+         <dependency>
+             <groupId>org.apache.commons</groupId>
+             <artifactId>commons-lang3</artifactId>
+             <version>3.1</version>
+         </dependency>
+         <!-- Serialization libraries -->
+ 
+         <dependency>
+             <groupId>org.codehaus.jackson</groupId>
+             <artifactId>jackson-smile</artifactId>
+             <version>1.9.13</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>com.esotericsoftware.kryo</groupId>
+             <artifactId>kryo</artifactId>
+             <version>2.22</version>
+         </dependency>
+ 
+         <!-- helper serializers for kryo -->
+         <dependency>
+             <groupId>de.javakaffee</groupId>
+             <artifactId>kryo-serializers</artifactId>
+             <version>0.26</version>
+         </dependency>
+ 
+         <!-- Google Guice -->
+         <dependency>
+             <groupId>com.google.inject</groupId>
+             <artifactId>guice</artifactId>
+             <version>${guice.version}</version>
+         </dependency>
+ 
+         <!-- RX java -->
+ 
+ 
+         <dependency>
+             <groupId>com.netflix.rxjava</groupId>
+             <artifactId>rxjava-core</artifactId>
+             <version>0.15.1</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>com.google.inject.extensions</groupId>
+             <artifactId>guice-multibindings</artifactId>
+             <version>${guice.version}</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>com.google.inject.extensions</groupId>
+             <artifactId>guice-assistedinject</artifactId>
+             <version>${guice.version}</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>org.slf4j</groupId>
+             <artifactId>slf4j-api</artifactId>
+             <version>${slf4j.version}</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>org.slf4j</groupId>
+             <artifactId>slf4j-log4j12</artifactId>
+             <version>${slf4j.version}</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>log4j</groupId>
+             <artifactId>log4j</artifactId>
+             <version>${log4j.version}</version>
+         </dependency>
+ 
+         <dependency>
+             <groupId>com.netflix.hystrix</groupId>
+             <artifactId>hystrix-core</artifactId>
+             <version>${hystrix.version}</version>
+         </dependency>
+ 
+     </dependencies>
 -
  </project>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8781eaf7/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
index c35464b,294c5fc..624a039
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
@@@ -1,9 -1,22 +1,25 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  *  contributor license agreements.  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.  For additional information regarding
+  * copyright in this work, please see the NOTICE file in the top level
+  * directory of this distribution.
+  */
  package org.apache.usergrid.persistence.collection.guice;
  
- 
 +import java.io.IOException;
 +
 +import org.safehaus.guicyfig.Env;
  import org.safehaus.guicyfig.GuicyFigModule;
  
  import org.apache.usergrid.persistence.collection.EntityCollectionManager;
@@@ -21,10 -33,10 +37,13 @@@ import org.apache.usergrid.persistence.
  import org.apache.usergrid.persistence.collection.service.impl.ServiceModule;
  
  import com.google.inject.AbstractModule;
 +import com.google.inject.Guice;
 +import com.google.inject.Injector;
  import com.google.inject.assistedinject.FactoryModuleBuilder;
 +import com.netflix.config.ConfigurationManager;
+ import org.apache.usergrid.persistence.collection.mvcc.stage.write.UniqueValueSerializationStrategy;
+ import org.apache.usergrid.persistence.collection.mvcc.stage.write.UniqueValueSerializationStrategyImpl;
+ import org.apache.usergrid.persistence.collection.mvcc.stage.write.WriteFig;
  
  import rx.Scheduler;
  

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8781eaf7/stack/corepersistence/collection/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --cc stack/corepersistence/collection/src/test/resources/log4j.properties
index bf81401,8a482db..eaf889c
--- a/stack/corepersistence/collection/src/test/resources/log4j.properties
+++ b/stack/corepersistence/collection/src/test/resources/log4j.properties
@@@ -1,13 -1,8 +1,14 @@@
  # suppress inspection "UnusedProperty" for whole file
- log4j.rootLogger=DEBUG,stdout
- log4j.rootCategory=DEBUG,stdout
+ log4j.rootLogger=INFO,standard
  
 -log4j.appender.standard=org.apache.log4j.ConsoleAppender
 -log4j.appender.standard.layout=org.apache.log4j.PatternLayout
 -log4j.appender.standard.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %p %c{3}.%M(%L)<%t>- %m%n
 +log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 +log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %p %c{3}.%M(%L)<%t>- %m%n
 +
 +log4j.logger.org.safehaus.chop.plugin=DEBUG
 +log4j.logger.org.safehaus.guicyfig=ERROR
 +log4j.logger.org.safehaus.chop.api.store.amazon=DEBUG
 +log4j.logger.org.apache.http=ERROR
 +log4j.logger.com.amazonaws.request=ERROR
+ 
+ log4j.logger.org.apache.usergrid=DEBUG

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/8781eaf7/stack/corepersistence/model/src/test/java/org/apache/usergrid/persistence/model/field/EntityTest.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/model/src/test/java/org/apache/usergrid/persistence/model/field/EntityTest.java
index c04d807,c04d807..c450263
--- a/stack/corepersistence/model/src/test/java/org/apache/usergrid/persistence/model/field/EntityTest.java
+++ b/stack/corepersistence/model/src/test/java/org/apache/usergrid/persistence/model/field/EntityTest.java
@@@ -14,8 -14,8 +14,8 @@@ import org.apache.usergrid.persistence.
  import org.apache.usergrid.persistence.model.entity.SimpleId;
  import org.apache.usergrid.persistence.model.util.UUIDGenerator;
  
--import static junit.framework.Assert.assertEquals;
--import static junit.framework.Assert.assertSame;
++import static junit.framework.TestCase.assertEquals;
++import static junit.framework.TestCase.assertSame;
  import static org.junit.Assert.assertTrue;
  
  


[02/20] git commit: Merge branch 'two-dot-o' of https://github.com/usergrid/usergrid into two-dot-o

Posted by sn...@apache.org.
Merge branch 'two-dot-o' of https://github.com/usergrid/usergrid into two-dot-o


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

Branch: refs/heads/two-dot-o
Commit: 0456561136bddc679a36bf0b19c5df872dcdf144
Parents: 879cd31 5a57e87
Author: Alex Karasulu <ak...@gmail.com>
Authored: Sun Jan 12 13:55:56 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Sun Jan 12 13:55:56 2014 +0200

----------------------------------------------------------------------
 .../org/usergrid/rest/applications/ApplicationResource.java    | 6 ------
 stack/rest/src/main/resources/swagger/applications.json        | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------



[08/20] git commit: making changes to prevent performance tests from blowing up

Posted by sn...@apache.org.
making changes to prevent performance tests from blowing up


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

Branch: refs/heads/two-dot-o
Commit: 2795d0cdbffa4e981037c3d8b851cf43f1f8b7eb
Parents: 35fddfe
Author: Alex Karasulu <ak...@gmail.com>
Authored: Thu Jan 16 02:27:22 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Thu Jan 16 02:27:22 2014 +0200

----------------------------------------------------------------------
 .../astyanax/AstyanaxKeyspaceProvider.java      | 27 +++++++++++++++++++-
 ...MvccEntitySerializationStrategyImplTest.java | 13 +++++++++-
 2 files changed, 38 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2795d0cd/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
index e1fc105..923e7c3 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
@@ -1,6 +1,11 @@
 package org.apache.usergrid.persistence.collection.astyanax;
 
 
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.ConcurrentSkipListSet;
+
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.netflix.astyanax.AstyanaxConfiguration;
@@ -23,6 +28,8 @@ import com.netflix.astyanax.thrift.ThriftFamilyFactory;
 public class AstyanaxKeyspaceProvider implements Provider<Keyspace> {
     private final CassandraFig cassandraConfig;
 
+    private final static Set<AstyanaxContext<Keyspace>> contexts =
+            new HashSet<AstyanaxContext<Keyspace>>();
 
     @Inject
     public AstyanaxKeyspaceProvider( final CassandraFig cassandraConfig ) {
@@ -32,6 +39,7 @@ public class AstyanaxKeyspaceProvider implements Provider<Keyspace> {
 
     @Override
     public Keyspace get() {
+
         AstyanaxConfiguration config = new AstyanaxConfigurationImpl()
                 .setDiscoveryType( NodeDiscoveryType.TOKEN_AWARE )
                 .setTargetCassandraVersion( cassandraConfig.getVersion() );
@@ -61,8 +69,25 @@ public class AstyanaxKeyspaceProvider implements Provider<Keyspace> {
                         .buildKeyspace( ThriftFamilyFactory.getInstance() );
 
         context.start();
+        synchronized ( contexts ) {
+            contexts.add( context );
+        }
+        return context.getClient();
+    }
 
 
-        return context.getClient();
+    // @todo by aok - this must be considered to enable stress tests to shutdown or else
+    // @todo the system will run out of file descriptors (sockets) and tests will fail.
+    // this is where the lifecycle management annotations would come in handy.
+    public void shutdown() {
+        synchronized ( contexts ) {
+            HashSet<AstyanaxContext<Keyspace>> copy = new HashSet<AstyanaxContext<Keyspace>>( contexts.size() );
+            copy.addAll( contexts );
+
+            for ( AstyanaxContext<Keyspace> context : copy ) {
+                context.shutdown();
+                contexts.remove( context );
+            }
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2795d0cd/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
index c18158d..e62a471 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
@@ -9,6 +9,8 @@ import java.util.UUID;
 
 import org.jukito.JukitoRunner;
 import org.jukito.UseModules;
+import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.ClassRule;
 import org.junit.Rule;
@@ -21,6 +23,7 @@ import org.safehaus.guicyfig.Option;
 import org.safehaus.guicyfig.Overrides;
 
 import org.apache.usergrid.persistence.collection.CollectionScope;
+import org.apache.usergrid.persistence.collection.astyanax.AstyanaxKeyspaceProvider;
 import org.apache.usergrid.persistence.collection.astyanax.CassandraFig;
 import org.apache.usergrid.persistence.collection.cassandra.CassandraRule;
 import org.apache.usergrid.persistence.collection.guice.CollectionModule;
@@ -77,6 +80,8 @@ public class MvccEntitySerializationStrategyImplTest {
     @ClassRule
     public static CassandraRule rule = new CassandraRule();
 
+    @Inject
+    AstyanaxKeyspaceProvider provider;
 
     @Inject
     @Rule
@@ -110,12 +115,18 @@ public class MvccEntitySerializationStrategyImplTest {
 
 
     @Before
-    public void setupClass() {
+    public void setup() {
         assertNotNull( cassandraFig );
         assertNotNull( rxFig );
     }
 
 
+    @After
+    public void tearDown() {
+        provider.shutdown();
+    }
+
+
     @Test
     public void writeLoadDelete() throws ConnectionException {
 


[19/20] git commit: removing tarball that accidentally made it into the commit

Posted by sn...@apache.org.
removing tarball that accidentally made it into the commit


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

Branch: refs/heads/two-dot-o
Commit: e3f8bba53c9c70b4ae871ce1ee11837327195b6d
Parents: ffaf123
Author: Alex Karasulu <ak...@gmail.com>
Authored: Tue Jan 21 21:42:31 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Tue Jan 21 21:42:31 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection.tgz | Bin 47520 -> 0 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e3f8bba5/stack/corepersistence/collection.tgz
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection.tgz b/stack/corepersistence/collection.tgz
deleted file mode 100644
index 1f152ca..0000000
Binary files a/stack/corepersistence/collection.tgz and /dev/null differ


[15/20] git commit: trill down some of the debugging and increase runners to test with chop

Posted by sn...@apache.org.
trill down some of the debugging and increase runners to test with chop


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

Branch: refs/heads/two-dot-o
Commit: 59f1b4ea6c067543089a527b0f6f7c28f19d7e7d
Parents: f87f471
Author: Alex Karasulu <ak...@gmail.com>
Authored: Mon Jan 20 06:03:55 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Mon Jan 20 06:03:55 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml                      | 2 +-
 .../collection/src/test/resources/log4j.properties            | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/59f1b4ea/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index 1ea959e..e36371f 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -82,7 +82,7 @@
           <coldRestartTomcat>true</coldRestartTomcat>
           <awsSecurityGroup>${security.group}</awsSecurityGroup>
           <runnerKeyPairName>${runner.keypair.name}</runnerKeyPairName>
-          <runnerCount>9</runnerCount>
+          <runnerCount>12</runnerCount>
           <securityGroupExceptions>
             <!--
             Add your own IP address as an exception to allow access

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/59f1b4ea/stack/corepersistence/collection/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/resources/log4j.properties b/stack/corepersistence/collection/src/test/resources/log4j.properties
index fb7a94e..bf81401 100644
--- a/stack/corepersistence/collection/src/test/resources/log4j.properties
+++ b/stack/corepersistence/collection/src/test/resources/log4j.properties
@@ -6,5 +6,8 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %p %c{3}.%M(%L)<%t>- %m%n
 
-log4j.logger.org.apache.usergrid=DEBUG,stdout
-log4j.logger.org.safehaus.chop=DEBUG,stdout
+log4j.logger.org.safehaus.chop.plugin=DEBUG
+log4j.logger.org.safehaus.guicyfig=ERROR
+log4j.logger.org.safehaus.chop.api.store.amazon=DEBUG
+log4j.logger.org.apache.http=ERROR
+log4j.logger.com.amazonaws.request=ERROR


[12/20] git commit: adding results dump parameters to pom

Posted by sn...@apache.org.
adding results dump parameters to pom


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

Branch: refs/heads/two-dot-o
Commit: 93ad3b14364abf66b25cb294bfba34d517731e3f
Parents: cc471b5
Author: Alex Karasulu <ak...@gmail.com>
Authored: Sat Jan 18 04:22:29 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Sat Jan 18 04:22:29 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml                           | 2 ++
 .../impl/MvccEntitySerializationStrategyImplTest.java              | 2 +-
 .../corepersistence/collection/src/test/resources/log4j.properties | 2 +-
 .../collection/src/test/resources/usergrid-CHOP.properties         | 2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93ad3b14/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index 1449f3b..731f6b0 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -76,6 +76,8 @@
           <runnerSSHKeyFile>${runner.ssh.key.file}</runnerSSHKeyFile>
           <failIfCommitNecessary>false</failIfCommitNecessary>
           <amiID>${ami.id}</amiID>
+          <resultsDirectory>${resultsDirectory}</resultsDirectory>
+          <dumpType>${dumpType}</dumpType>
           <coldRestartTomcat>true</coldRestartTomcat>
           <awsSecurityGroup>${security.group}</awsSecurityGroup>
           <runnerKeyPairName>${runner.keypair.name}</runnerKeyPairName>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93ad3b14/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
index a52be37..63c87ce 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
@@ -59,7 +59,7 @@ import static org.mockito.Mockito.mock;
 
 
 /** @author tnine */
-@IterationChop( iterations = 1000, threads = 3 )
+@IterationChop( iterations = 1000, threads = 2 )
 @RunWith( JukitoRunner.class )
 @UseModules( CollectionModule.class )
 public class MvccEntitySerializationStrategyImplTest {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93ad3b14/stack/corepersistence/collection/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/resources/log4j.properties b/stack/corepersistence/collection/src/test/resources/log4j.properties
index eeb5b9b..fb7a94e 100644
--- a/stack/corepersistence/collection/src/test/resources/log4j.properties
+++ b/stack/corepersistence/collection/src/test/resources/log4j.properties
@@ -7,4 +7,4 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %p %c{3}.%M(%L)<%t>- %m%n
 
 log4j.logger.org.apache.usergrid=DEBUG,stdout
-
+log4j.logger.org.safehaus.chop=DEBUG,stdout

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/93ad3b14/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
index a047fd7..d9c72be 100644
--- a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
+++ b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
@@ -1,6 +1,6 @@
 # These are for CHOP environment settings
 
-cassandra.connections=30
+cassandra.connections=20
 cassandra.port=9160
 cassandra.version=1.2
 


[03/20] git commit: Fixing breakage in CassandraRule in CHOP environment and making sure we're loading the usergrid properties cascaded in a test.

Posted by sn...@apache.org.
Fixing breakage in CassandraRule in CHOP environment and making
sure we're loading the usergrid properties cascaded in a test.


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

Branch: refs/heads/two-dot-o
Commit: a5bae70715a21e0a4cd8fd0aa3c72b96fe68b41a
Parents: 0456561
Author: Alex Karasulu <ak...@gmail.com>
Authored: Tue Jan 14 22:42:37 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Tue Jan 14 22:42:37 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml        |  2 +-
 .../src/main/resources/usergrid.properties      |  1 +
 .../collection/cassandra/CassandraRule.java     | 11 +++++-----
 ...MvccEntitySerializationStrategyImplTest.java | 22 +++++++++++++++++---
 .../src/test/resources/usergrid-CHOP.properties | 18 ++++++++++++++++
 .../src/test/resources/usergrid-UNIT.properties |  1 +
 6 files changed, 46 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5bae707/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index d061204..bc62409 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -12,7 +12,7 @@
 
   <properties>
     <guice.version>3.0</guice.version>
-    <guicyfig.version>3.2</guicyfig.version>
+    <guicyfig.version>3.3-SNAPSHOT</guicyfig.version>
     <slf4j.version>1.7.2</slf4j.version>
     <log4j.version>1.2.17</log4j.version>
     <chop.version>1.0-SNAPSHOT</chop.version>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5bae707/stack/corepersistence/collection/src/main/resources/usergrid.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/resources/usergrid.properties b/stack/corepersistence/collection/src/main/resources/usergrid.properties
new file mode 100644
index 0000000..37a8fa8
--- /dev/null
+++ b/stack/corepersistence/collection/src/main/resources/usergrid.properties
@@ -0,0 +1 @@
+# Keep nothing but production defaults in here
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5bae707/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
index bd37c1f..ab94574 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
@@ -43,11 +43,6 @@ public class CassandraRule extends EnvironResource {
 
         Injector injector = Guice.createInjector( new GuicyFigModule( CassandraFig.class ) );
         cassandraFig = injector.getInstance( CassandraFig.class );
-        cassandraFig.override( "getPort", THRIFT_PORT_STR );
-        cassandraFig.override( "getConnections", "20" );
-        cassandraFig.override( "getHosts", "localhost" );
-        cassandraFig.override( "getClusterName", "Usergrid" );
-        cassandraFig.override( "getKeyspaceName", "Usergrid_Collections" );
     }
 
 
@@ -58,6 +53,12 @@ public class CassandraRule extends EnvironResource {
 
     @Override
     protected void before() throws Throwable {
+        cassandraFig.override( "getPort", THRIFT_PORT_STR );
+        cassandraFig.override( "getConnections", "20" );
+        cassandraFig.override( "getHosts", "localhost" );
+        cassandraFig.override( "getClusterName", "Usergrid" );
+        cassandraFig.override( "getKeyspaceName", "Usergrid_Collections" );
+
         if ( started ) {
             return;
         }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5bae707/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
index 061023e..97dc803 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
@@ -1,12 +1,12 @@
 package org.apache.usergrid.persistence.collection.serialization.impl;
 
 
+import java.io.IOException;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.UUID;
 
-import org.jukito.JukitoModule;
 import org.jukito.JukitoRunner;
 import org.jukito.UseModules;
 import org.junit.Before;
@@ -47,6 +47,7 @@ import org.apache.usergrid.persistence.model.util.UUIDGenerator;
 import com.google.common.base.Optional;
 import com.google.inject.Inject;
 import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
+import com.netflix.config.ConfigurationManager;
 
 import static junit.framework.TestCase.assertEquals;
 import static junit.framework.TestCase.assertNotNull;
@@ -58,13 +59,28 @@ import static org.mockito.Mockito.mock;
 
 
 /** @author tnine */
-@IterationChop( iterations = 1000, runners = 6, threads = 9 )
+@IterationChop( iterations = 1000, threads = 9 )
 @RunWith( JukitoRunner.class )
 @UseModules( CollectionModule.class )
 public class MvccEntitySerializationStrategyImplTest {
     /** Our RX I/O threads and this should have the same value */
     private static final String CONNECTION_COUNT = "20";
 
+    static {
+        /*
+         * --------------------------------------------------------------------
+         * Archaius Configuration Settings
+         * --------------------------------------------------------------------
+         */
+
+        try {
+            ConfigurationManager.loadCascadedPropertiesFromResources( "usergrid" );
+        }
+        catch ( IOException e ) {
+            throw new RuntimeException( "Cannot do much without properly loading our configuration.", e );
+        }
+    }
+
     @Inject
     private MvccEntitySerializationStrategy serializationStrategy;
 
@@ -90,6 +106,7 @@ public class MvccEntitySerializationStrategyImplTest {
 
     @Inject
     @Overrides( name = "unit-test",
+        environments = Env.UNIT,
         options = {
             @Option( method = "getMaxThreadCount", override = CONNECTION_COUNT )
         }
@@ -105,7 +122,6 @@ public class MvccEntitySerializationStrategyImplTest {
 
     @Before
     public void setupClass() {
-//        GuicyFigModule.injectMembers( this );
 
         assertNotNull( cassandraFig );
         cassandraFig.bypass( "getPort", CassandraRule.THRIFT_PORT_STR );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5bae707/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
new file mode 100644
index 0000000..e05f487
--- /dev/null
+++ b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
@@ -0,0 +1,18 @@
+# These are for CHOP environment settings
+
+#cassandra.connections=${cassandra.connections}
+#cassandra.port=9160
+#cassandra.version=1.2
+#cassandra.hosts=${cassandra.hosts}
+#cassandra.cluster_name=Usergrid
+#collections.keyspace=Usergrid_Collections
+#cassandra.timeout=5000
+
+
+cassandra.connections=10
+cassandra.port=9160
+cassandra.version=1.2
+cassandra.hosts=54.224.205.239, 107.21.155.136, 54.205.144.212, 23.22.49.179, 23.22.49.179, 54.242.63.170
+cassandra.cluster_name=Usergrid
+collections.keyspace=Usergrid_Collections
+cassandra.timeout=5000

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5bae707/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties b/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties
new file mode 100644
index 0000000..6a5013c
--- /dev/null
+++ b/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties
@@ -0,0 +1 @@
+# Keep nothing but overriding test defaults in here
\ No newline at end of file


[13/20] git commit: adding the instanceType

Posted by sn...@apache.org.
adding the instanceType


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

Branch: refs/heads/two-dot-o
Commit: 30f2d5a9df11154be09515f5852211d1458df5f5
Parents: 93ad3b1
Author: Alex Karasulu <ak...@gmail.com>
Authored: Sat Jan 18 05:36:32 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Sat Jan 18 05:36:32 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/30f2d5a9/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index 731f6b0..91a0993 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -76,6 +76,7 @@
           <runnerSSHKeyFile>${runner.ssh.key.file}</runnerSSHKeyFile>
           <failIfCommitNecessary>false</failIfCommitNecessary>
           <amiID>${ami.id}</amiID>
+          <instanceType>m1.large</instanceType>
           <resultsDirectory>${resultsDirectory}</resultsDirectory>
           <dumpType>${dumpType}</dumpType>
           <coldRestartTomcat>true</coldRestartTomcat>


[05/20] git commit: upping runners and fixing hardcoded ip addresses in properties file, and ignoring the jssecacerts generated while running

Posted by sn...@apache.org.
upping runners and fixing hardcoded ip addresses in properties file, and ignoring the jssecacerts generated while running


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

Branch: refs/heads/two-dot-o
Commit: 480d525a4b9ee7447d932e1d8ca4d8237b770bf3
Parents: 4c29d30
Author: Alex Karasulu <ak...@gmail.com>
Authored: Wed Jan 15 23:56:02 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Wed Jan 15 23:56:02 2014 +0200

----------------------------------------------------------------------
 stack/.gitignore                                   |   1 +
 stack/corepersistence/collection.tgz               | Bin 0 -> 47520 bytes
 stack/corepersistence/collection/pom.xml           |   4 ++--
 .../src/test/resources/usergrid-CHOP.properties    |  16 +++++-----------
 4 files changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/480d525a/stack/.gitignore
----------------------------------------------------------------------
diff --git a/stack/.gitignore b/stack/.gitignore
index bc54518..d3b96af 100644
--- a/stack/.gitignore
+++ b/stack/.gitignore
@@ -1,4 +1,5 @@
 .idea
+jssecacerts
 .sonar-ide.properties
 .clover
 atlassian-ide-plugin.xml

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/480d525a/stack/corepersistence/collection.tgz
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection.tgz b/stack/corepersistence/collection.tgz
new file mode 100644
index 0000000..1f152ca
Binary files /dev/null and b/stack/corepersistence/collection.tgz differ

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/480d525a/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index bc62409..29dba1c 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -77,8 +77,8 @@
           <amiID>${ami.id}</amiID>
           <awsSecurityGroup>${security.group}</awsSecurityGroup>
           <runnerKeyPairName>${runner.keypair.name}</runnerKeyPairName>
-          <minimumRunners>5</minimumRunners>
-          <maximumRunners>8</maximumRunners>
+          <minimumRunners>6</minimumRunners>
+          <maximumRunners>9</maximumRunners>
           <securityGroupExceptions>
             <!--
             Add your own IP address as an exception to allow access

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/480d525a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
index e05f487..d9c72be 100644
--- a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
+++ b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
@@ -1,18 +1,12 @@
 # These are for CHOP environment settings
 
-#cassandra.connections=${cassandra.connections}
-#cassandra.port=9160
-#cassandra.version=1.2
-#cassandra.hosts=${cassandra.hosts}
-#cassandra.cluster_name=Usergrid
-#collections.keyspace=Usergrid_Collections
-#cassandra.timeout=5000
-
-
-cassandra.connections=10
+cassandra.connections=20
 cassandra.port=9160
 cassandra.version=1.2
-cassandra.hosts=54.224.205.239, 107.21.155.136, 54.205.144.212, 23.22.49.179, 23.22.49.179, 54.242.63.170
+
+# a comma delimited private IP address list to your chop cassandra cluster
+# define this in your settings.xml and have it as an always active profile
+cassandra.hosts=${chop.cassandra.hosts}
 cassandra.cluster_name=Usergrid
 collections.keyspace=Usergrid_Collections
 cassandra.timeout=5000


[06/20] git commit: fix the test package

Posted by sn...@apache.org.
fix the test package


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

Branch: refs/heads/two-dot-o
Commit: cfe5f4d50b9a7baabf865f7376e1364fafead46c
Parents: 480d525
Author: Alex Karasulu <ak...@gmail.com>
Authored: Thu Jan 16 00:50:12 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Thu Jan 16 00:50:12 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cfe5f4d5/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index 29dba1c..f900cdb 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -71,10 +71,11 @@
           <bucketName>${aws.s3.bucket}</bucketName>
           <managerAppUsername>admin</managerAppUsername>
           <managerAppPassword>${manager.app.password}</managerAppPassword>
-          <testPackageBase>org.safehaus.chop.example</testPackageBase>
+          <testPackageBase>org.apache.usergrid</testPackageBase>
           <runnerSSHKeyFile>${runner.ssh.key.file}</runnerSSHKeyFile>
           <failIfCommitNecessary>false</failIfCommitNecessary>
           <amiID>${ami.id}</amiID>
+          <coldRestartTomcat>true</coldRestartTomcat>
           <awsSecurityGroup>${security.group}</awsSecurityGroup>
           <runnerKeyPairName>${runner.keypair.name}</runnerKeyPairName>
           <minimumRunners>6</minimumRunners>


[14/20] git commit: removing old min max and using exact runner counts

Posted by sn...@apache.org.
removing old min max and using exact runner counts


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

Branch: refs/heads/two-dot-o
Commit: f87f471068c0a2e8c38513c15617ee00c6a7706c
Parents: 30f2d5a
Author: Alex Karasulu <ak...@gmail.com>
Authored: Sun Jan 19 13:18:28 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Sun Jan 19 13:18:28 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f87f4710/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index 91a0993..1ea959e 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -82,8 +82,7 @@
           <coldRestartTomcat>true</coldRestartTomcat>
           <awsSecurityGroup>${security.group}</awsSecurityGroup>
           <runnerKeyPairName>${runner.keypair.name}</runnerKeyPairName>
-          <minimumRunners>9</minimumRunners>
-          <maximumRunners>9</maximumRunners>
+          <runnerCount>9</runnerCount>
           <securityGroupExceptions>
             <!--
             Add your own IP address as an exception to allow access


[20/20] git commit: Merge pull request #18 from tonuquq/two-dot-o

Posted by sn...@apache.org.
Merge pull request #18 from tonuquq/two-dot-o

adding chop integration for distributed performance stress tests

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

Branch: refs/heads/two-dot-o
Commit: 2c6e7e4863d57c9f69d32829ee3acaaee3635647
Parents: 53e2ade e3f8bba
Author: Dave Johnson <da...@rollerweblogger.org>
Authored: Tue Jan 21 12:36:17 2014 -0800
Committer: Dave Johnson <da...@rollerweblogger.org>
Committed: Tue Jan 21 12:36:17 2014 -0800

----------------------------------------------------------------------
 stack/.gitignore                                |   1 +
 stack/corepersistence/collection/pom.xml        |  61 +++++-
 .../astyanax/AstyanaxKeyspaceProvider.java      |  28 ++-
 .../collection/astyanax/CassandraFig.java       |   2 +-
 .../cassandra/AvailablePortFinder.java          | 187 +++++++++++++++++++
 .../collection/guice/CollectionModule.java      |  37 ++++
 .../src/main/resources/usergrid.properties      |   1 +
 .../cassandra/AvailablePortFinder.java          | 187 -------------------
 .../collection/cassandra/CassandraRule.java     |  27 +--
 ...MvccEntitySerializationStrategyImplTest.java |  22 ++-
 .../src/test/resources/log4j.properties         |  12 +-
 .../src/test/resources/usergrid-CHOP.properties |  12 ++
 .../src/test/resources/usergrid-UNIT.properties |   1 +
 .../persistence/model/field/EntityTest.java     |   4 +-
 14 files changed, 357 insertions(+), 225 deletions(-)
----------------------------------------------------------------------



[18/20] git commit: Merge branch 'two-dot-o' of https://github.com/usergrid/usergrid into two-dot-o

Posted by sn...@apache.org.
Merge branch 'two-dot-o' of https://github.com/usergrid/usergrid into two-dot-o


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

Branch: refs/heads/two-dot-o
Commit: ffaf1233bd63cf5bc9d6c8a189202092b19625a3
Parents: 47cd79a 53e2ade
Author: Alex Karasulu <ak...@gmail.com>
Authored: Tue Jan 21 21:26:50 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Tue Jan 21 21:26:50 2014 +0200

----------------------------------------------------------------------
 .../DynamicCompositeFieldSerializer.java        |  5 +-
 .../IdColDynamicCompositeSerializer.java        |  5 +-
 .../persistence/collection/CollectionScope.java | 18 ++++++
 .../collection/EntityCollectionManager.java     | 18 ++++++
 .../EntityCollectionManagerFactory.java         | 52 +++++++++++++-----
 .../collection/EntityCollectionManagerSync.java | 20 ++++++-
 .../collection/OrganizationScope.java           | 18 ++++++
 .../astyanax/AstyanaxKeyspaceProvider.java      | 18 ++++++
 .../collection/astyanax/CassandraFig.java       | 18 ++++++
 .../astyanax/CompositeFieldSerializer.java      | 18 ++++++
 .../astyanax/IdRowCompositeSerializer.java      | 18 ++++++
 .../astyanax/MultiTennantColumnFamily.java      | 21 ++++++-
 .../MultiTennantColumnFamilyDefinition.java     | 18 ++++++
 .../collection/astyanax/ScopedRowKey.java       | 22 +++++++-
 .../collection/guice/PropertyUtils.java         | 18 ++++++
 .../collection/impl/CollectionScopeImpl.java    | 18 ++++++
 .../impl/EntityCollectionManagerImpl.java       | 18 ++++++
 .../impl/EntityCollectionManagerSyncImpl.java   | 18 ++++++
 .../collection/migration/Migration.java         | 18 ++++++
 .../migration/MigrationException.java           | 18 ++++++
 .../collection/migration/MigrationManager.java  | 18 ++++++
 .../mvcc/MvccEntitySerializationStrategy.java   | 18 ++++++
 .../mvcc/MvccLogEntrySerializationStrategy.java | 18 ++++++
 .../collection/mvcc/entity/MvccEntity.java      | 18 ++++++
 .../collection/mvcc/entity/MvccLogEntry.java    | 18 ++++++
 .../collection/mvcc/entity/Stage.java           | 18 ++++++
 .../collection/mvcc/entity/ValidationUtils.java | 18 ++++++
 .../mvcc/entity/impl/MvccEntityImpl.java        | 21 ++++++-
 .../mvcc/entity/impl/MvccLogEntryImpl.java      | 18 ++++++
 .../mvcc/event/PostProcessObserver.java         | 21 ++++++-
 .../mvcc/stage/CollectionIoEvent.java           | 19 ++++++-
 .../mvcc/stage/delete/DeleteCommit.java         | 46 +++++++++++-----
 .../mvcc/stage/delete/DeleteStart.java          | 31 +++++++++--
 .../collection/mvcc/stage/load/Load.java        | 30 ++++++++--
 .../mvcc/stage/write/UniqueValueImpl.java       |  2 +-
 .../collection/rx/CassandraThreadScheduler.java | 44 ++++++++++-----
 .../persistence/collection/rx/Concurrent.java   | 42 ++++++++++----
 .../persistence/collection/rx/RxFig.java        | 18 ++++++
 .../model/builder/EntitySerializer.java         | 19 ++++++-
 .../model/builder/EntitySerializerFactory.java  | 20 ++++++-
 .../persistence/model/entity/Entity.java        | 22 ++++++--
 .../usergrid/persistence/model/entity/Id.java   | 18 ++++++
 .../persistence/model/entity/SimpleId.java      | 18 ++++++
 .../persistence/model/field/ArrayField.java     | 48 ++++++++++------
 .../persistence/model/field/BooleanField.java   |  2 -
 .../model/field/ByteBufferField.java            | 40 ++++++++++----
 .../persistence/model/field/DoubleField.java    |  2 -
 .../model/field/EntityObjectField.java          | 33 ++++++++---
 .../usergrid/persistence/model/field/Field.java | 24 ++++++--
 .../persistence/model/field/IntegerField.java   |  2 -
 .../persistence/model/field/ListField.java      | 44 ++++++++++-----
 .../persistence/model/field/LocationField.java  | 36 +++++++++---
 .../persistence/model/field/SetField.java       | 44 ++++++++++-----
 .../model/field/value/EntityObject.java         | 58 +++++++++++++-------
 .../persistence/model/field/value/Location.java | 39 ++++++++-----
 .../usergrid/persistence/model/util/Verify.java | 21 ++++++-
 stack/rest/pom.xml                              |  8 +--
 stack/rest/src/test/resources/log4j.properties  |  2 +-
 58 files changed, 1085 insertions(+), 210 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ffaf1233/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ffaf1233/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/CassandraFig.java
----------------------------------------------------------------------


[11/20] git commit: make sure we select the users availabilityZone properly

Posted by sn...@apache.org.
make sure we select the users availabilityZone properly


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

Branch: refs/heads/two-dot-o
Commit: cc471b502aca2791c3a068f93d15b79ff6b7b827
Parents: 265d7df
Author: Alex Karasulu <ak...@gmail.com>
Authored: Thu Jan 16 15:59:19 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Thu Jan 16 15:59:19 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cc471b50/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index 6852486..1449f3b 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -68,6 +68,7 @@
         <configuration>
           <accessKey>${aws.s3.key}</accessKey>
           <secretKey>${aws.s3.secret}</secretKey>
+          <availabilityZone>${availabilityZone}</availabilityZone>
           <bucketName>${aws.s3.bucket}</bucketName>
           <managerAppUsername>admin</managerAppUsername>
           <managerAppPassword>${manager.app.password}</managerAppPassword>


[09/20] git commit: blow up is still present just testing with a single iteration - have to commit to be able to get chop to respond

Posted by sn...@apache.org.
blow up is still present just testing with a single iteration - have to commit to be able to get chop to respond


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

Branch: refs/heads/two-dot-o
Commit: 7072b85746a980bc5dd9923ccdc9e0ed8e4eb19e
Parents: 2795d0c
Author: Alex Karasulu <ak...@gmail.com>
Authored: Thu Jan 16 02:41:43 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Thu Jan 16 02:41:43 2014 +0200

----------------------------------------------------------------------
 .../impl/MvccEntitySerializationStrategyImplTest.java              | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/7072b857/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
index e62a471..7248bac 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
@@ -65,7 +65,7 @@ import static org.mockito.Mockito.mock;
 
 
 /** @author tnine */
-@IterationChop( iterations = 1000, threads = 9 )
+@IterationChop( iterations = 1, threads = 1 )
 @RunWith( JukitoRunner.class )
 @UseModules( CollectionModule.class )
 public class MvccEntitySerializationStrategyImplTest {


[17/20] git commit: chop settings that hold in the performance test environment

Posted by sn...@apache.org.
chop settings that hold in the performance test environment


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

Branch: refs/heads/two-dot-o
Commit: 47cd79a371d98efef05f449c6cc01847171d9f3b
Parents: 8781eaf
Author: Alex Karasulu <ak...@gmail.com>
Authored: Tue Jan 21 21:26:34 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Tue Jan 21 21:26:34 2014 +0200

----------------------------------------------------------------------
 stack/corepersistence/collection/pom.xml | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/47cd79a3/stack/corepersistence/collection/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/pom.xml b/stack/corepersistence/collection/pom.xml
index 29a0c6b..31ceec0 100644
--- a/stack/corepersistence/collection/pom.xml
+++ b/stack/corepersistence/collection/pom.xml
@@ -5,10 +5,10 @@
 
   <properties>
     <guice.version>3.0</guice.version>
-    <guicyfig.version>3.3-SNAPSHOT</guicyfig.version>
+    <guicyfig.version>3.3</guicyfig.version>
     <slf4j.version>1.7.2</slf4j.version>
     <log4j.version>1.2.17</log4j.version>
-    <chop.version>1.0-SNAPSHOT</chop.version>
+    <chop.version>1.0</chop.version>
   </properties>
 
     <parent>
@@ -59,7 +59,7 @@
         <plugin>
           <groupId>org.safehaus.chop</groupId>
           <artifactId>chop-maven-plugin</artifactId>
-          <version>1.0-SNAPSHOT</version>
+          <version>${chop.version}</version>
 
           <!--
           NOTE: you should be putting most of these variables into your settings.xml
@@ -83,7 +83,7 @@
             <coldRestartTomcat>true</coldRestartTomcat>
             <awsSecurityGroup>${security.group}</awsSecurityGroup>
             <runnerKeyPairName>${runner.keypair.name}</runnerKeyPairName>
-            <runnerCount>12</runnerCount>
+            <runnerCount>6</runnerCount>
             <securityGroupExceptions>
               <!--
               Add your own IP address as an exception to allow access
@@ -108,14 +108,6 @@
 
       <!-- Google Guice Integration Test Injectors -->
 
-      <dependency>
-        <groupId>${project.parent.groupId}</groupId>
-        <artifactId>testutils</artifactId>
-        <version>${project.version}</version>
-        <scope>test</scope>
-      </dependency>
-
-        <!-- Depends on the basic models -->
         <dependency>
             <groupId>${project.parent.groupId}</groupId>
             <artifactId>model</artifactId>


[04/20] git commit: Because of the way we initialize modules and configurations we need to be able to access the available port finder inside the collection module. I moved that over to the main source folder instead of test and cleaned up some of the co

Posted by sn...@apache.org.
Because of the way we initialize modules and configurations we need
to be able to access the available port finder inside the collection
module. I moved that over to the main source folder instead of test
and cleaned up some of the code used to handle the thrift and gossip
ports for the CassandraRule. Also found a bug associated with running
in the UNIT deployment context in CassandraRule.


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

Branch: refs/heads/two-dot-o
Commit: 4c29d3064d36fa608ec138456efd57f1e27c9309
Parents: a5bae70
Author: Alex Karasulu <ak...@gmail.com>
Authored: Wed Jan 15 18:35:51 2014 +0200
Committer: Alex Karasulu <ak...@gmail.com>
Committed: Wed Jan 15 18:35:51 2014 +0200

----------------------------------------------------------------------
 .../astyanax/AstyanaxKeyspaceProvider.java      |   2 +-
 .../collection/astyanax/CassandraFig.java       |   2 +-
 .../cassandra/AvailablePortFinder.java          | 187 +++++++++++++++++++
 .../collection/guice/CollectionModule.java      |  37 ++++
 .../cassandra/AvailablePortFinder.java          | 187 -------------------
 .../collection/cassandra/CassandraRule.java     |  22 +--
 ...MvccEntitySerializationStrategyImplTest.java |  21 +--
 7 files changed, 233 insertions(+), 225 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4c29d306/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
index 512f2fa..e1fc105 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/AstyanaxKeyspaceProvider.java
@@ -38,7 +38,7 @@ public class AstyanaxKeyspaceProvider implements Provider<Keyspace> {
 
         ConnectionPoolConfiguration connectionPoolConfiguration =
                 new ConnectionPoolConfigurationImpl( "UsergridConnectionPool" )
-                        .setPort( cassandraConfig.getPort() )
+                        .setPort( cassandraConfig.getThriftPort() )
                         .setMaxConnsPerHost( cassandraConfig.getConnections() )
                         .setSeeds( cassandraConfig.getHosts() )
                         .setSocketTimeout( cassandraConfig.getTimeout() );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4c29d306/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/CassandraFig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/CassandraFig.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/CassandraFig.java
index 0728656..cfc361b 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/CassandraFig.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/astyanax/CassandraFig.java
@@ -29,7 +29,7 @@ public interface CassandraFig extends GuicyFig {
 
     @Key( "cassandra.port" )
     @Default( "9160" )
-    int getPort();
+    int getThriftPort();
 
     @Key( "cassandra.connections" )
     @Default( "20" )

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4c29d306/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/cassandra/AvailablePortFinder.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/cassandra/AvailablePortFinder.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/cassandra/AvailablePortFinder.java
new file mode 100644
index 0000000..f18d728
--- /dev/null
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/cassandra/AvailablePortFinder.java
@@ -0,0 +1,187 @@
+/*
+ *  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.collection.cassandra;
+
+
+import java.io.IOException;
+import java.net.DatagramSocket;
+import java.net.ServerSocket;
+import java.util.NoSuchElementException;
+import java.util.Set;
+import java.util.TreeSet;
+
+
+/**
+ * Finds currently available server ports.
+ *
+ * @author <a href="http://mina.apache.org">Apache MINA Project</a>
+ * @see <a href="http://www.iana.org/assignments/port-numbers">IANA.org</a>
+ */
+public class AvailablePortFinder {
+    /** The minimum number of server port number. */
+    public static final int MIN_PORT_NUMBER = 1;
+
+    /** The maximum number of server port number. */
+    public static final int MAX_PORT_NUMBER = 49151;
+
+
+    /** Creates a new instance. */
+    private AvailablePortFinder() {
+        // Do nothing
+    }
+
+
+    /**
+     * Returns the {@link java.util.Set} of currently available port numbers ({@link Integer}).  This method is identical to
+     * <code>getAvailablePorts(MIN_PORT_NUMBER, MAX_PORT_NUMBER)</code>.
+     * <p/>
+     * WARNING: this can take a very long time.
+     */
+    public static Set<Integer> getAvailablePorts() {
+        return getAvailablePorts( MIN_PORT_NUMBER, MAX_PORT_NUMBER );
+    }
+
+
+    /**
+     * Gets an available port, selected by the system.
+     *
+     * @throws java.util.NoSuchElementException if there are no ports available
+     */
+    public static int getNextAvailable() {
+        ServerSocket serverSocket = null;
+
+        try {
+            // Here, we simply return an available port found by the system
+            serverSocket = new ServerSocket( 0 );
+            int port = serverSocket.getLocalPort();
+
+            // Don't forget to close the socket...
+            serverSocket.close();
+
+            return port;
+        }
+        catch ( IOException ioe ) {
+            throw new NoSuchElementException( ioe.getMessage() );
+        }
+    }
+
+
+    /**
+     * Gets the next available port starting at a port.
+     *
+     * @param fromPort the port to scan for availability
+     *
+     * @throws java.util.NoSuchElementException if there are no ports available
+     */
+    public static int getNextAvailable( int fromPort ) {
+        if ( fromPort < MIN_PORT_NUMBER || fromPort > MAX_PORT_NUMBER ) {
+            throw new IllegalArgumentException( "Invalid start port: " + fromPort );
+        }
+
+        for ( int i = fromPort; i <= MAX_PORT_NUMBER; i++ ) {
+            if ( available( i ) ) {
+                return i;
+            }
+        }
+
+        throw new NoSuchElementException( "Could not find an available port " + "above " + fromPort );
+    }
+
+
+    /**
+     * Checks to see if a specific port is available.
+     *
+     * @param port the port to check for availability
+     */
+    public static boolean available( int port ) {
+        if ( port < MIN_PORT_NUMBER || port > MAX_PORT_NUMBER ) {
+            throw new IllegalArgumentException( "Invalid start port: " + port );
+        }
+
+        ServerSocket ss = null;
+        DatagramSocket ds = null;
+
+        try {
+            ss = new ServerSocket( port );
+            ss.setReuseAddress( true );
+            ds = new DatagramSocket( port );
+            ds.setReuseAddress( true );
+            return true;
+        }
+        catch ( IOException e ) {
+            // Do nothing
+        }
+        finally {
+            if ( ds != null ) {
+                ds.close();
+            }
+
+            if ( ss != null ) {
+                try {
+                    ss.close();
+                }
+                catch ( IOException e ) {
+                    /* should not be thrown */
+                }
+            }
+        }
+
+        return false;
+    }
+
+
+    /**
+     * Returns the {@link java.util.Set} of currently avaliable port numbers ({@link Integer}) between the specified port range.
+     *
+     * @throws IllegalArgumentException if port range is not between {@link #MIN_PORT_NUMBER} and {@link
+     * #MAX_PORT_NUMBER} or <code>fromPort</code> if greater than <code>toPort</code>.
+     */
+    public static Set<Integer> getAvailablePorts( int fromPort, int toPort ) {
+        if ( fromPort < MIN_PORT_NUMBER || toPort > MAX_PORT_NUMBER || fromPort > toPort ) {
+            throw new IllegalArgumentException( "Invalid port range: " + fromPort + " ~ " + toPort );
+        }
+
+        Set<Integer> result = new TreeSet<Integer>();
+
+        for ( int i = fromPort; i <= toPort; i++ ) {
+            ServerSocket s = null;
+
+            try {
+                s = new ServerSocket( i );
+                result.add( new Integer( i ) );
+            }
+            catch ( IOException e ) {
+                // Do nothing
+            }
+            finally {
+                if ( s != null ) {
+                    try {
+                        s.close();
+                    }
+                    catch ( IOException e ) {
+                        /* should not be thrown */
+                    }
+                }
+            }
+        }
+
+        return result;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4c29d306/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
index 8bc2a79..c35464b 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
@@ -1,12 +1,16 @@
 package org.apache.usergrid.persistence.collection.guice;
 
 
+import java.io.IOException;
+
+import org.safehaus.guicyfig.Env;
 import org.safehaus.guicyfig.GuicyFigModule;
 
 import org.apache.usergrid.persistence.collection.EntityCollectionManager;
 import org.apache.usergrid.persistence.collection.EntityCollectionManagerFactory;
 import org.apache.usergrid.persistence.collection.EntityCollectionManagerSync;
 import org.apache.usergrid.persistence.collection.astyanax.CassandraFig;
+import org.apache.usergrid.persistence.collection.cassandra.AvailablePortFinder;
 import org.apache.usergrid.persistence.collection.impl.EntityCollectionManagerImpl;
 import org.apache.usergrid.persistence.collection.impl.EntityCollectionManagerSyncImpl;
 import org.apache.usergrid.persistence.collection.migration.MigrationManagerFig;
@@ -17,7 +21,10 @@ import org.apache.usergrid.persistence.collection.serialization.impl.Serializati
 import org.apache.usergrid.persistence.collection.service.impl.ServiceModule;
 
 import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
 import com.google.inject.assistedinject.FactoryModuleBuilder;
+import com.netflix.config.ConfigurationManager;
 
 import rx.Scheduler;
 
@@ -29,6 +36,36 @@ import rx.Scheduler;
  */
 public class CollectionModule extends AbstractModule {
 
+    static {
+        /*
+         * --------------------------------------------------------------------
+         * Archaius Configuration Settings
+         * --------------------------------------------------------------------
+         */
+
+        try {
+            ConfigurationManager.loadCascadedPropertiesFromResources( "usergrid" );
+        }
+        catch ( IOException e ) {
+            throw new RuntimeException( "Cannot do much without properly loading our configuration.", e );
+        }
+
+        Injector injector = Guice.createInjector( new GuicyFigModule( CassandraFig.class, RxFig.class ) );
+        CassandraFig cassandraFig = injector.getInstance( CassandraFig.class );
+        RxFig rxFig = injector.getInstance( RxFig.class );
+
+        Env env = Env.getEnvironment();
+        if ( env == Env.UNIT || env == Env.ALL ) {
+            String thriftPort = String.valueOf( AvailablePortFinder.getNextAvailable() );
+            cassandraFig.bypass( "getThriftPort", thriftPort );
+            cassandraFig.bypass( "getConnections", "20" );
+            rxFig.bypass( "getMaxThreadCount", "20" );
+            cassandraFig.bypass( "getHosts", "localhost" );
+            cassandraFig.bypass( "getClusterName", "Usergrid" );
+            cassandraFig.bypass( "getKeyspaceName", "Usergrid_Collections" );
+        }
+    }
+
     @Override
     protected void configure() {
         //noinspection unchecked

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4c29d306/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/AvailablePortFinder.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/AvailablePortFinder.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/AvailablePortFinder.java
deleted file mode 100644
index f18d728..0000000
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/AvailablePortFinder.java
+++ /dev/null
@@ -1,187 +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.collection.cassandra;
-
-
-import java.io.IOException;
-import java.net.DatagramSocket;
-import java.net.ServerSocket;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.TreeSet;
-
-
-/**
- * Finds currently available server ports.
- *
- * @author <a href="http://mina.apache.org">Apache MINA Project</a>
- * @see <a href="http://www.iana.org/assignments/port-numbers">IANA.org</a>
- */
-public class AvailablePortFinder {
-    /** The minimum number of server port number. */
-    public static final int MIN_PORT_NUMBER = 1;
-
-    /** The maximum number of server port number. */
-    public static final int MAX_PORT_NUMBER = 49151;
-
-
-    /** Creates a new instance. */
-    private AvailablePortFinder() {
-        // Do nothing
-    }
-
-
-    /**
-     * Returns the {@link java.util.Set} of currently available port numbers ({@link Integer}).  This method is identical to
-     * <code>getAvailablePorts(MIN_PORT_NUMBER, MAX_PORT_NUMBER)</code>.
-     * <p/>
-     * WARNING: this can take a very long time.
-     */
-    public static Set<Integer> getAvailablePorts() {
-        return getAvailablePorts( MIN_PORT_NUMBER, MAX_PORT_NUMBER );
-    }
-
-
-    /**
-     * Gets an available port, selected by the system.
-     *
-     * @throws java.util.NoSuchElementException if there are no ports available
-     */
-    public static int getNextAvailable() {
-        ServerSocket serverSocket = null;
-
-        try {
-            // Here, we simply return an available port found by the system
-            serverSocket = new ServerSocket( 0 );
-            int port = serverSocket.getLocalPort();
-
-            // Don't forget to close the socket...
-            serverSocket.close();
-
-            return port;
-        }
-        catch ( IOException ioe ) {
-            throw new NoSuchElementException( ioe.getMessage() );
-        }
-    }
-
-
-    /**
-     * Gets the next available port starting at a port.
-     *
-     * @param fromPort the port to scan for availability
-     *
-     * @throws java.util.NoSuchElementException if there are no ports available
-     */
-    public static int getNextAvailable( int fromPort ) {
-        if ( fromPort < MIN_PORT_NUMBER || fromPort > MAX_PORT_NUMBER ) {
-            throw new IllegalArgumentException( "Invalid start port: " + fromPort );
-        }
-
-        for ( int i = fromPort; i <= MAX_PORT_NUMBER; i++ ) {
-            if ( available( i ) ) {
-                return i;
-            }
-        }
-
-        throw new NoSuchElementException( "Could not find an available port " + "above " + fromPort );
-    }
-
-
-    /**
-     * Checks to see if a specific port is available.
-     *
-     * @param port the port to check for availability
-     */
-    public static boolean available( int port ) {
-        if ( port < MIN_PORT_NUMBER || port > MAX_PORT_NUMBER ) {
-            throw new IllegalArgumentException( "Invalid start port: " + port );
-        }
-
-        ServerSocket ss = null;
-        DatagramSocket ds = null;
-
-        try {
-            ss = new ServerSocket( port );
-            ss.setReuseAddress( true );
-            ds = new DatagramSocket( port );
-            ds.setReuseAddress( true );
-            return true;
-        }
-        catch ( IOException e ) {
-            // Do nothing
-        }
-        finally {
-            if ( ds != null ) {
-                ds.close();
-            }
-
-            if ( ss != null ) {
-                try {
-                    ss.close();
-                }
-                catch ( IOException e ) {
-                    /* should not be thrown */
-                }
-            }
-        }
-
-        return false;
-    }
-
-
-    /**
-     * Returns the {@link java.util.Set} of currently avaliable port numbers ({@link Integer}) between the specified port range.
-     *
-     * @throws IllegalArgumentException if port range is not between {@link #MIN_PORT_NUMBER} and {@link
-     * #MAX_PORT_NUMBER} or <code>fromPort</code> if greater than <code>toPort</code>.
-     */
-    public static Set<Integer> getAvailablePorts( int fromPort, int toPort ) {
-        if ( fromPort < MIN_PORT_NUMBER || toPort > MAX_PORT_NUMBER || fromPort > toPort ) {
-            throw new IllegalArgumentException( "Invalid port range: " + fromPort + " ~ " + toPort );
-        }
-
-        Set<Integer> result = new TreeSet<Integer>();
-
-        for ( int i = fromPort; i <= toPort; i++ ) {
-            ServerSocket s = null;
-
-            try {
-                s = new ServerSocket( i );
-                result.add( new Integer( i ) );
-            }
-            catch ( IOException e ) {
-                // Do nothing
-            }
-            finally {
-                if ( s != null ) {
-                    try {
-                        s.close();
-                    }
-                    catch ( IOException e ) {
-                        /* should not be thrown */
-                    }
-                }
-            }
-        }
-
-        return result;
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4c29d306/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
index ab94574..a9123c1 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/cassandra/CassandraRule.java
@@ -4,6 +4,7 @@ package org.apache.usergrid.persistence.collection.cassandra;
 import java.io.File;
 import java.io.IOException;
 
+import org.safehaus.guicyfig.Env;
 import org.safehaus.guicyfig.EnvironResource;
 import org.safehaus.guicyfig.GuicyFigModule;
 import org.slf4j.Logger;
@@ -25,10 +26,6 @@ import com.netflix.astyanax.test.EmbeddedCassandra;
 public class CassandraRule extends EnvironResource {
     private static final Logger LOG = LoggerFactory.getLogger( CassandraRule.class );
 
-    public static final int THRIFT_PORT = AvailablePortFinder.getNextAvailable();
-    public static final int GOSSIP_PORT = AvailablePortFinder.getNextAvailable();
-    public static final String THRIFT_PORT_STR = Integer.toString( THRIFT_PORT );
-
     private static final Object mutex = new Object();
 
     private static EmbeddedCassandra cass;
@@ -39,7 +36,7 @@ public class CassandraRule extends EnvironResource {
 
 
     public CassandraRule() {
-        super();
+        super( Env.UNIT );
 
         Injector injector = Guice.createInjector( new GuicyFigModule( CassandraFig.class ) );
         cassandraFig = injector.getInstance( CassandraFig.class );
@@ -53,11 +50,6 @@ public class CassandraRule extends EnvironResource {
 
     @Override
     protected void before() throws Throwable {
-        cassandraFig.override( "getPort", THRIFT_PORT_STR );
-        cassandraFig.override( "getConnections", "20" );
-        cassandraFig.override( "getHosts", "localhost" );
-        cassandraFig.override( "getClusterName", "Usergrid" );
-        cassandraFig.override( "getKeyspaceName", "Usergrid_Collections" );
 
         if ( started ) {
             return;
@@ -65,13 +57,6 @@ public class CassandraRule extends EnvironResource {
 
         synchronized ( mutex ) {
 
-            //we're late to the party, bail
-            if ( started ) {
-                return;
-            }
-
-            cassandraFig.bypass( "getPort", THRIFT_PORT_STR );
-
             File dataDir = Files.createTempDir();
             dataDir.deleteOnExit();
 
@@ -83,7 +68,8 @@ public class CassandraRule extends EnvironResource {
             try {
                 LOG.info( "Starting cassandra" );
 
-                cass = new EmbeddedCassandra( dataDir, "Usergrid", THRIFT_PORT, GOSSIP_PORT );
+                cass = new EmbeddedCassandra( dataDir, "Usergrid", cassandraFig.getThriftPort(),
+                        AvailablePortFinder.getNextAvailable() );
                 cass.start();
 
                 LOG.info( "Cassandra started" );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4c29d306/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
index 97dc803..c18158d 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
@@ -16,6 +16,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.safehaus.chop.api.IterationChop;
 import org.safehaus.guicyfig.Env;
+import org.safehaus.guicyfig.GuicyFigModule;
 import org.safehaus.guicyfig.Option;
 import org.safehaus.guicyfig.Overrides;
 
@@ -45,7 +46,9 @@ import org.apache.usergrid.persistence.model.field.UUIDField;
 import org.apache.usergrid.persistence.model.util.UUIDGenerator;
 
 import com.google.common.base.Optional;
+import com.google.inject.Guice;
 import com.google.inject.Inject;
+import com.google.inject.Injector;
 import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
 import com.netflix.config.ConfigurationManager;
 
@@ -66,20 +69,6 @@ public class MvccEntitySerializationStrategyImplTest {
     /** Our RX I/O threads and this should have the same value */
     private static final String CONNECTION_COUNT = "20";
 
-    static {
-        /*
-         * --------------------------------------------------------------------
-         * Archaius Configuration Settings
-         * --------------------------------------------------------------------
-         */
-
-        try {
-            ConfigurationManager.loadCascadedPropertiesFromResources( "usergrid" );
-        }
-        catch ( IOException e ) {
-            throw new RuntimeException( "Cannot do much without properly loading our configuration.", e );
-        }
-    }
 
     @Inject
     private MvccEntitySerializationStrategy serializationStrategy;
@@ -122,12 +111,8 @@ public class MvccEntitySerializationStrategyImplTest {
 
     @Before
     public void setupClass() {
-
         assertNotNull( cassandraFig );
-        cassandraFig.bypass( "getPort", CassandraRule.THRIFT_PORT_STR );
-
         assertNotNull( rxFig );
-        rxFig.bypass( "getMaxThreadCount", CassandraRule.THRIFT_PORT_STR );
     }