You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/02/12 23:28:35 UTC

[16/27] incubator-usergrid git commit: Removed concurrent annotations

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManagerFactory.java b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManagerFactory.java
index 3d4827b..f46cd69 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManagerFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManagerFactory.java
@@ -25,24 +25,15 @@ import org.springframework.context.ApplicationContext;
 
 
 /**
- * The interface that specifies the operations that can be performed on the Usergrid Datastore. 
- * This interface is designed to be implemented by different backends. Although these 
- * operations are meant to take advantage of the capabilities of Cassandra, they should be 
- * implementable using other relational databases such as MySql or NoSQL databases such as GAE or 
+ * The interface that specifies the operations that can be performed on the Usergrid Datastore.
+ * This interface is designed to be implemented by different backends. Although these
+ * operations are meant to take advantage of the capabilities of Cassandra, they should be
+ * implementable using other relational databases such as MySql or NoSQL databases such as GAE or
  * MongoDB.
  */
 public interface EntityManagerFactory {
 
     /**
-     * A string description provided by the implementing class.
-     *
-     * @return description text
-     *
-     * @throws Exception the exception
-     */
-    public abstract String getImpementationDescription() throws Exception;
-
-    /**
      * Gets the entity manager.
      *
      * @param applicationId the application id
@@ -63,7 +54,7 @@ public interface EntityManagerFactory {
     public abstract UUID createApplication( String organizationName, String name ) throws Exception;
 
     /**
-     * Creates a Application entity. All entities except for applications must be attached to a 
+     * Creates a Application entity. All entities except for applications must be attached to a
      * Application.
      *
      * @param name the name of the application to create.
@@ -73,7 +64,7 @@ public interface EntityManagerFactory {
      *
      * @throws Exception the exception
      */
-    public abstract UUID createApplication( 
+    public abstract UUID createApplication(
             String organizationName, String name, Map<String, Object> properties ) throws Exception;
 
     public abstract UUID importApplication( String organization, UUID applicationId, String name,
@@ -109,9 +100,9 @@ public interface EntityManagerFactory {
 
     public abstract boolean deleteServiceProperty( String name );
 
-    public UUID initializeApplication( 
+    public UUID initializeApplication(
         String orgName, UUID appId, String appName, Map<String, Object> props) throws Exception;
-            
+
     public UUID getManagementAppId();
 
     public UUID getDefaultAppId();
@@ -119,7 +110,7 @@ public interface EntityManagerFactory {
     public void refreshIndex();
 
     public void rebuildAllIndexes( ProgressObserver po ) throws Exception;
-    
+
     public void rebuildInternalIndexes( ProgressObserver po ) throws Exception;
 
     public void rebuildApplicationIndexes( UUID appId, ProgressObserver po ) throws Exception;
@@ -148,8 +139,6 @@ public interface EntityManagerFactory {
      */
     public void setMigrationVersion(int version);
 
-    public void setApplicationContext(ApplicationContext ac);
-
     /**
      * Perform a realtime count of every entity in the system.  This can be slow as it traverses the entire system graph
      * @return

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java
index f073da7..086b039 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImpl.java
@@ -116,20 +116,10 @@ public class EntityManagerFactoryImpl implements EntityManagerFactory, Applicati
     }
 
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.usergrid.core.Datastore#getImpementationDescription()
-     */
-    @Override
-    public String getImpementationDescription() {
-        return IMPLEMENTATION_DESCRIPTION;
-    }
-
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.apache.usergrid.core.Datastore#getEntityDao(java.util.UUID,
      * java.util.UUID)
      */
@@ -181,7 +171,7 @@ public class EntityManagerFactoryImpl implements EntityManagerFactory, Applicati
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.apache.usergrid.core.Datastore#createApplication(java.lang.String)
      */
     @Override
@@ -192,7 +182,7 @@ public class EntityManagerFactoryImpl implements EntityManagerFactory, Applicati
 
     /*
      * (non-Javadoc)
-     * 
+     *
      * @see org.apache.usergrid.core.Datastore#createApplication(java.lang.String,
      * java.util.Map)
      */
@@ -413,7 +403,7 @@ public class EntityManagerFactoryImpl implements EntityManagerFactory, Applicati
 
     @Override
     public UUID getDefaultAppId() {
-        return DEFAULT_APPLICATION_ID; 
+        return DEFAULT_APPLICATION_ID;
     }
 
     @Override
@@ -428,17 +418,17 @@ public class EntityManagerFactoryImpl implements EntityManagerFactory, Applicati
 
     @Override
     public void rebuildInternalIndexes(ProgressObserver po) throws Exception {
-        throw new UnsupportedOperationException("Not supported."); 
+        throw new UnsupportedOperationException("Not supported.");
     }
 
     @Override
     public void rebuildAllIndexes(ProgressObserver po) throws Exception {
-        throw new UnsupportedOperationException("Not supported."); 
+        throw new UnsupportedOperationException("Not supported.");
     }
 
     @Override
     public void rebuildApplicationIndexes(UUID appId, ProgressObserver po) throws Exception {
-        throw new UnsupportedOperationException("Not supported."); 
+        throw new UnsupportedOperationException("Not supported.");
     }
 
 
@@ -468,7 +458,7 @@ public class EntityManagerFactoryImpl implements EntityManagerFactory, Applicati
 
     @Override
     public void rebuildCollectionIndex(UUID appId, String collection, ProgressObserver po) {
-        throw new UnsupportedOperationException("Not supported."); 
+        throw new UnsupportedOperationException("Not supported.");
     }
 
     @Override
@@ -478,6 +468,6 @@ public class EntityManagerFactoryImpl implements EntityManagerFactory, Applicati
 
     @Override
     public Health getEntityStoreHealth() {
-        throw new UnsupportedOperationException("Not supported yet."); 
+        throw new UnsupportedOperationException("Not supported yet.");
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
index a0c4c5b..277f208 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/EntityManagerImpl.java
@@ -218,7 +218,7 @@ public class EntityManagerImpl implements EntityManager {
     }
 
 
-    public EntityManager init( 
+    public EntityManager init(
             EntityManagerFactoryImpl emf, CassandraService cass, CounterUtils counterUtils,
             UUID applicationId, boolean skipAggregateCounters ) {
 
@@ -523,7 +523,7 @@ public class EntityManagerImpl implements EntityManager {
          * both entities will be unable to update and must be deleted
          */
 
-        Set<UUID> ownerEntityIds = getUUIDsForUniqueProperty( 
+        Set<UUID> ownerEntityIds = getUUIDsForUniqueProperty(
             new SimpleEntityRef(Application.ENTITY_TYPE, applicationId), entityType, propertyName, propertyValue );
 
         //if there are no entities for this property, we know it's unique.  If there are,
@@ -541,17 +541,17 @@ public class EntityManagerImpl implements EntityManager {
      * @param propertyName The name of the unique property
      * @param propertyValue The value of the unique property
      */
-    private Set<UUID> getUUIDsForUniqueProperty( 
+    private Set<UUID> getUUIDsForUniqueProperty(
             EntityRef ownerEntityRef, String collectionName, String propertyName,
             Object propertyValue ) throws Exception {
 
 
         String collectionNameInternal = defaultCollectionName( collectionName );
 
-        Object key = createUniqueIndexKey( 
+        Object key = createUniqueIndexKey(
             ownerEntityRef.getUuid(), collectionNameInternal, propertyName, propertyValue );
 
-        List<HColumn<ByteBuffer, ByteBuffer>> cols = cass.getColumns( 
+        List<HColumn<ByteBuffer, ByteBuffer>> cols = cass.getColumns(
             cass.getApplicationKeyspace( applicationId ), ENTITY_UNIQUE, key, null, null, 2, false );
 
 
@@ -568,7 +568,7 @@ public class EntityManagerImpl implements EntityManager {
         }
 
         /**
-         * Doing this in a loop sucks, but we need to account for possibly having more than 
+         * Doing this in a loop sucks, but we need to account for possibly having more than
          * 1 entry in the index due
          * to corruption.  We need to allow them to update, otherwise
          * both entities will be unable to update and must be deleted
@@ -612,11 +612,11 @@ public class EntityManagerImpl implements EntityManager {
 
 
     /**
-     * Create a row key for the entity of the given type with the name and value in the property.  
+     * Create a row key for the entity of the given type with the name and value in the property.
      * Used for fast unique
      * index lookups
      */
-    private Object createUniqueIndexKey( 
+    private Object createUniqueIndexKey(
             UUID ownerId, String collectionName, String propertyName, Object value ) {
         return key( ownerId, collectionName, propertyName, value );
     }
@@ -624,14 +624,14 @@ public class EntityManagerImpl implements EntityManager {
 
     @Override
     @Metered( group = "core", name = "EntityManager_getAlias_single" )
-    public EntityRef getAlias( EntityRef ownerRef, String collectionType, String aliasValue ) 
+    public EntityRef getAlias( EntityRef ownerRef, String collectionType, String aliasValue )
             throws Exception {
 
         Assert.notNull( ownerRef, "ownerRef is required" );
         Assert.notNull( collectionType, "collectionType is required" );
         Assert.notNull( aliasValue, "aliasValue is required" );
 
-        Map<String, EntityRef> results = getAlias( 
+        Map<String, EntityRef> results = getAlias(
                 ownerRef, collectionType, Collections.singletonList( aliasValue ) );
 
         if ( results == null || results.size() == 0 ) {
@@ -643,7 +643,7 @@ public class EntityManagerImpl implements EntityManager {
         if ( results.size() > 1 ) {
             logger.warn(
                 "More than 1 entity with Owner id '{}' of type '{}' and alias '{}' exists.  "
-              + "This is a duplicate alias, and needs audited", 
+              + "This is a duplicate alias, and needs audited",
                     new Object[] { ownerRef, collectionType, aliasValue } );
         }
 
@@ -659,7 +659,7 @@ public class EntityManagerImpl implements EntityManager {
 
     @Override
     @Metered( group = "core", name = "EntityManager_getAlias_multi" )
-    public Map<String, EntityRef> getAlias( 
+    public Map<String, EntityRef> getAlias(
             EntityRef ownerRef, String collectionName, List<String> aliases ) throws Exception {
 
         Assert.notNull( ownerRef, "ownerRef is required" );
@@ -683,8 +683,8 @@ public class EntityManagerImpl implements EntityManager {
 
     @SuppressWarnings( "unchecked" )
     @Override
-    public <A extends Entity> A create( 
-            String entityType, Class<A> entityClass, Map<String, Object> properties ) 
+    public <A extends Entity> A create(
+            String entityType, Class<A> entityClass, Map<String, Object> properties )
             throws Exception {
 
         if ( ( entityType != null ) && ( entityType.startsWith( TYPE_ENTITY ) || entityType
@@ -703,7 +703,7 @@ public class EntityManagerImpl implements EntityManager {
 
 
     @Override
-    public Entity create( UUID importId, String entityType, Map<String, Object> properties ) 
+    public Entity create( UUID importId, String entityType, Map<String, Object> properties )
             throws Exception {
         return create( entityType, null, properties, importId );
     }
@@ -737,7 +737,7 @@ public class EntityManagerImpl implements EntityManager {
      */
     @Metered( group = "core", name = "EntityManager_create" )
     @TraceParticipant
-    public <A extends Entity> A create( 
+    public <A extends Entity> A create(
             String entityType, Class<A> entityClass, Map<String, Object> properties,
             UUID importId ) throws Exception {
 
@@ -755,7 +755,7 @@ public class EntityManagerImpl implements EntityManager {
 
     @SuppressWarnings( "unchecked" )
     @Metered( group = "core", name = "EntityManager_batchCreate" )
-    public <A extends Entity> A batchCreate( 
+    public <A extends Entity> A batchCreate(
             Mutator<ByteBuffer> m, String entityType, Class<A> entityClass,
             Map<String, Object> properties, UUID importId, UUID timestampUuid )
             throws Exception {
@@ -1092,7 +1092,7 @@ public class EntityManagerImpl implements EntityManager {
         Map<String, Object> results = null;
 
         // if (entityType == null) {
-        results = deserializeEntityProperties( cass.getAllColumns( 
+        results = deserializeEntityProperties( cass.getAllColumns(
                 cass.getApplicationKeyspace( applicationId ), ENTITY_PROPERTIES, entity_key ) );
         // } else {
         // Set<String> columnNames = Schema.getPropertyNames(entityType);
@@ -1111,7 +1111,7 @@ public class EntityManagerImpl implements EntityManager {
 
         if ( !entityId.equals( id ) ) {
 
-            logger.error( "Expected entity id {}, found {}. Returning null entity", 
+            logger.error( "Expected entity id {}, found {}. Returning null entity",
                     new Object[]{entityId, id, new Throwable()} );
             return null;
         }
@@ -1134,7 +1134,7 @@ public class EntityManagerImpl implements EntityManager {
      * @throws Exception the exception
      */
     @Metered( group = "core", name = "EntityManager_getEntities" )
-    public <A extends Entity> List<A> getEntities( 
+    public <A extends Entity> List<A> getEntities(
             Collection<UUID> entityIds, Class<A> entityClass ) throws Exception {
 
         List<A> entities = new ArrayList<A>();
@@ -1148,7 +1148,7 @@ public class EntityManagerImpl implements EntityManager {
         Rows<UUID, String, ByteBuffer> results = null;
 
         // if (entityType == null) {
-        results = cass.getRows( cass.getApplicationKeyspace( applicationId ), 
+        results = cass.getRows( cass.getApplicationKeyspace( applicationId ),
                 ENTITY_PROPERTIES, entityIds, ue, se, be );
         // } else {
         // Set<String> columnNames = Schema.getPropertyNames(entityType);
@@ -1406,7 +1406,7 @@ public class EntityManagerImpl implements EntityManager {
      * @throws Exception the exception
      */
     @Metered( group = "core", name = "EntityManager_updateProperties" )
-    public void updateProperties( 
+    public void updateProperties(
             UUID entityId, String type, Map<String, Object> properties ) throws Exception {
 
         EntityRef entity = new SimpleEntityRef( type, entityId );
@@ -1553,8 +1553,8 @@ public class EntityManagerImpl implements EntityManager {
             return new SimpleEntityRef( "user", identifier.getUUID() );
         }
         if ( identifier.isName() ) {
-            return this.getAlias( 
-                    new SimpleEntityRef(Application.ENTITY_TYPE, applicationId), 
+            return this.getAlias(
+                    new SimpleEntityRef(Application.ENTITY_TYPE, applicationId),
                     "user", identifier.getName() );
         }
         if ( identifier.isEmail() ) {
@@ -1565,15 +1565,15 @@ public class EntityManagerImpl implements EntityManager {
             query.setLimit( 1 );
             query.setResultsLevel( REFS );
 
-            Results r = getRelationManager( 
+            Results r = getRelationManager(
                 ref( Application.ENTITY_TYPE, applicationId ) ).searchCollection( "users", query );
             if ( r != null && r.getRef() != null ) {
                 return r.getRef();
             }
             else {
                 // look-aside as it might be an email in the name field
-                return this.getAlias( 
-                        new SimpleEntityRef(Application.ENTITY_TYPE, applicationId), 
+                return this.getAlias(
+                        new SimpleEntityRef(Application.ENTITY_TYPE, applicationId),
                         "user", identifier.getEmail() );
             }
         }
@@ -1590,8 +1590,8 @@ public class EntityManagerImpl implements EntityManager {
             return new SimpleEntityRef( "group", identifier.getUUID() );
         }
         if ( identifier.isName() ) {
-            return this.getAlias( 
-                    new SimpleEntityRef(Application.ENTITY_TYPE, applicationId), 
+            return this.getAlias(
+                    new SimpleEntityRef(Application.ENTITY_TYPE, applicationId),
                     "group", identifier.getName() );
         }
         return null;
@@ -1599,17 +1599,17 @@ public class EntityManagerImpl implements EntityManager {
 
 
     @Override
-    public Results getAggregateCounters( UUID userId, UUID groupId, String category, 
+    public Results getAggregateCounters( UUID userId, UUID groupId, String category,
         String counterName, CounterResolution resolution, long start, long finish, boolean pad ) {
 
-        return this.getAggregateCounters( 
+        return this.getAggregateCounters(
                 userId, groupId, null, category, counterName, resolution, start, finish, pad );
     }
 
 
     @Override
     @Metered( group = "core", name = "EntityManager_getAggregateCounters" )
-    public Results getAggregateCounters( UUID userId, UUID groupId, UUID queueId, String category, 
+    public Results getAggregateCounters( UUID userId, UUID groupId, UUID queueId, String category,
             String counterName, CounterResolution resolution, long start, long finish, boolean pad ) {
 
         start = resolution.round( start );
@@ -1621,7 +1621,7 @@ public class EntityManagerImpl implements EntityManager {
         q.setRange( start, finish, false, ALL_COUNT );
 
         QueryResult<CounterSlice<Long>> r = q.setKey(
-                counterUtils.getAggregateCounterRow( 
+                counterUtils.getAggregateCounterRow(
                         counterName, userId, groupId, queueId, category, resolution ) ).execute();
 
         List<AggregateCounter> counters = new ArrayList<AggregateCounter>();
@@ -1795,7 +1795,7 @@ public class EntityManagerImpl implements EntityManager {
             UUID entityId = entityRef.getUuid();
             String entityType = entityRef.getType();
             try {
-                get( entityRef ).getType(); 
+                get( entityRef ).getType();
             }
             catch ( Exception e ) {
                 logger.error( "Unable to load entity: {}", new Object[] {entityRef.getUuid(), e} );
@@ -1853,7 +1853,7 @@ public class EntityManagerImpl implements EntityManager {
             e = ( A ) getEntity( entityId, ( Class<Entity> ) entityClass );
         }
         catch ( ClassCastException e1 ) {
-            logger.error( "Unable to get typed entity: {} of class {}", 
+            logger.error( "Unable to get typed entity: {} of class {}",
                     new Object[] {entityId, entityClass.getCanonicalName(), e1} );
         }
         return e;
@@ -1861,7 +1861,7 @@ public class EntityManagerImpl implements EntityManager {
 
 
     @Override
-    public Results get( Collection<UUID> entityIds, Class<? extends Entity> entityClass, 
+    public Results get( Collection<UUID> entityIds, Class<? extends Entity> entityClass,
             Level resultsLevel ) throws Exception {
         return fromEntities( getEntities( entityIds, entityClass ) );
     }
@@ -1879,7 +1879,7 @@ public class EntityManagerImpl implements EntityManager {
     }
 
 
-    public Results loadEntities( Results results, Level resultsLevel, 
+    public Results loadEntities( Results results, Level resultsLevel,
             Map<UUID, UUID> associatedMap, int count ) throws Exception {
 
         results = results.trim( count );
@@ -1905,7 +1905,7 @@ public class EntityManagerImpl implements EntityManager {
                     }
                 }
             }
-            List<DynamicEntity> linked = getEntities( 
+            List<DynamicEntity> linked = getEntities(
                     new ArrayList<UUID>( associatedIds.values() ), (Class)null );
 
             for ( DynamicEntity l : linked ) {
@@ -2733,7 +2733,7 @@ public class EntityManagerImpl implements EntityManager {
 
 
     @Override
-    public Results getConnectedEntities( EntityRef entityRef, String connectionType, 
+    public Results getConnectedEntities( EntityRef entityRef, String connectionType,
             String connectedEntityType, Level resultsLevel ) throws Exception {
 
         return getRelationManager( entityRef )
@@ -2742,7 +2742,7 @@ public class EntityManagerImpl implements EntityManager {
 
 
     @Override
-    public Results getConnectingEntities( EntityRef entityRef, String connectionType, 
+    public Results getConnectingEntities( EntityRef entityRef, String connectionType,
             String connectedEntityType, Level resultsLevel ) throws Exception {
 
         return getConnectingEntities( entityRef, connectionType, connectedEntityType, resultsLevel, 0);
@@ -2888,7 +2888,7 @@ public class EntityManagerImpl implements EntityManager {
 
         for ( UUID uuid : ids ) {
             EntityRef ref = new SimpleEntityRef( type, uuid );
-            Entity entity = null; 
+            Entity entity = null;
             try {
                 entity = get( ref );
             } catch (Exception ex) {
@@ -2916,6 +2916,12 @@ public class EntityManagerImpl implements EntityManager {
 
 
     @Override
+    public void deleteIndex() {
+        //no op
+    }
+
+
+    @Override
     public EntityRef getGroupRoleRef( UUID ownerId, String roleName) throws Exception {
         return new SimpleEntityRef( Role.ENTITY_TYPE, SimpleRoleRef.getIdForGroupIdAndRoleName( ownerId, roleName ));
     }
@@ -2924,10 +2930,10 @@ public class EntityManagerImpl implements EntityManager {
     public void flushManagerCaches() {
         // no-op
     }
-    
+
     @Override
     public void reindex(EntityManagerFactory.ProgressObserver po) throws Exception {
-        throw new UnsupportedOperationException("Not supported."); 
+        throw new UnsupportedOperationException("Not supported.");
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/Setup.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/Setup.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/Setup.java
index c9ea0ab..2c060ff 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/Setup.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/Setup.java
@@ -24,14 +24,34 @@ import java.util.UUID;
  */
 public interface Setup {
 
+    /**
+     * Initialize all configuration for the system setup.  DO NOT actually create any keyspaces.
+     * @throws Exception
+     */
     void init() throws Exception;
 
+    /**
+     * Setup the management keyspaces
+     * @throws Exception
+     */
     public void setupSystemKeyspace() throws Exception;
 
+    /**
+     * Setup the application keyspaces
+     * @throws Exception
+     */
     public void setupStaticKeyspace() throws Exception;
 
+    /**
+     * Returns true if both keyspaces exist
+     * @return
+     */
     public boolean keyspacesExist();
 
+    /**
+     * Bootstrap the root application to allow the system to function.
+     * @throws Exception
+     */
     public void createDefaultApplications() throws Exception;
 
     public void setupApplicationKeyspace(UUID applicationId, String appName) throws Exception;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/SetupImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/SetupImpl.java b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/SetupImpl.java
index 3716958..97a7654 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/SetupImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/cassandra/SetupImpl.java
@@ -60,19 +60,14 @@ public class SetupImpl implements Setup {
 
     public synchronized void init() throws Exception {
         cass.init();
-        setupSystemKeyspace();
-        setupStaticKeyspace();
-        createDefaultApplications();
     }
 
 
     public void createDefaultApplications() throws Exception {
         // TODO unique check?
-        ( ( EntityManagerFactory ) emf ).initializeApplication( 
-                DEFAULT_ORGANIZATION, emf.getDefaultAppId(), DEFAULT_APPLICATION, null );
+        emf.initializeApplication( DEFAULT_ORGANIZATION, emf.getDefaultAppId(), DEFAULT_APPLICATION, null );
 
-        ( ( EntityManagerFactory ) emf ).initializeApplication( 
-                DEFAULT_ORGANIZATION, emf.getManagementAppId(), MANAGEMENT_APPLICATION, null );
+        emf.initializeApplication( DEFAULT_ORGANIZATION, emf.getManagementAppId(), MANAGEMENT_APPLICATION, null );
     }
 
 
@@ -85,16 +80,16 @@ public class SetupImpl implements Setup {
 
         logger.info( "Initialize system keyspace" );
 
-        cass.createColumnFamily( SYSTEM_KEYSPACE, createColumnFamilyDefinition( 
+        cass.createColumnFamily( SYSTEM_KEYSPACE, createColumnFamilyDefinition(
                 SYSTEM_KEYSPACE, APPLICATIONS_CF, ComparatorType.BYTESTYPE ) );
 
-        cass.createColumnFamily( SYSTEM_KEYSPACE, createColumnFamilyDefinition( 
+        cass.createColumnFamily( SYSTEM_KEYSPACE, createColumnFamilyDefinition(
                 SYSTEM_KEYSPACE, PROPERTIES_CF, ComparatorType.BYTESTYPE ) );
 
-        cass.createColumnFamily( SYSTEM_KEYSPACE, createColumnFamilyDefinition( 
+        cass.createColumnFamily( SYSTEM_KEYSPACE, createColumnFamilyDefinition(
                 SYSTEM_KEYSPACE, TOKENS_CF, ComparatorType.BYTESTYPE ) );
 
-        cass.createColumnFamily( SYSTEM_KEYSPACE, createColumnFamilyDefinition( 
+        cass.createColumnFamily( SYSTEM_KEYSPACE, createColumnFamilyDefinition(
                 SYSTEM_KEYSPACE, PRINCIPAL_TOKEN_CF, ComparatorType.UUIDTYPE ) );
 
         logger.info( "System keyspace initialized" );
@@ -110,16 +105,16 @@ public class SetupImpl implements Setup {
      * @throws Exception the exception
      */
     @Override
-    public void setupApplicationKeyspace( 
+    public void setupApplicationKeyspace(
             final UUID applicationId, String applicationName ) throws Exception {
 
         if ( !USE_VIRTUAL_KEYSPACES ) {
             String app_keyspace = keyspaceForApplication( applicationId );
 
-            logger.info( "Creating application keyspace " + app_keyspace + " for " 
+            logger.info( "Creating application keyspace " + app_keyspace + " for "
                     + applicationName + " application" );
 
-            cass.createColumnFamily( app_keyspace, createColumnFamilyDefinition( 
+            cass.createColumnFamily( app_keyspace, createColumnFamilyDefinition(
                     SYSTEM_KEYSPACE, APPLICATIONS_CF, ComparatorType.BYTESTYPE ) );
 
             cass.createColumnFamilies( app_keyspace, getCfDefs( ApplicationCF.class, app_keyspace));
@@ -177,10 +172,10 @@ public class SetupImpl implements Setup {
 
     static class SystemDefaults {
 
-        private static final Application managementApp = 
+        private static final Application managementApp =
                 new Application( EntityManagerFactoryImpl.MANAGEMENT_APPLICATION_ID);
 
-        private static final Application defaultApp = 
+        private static final Application defaultApp =
                 new Application( EntityManagerFactoryImpl.DEFAULT_APPLICATION_ID);
 
         static {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/OrganizationAlreadyExistsException.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/OrganizationAlreadyExistsException.java b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/OrganizationAlreadyExistsException.java
new file mode 100644
index 0000000..2e7d855
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/exceptions/OrganizationAlreadyExistsException.java
@@ -0,0 +1,43 @@
+/*
+ * 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.exceptions;
+
+
+/**
+ * Thrown when an organization already exists
+ */
+public class OrganizationAlreadyExistsException extends PersistenceException {
+
+    /**
+     *
+     */
+    private static final long serialVersionUID = 1L;
+    final String organizationName;
+
+
+    public OrganizationAlreadyExistsException( String organizationName ) {
+        super( "Organization " + organizationName + " already exists" );
+        this.organizationName = organizationName;
+    }
+
+
+    public String getOrganizationName() {
+        return organizationName;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/main/resources/usergrid-core-context.xml
----------------------------------------------------------------------
diff --git a/stack/core/src/main/resources/usergrid-core-context.xml b/stack/core/src/main/resources/usergrid-core-context.xml
index dda99f5..60f69af 100644
--- a/stack/core/src/main/resources/usergrid-core-context.xml
+++ b/stack/core/src/main/resources/usergrid-core-context.xml
@@ -31,7 +31,7 @@
     <aop:config proxy-target-class="true"/>
 
 
-	
+
 	<bean id="propertyPlaceholderConfigurer"
 		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
 		<property name="properties" ref="properties" />
@@ -40,7 +40,7 @@
 		</property>
 	</bean>
 
-	
+
 	<!-- The Time Resolution used for the cluster -->
 	<bean id="microsecondsTimeResolution" class="me.prettyprint.cassandra.service.clock.MicrosecondsClockResolution" />
   <bean id="traceTagManager" class="org.apache.usergrid.persistence.cassandra.util.TraceTagManager"/>
@@ -54,7 +54,7 @@
 		<constructor-arg value="${cassandra.url}" />
         <!-- set the pool size if it's available.  If not go with 50 -->
         <property name="maxActive" value="${cassandra.connections:50}"/>
-        <property name="clockResolution" ref="microsecondsTimeResolution" />
+        <!--<property name="clockResolution" ref="microsecondsTimeResolution" />-->
         <property name="opTimer" ref="taggedOpTimer"/>
         <property name="loadBalancingPolicy" ref="loadBalancingPolicy"/>
 	</bean>
@@ -69,21 +69,21 @@
 
     <bean id="loadBalancingPolicy" class="me.prettyprint.cassandra.connection.DynamicLoadBalancingPolicy"/>
 
-	<!--  locking for a single node -->	
-<!--	<bean name="lockManager" 
+	<!--  locking for a single node -->
+<!--	<bean name="lockManager"
         class="org.apache.usergrid.locking.singlenode.SingleNodeLockManagerImpl" />-->
-	
+
 	<!--  hector based locks -->
-	<!-- Note that if this is deployed in a production cluster, the RF on the keyspace 
-    MUST be updated to use an odd number for it's replication Factor.  Even numbers can 
+	<!-- Note that if this is deployed in a production cluster, the RF on the keyspace
+    MUST be updated to use an odd number for it's replication Factor.  Even numbers can
     potentially case the locks to fail, via "split brain" when read at QUORUM on lock verification-->
-	
+
 	<bean name="lockManager" class="org.apache.usergrid.locking.cassandra.HectorLockManagerImpl" >
 		<property name="cluster" ref="cassandraCluster"/>
 		<property name="keyspaceName" value="${cassandra.lock.keyspace}"/>
 		<property name="consistencyLevelPolicy" ref="consistencyLevelPolicy"/>
 	</bean>
-	
+
 	<!--  zookeeper locks -->
 	<!--
 	<bean name="lockManager" class="org.apache.usergrid.locking.zookeeper.ZooKeeperLockManagerImpl" >
@@ -91,7 +91,14 @@
 		<property name="sessionTimeout" value="2000"/>
 		<property name="maxAttempts" value="10"/>
 	</bean>  -->
-	
+
+
+    <bean id="injector"
+   		class="org.apache.usergrid.corepersistence.GuiceFactory">
+   		<constructor-arg ref="cassandraService" />
+        <constructor-arg ref="properties" />
+   	</bean>
+
 	<bean id="cassandraService"
 		class="org.apache.usergrid.persistence.cassandra.CassandraService" init-method="init" destroy-method="destroy">
 		<constructor-arg ref="properties" />
@@ -100,17 +107,17 @@
 		<constructor-arg ref="lockManager" />
 		<property name="consistencyLevelPolicy" ref="consistencyLevelPolicy"/>
 	</bean>
-	
+
 	<bean name="consistencyLevelPolicy" class="me.prettyprint.cassandra.model.ConfigurableConsistencyLevel">
         <property name="defaultReadConsistencyLevel" value="${cassandra.readcl}"/>
         <property name="defaultWriteConsistencyLevel" value="${cassandra.writecl}"/>
     </bean>
-	
+
     <bean id="entityManagerFactory"
-		class="org.apache.usergrid.corepersistence.HybridEntityManagerFactory" scope="singleton">
+		class="org.apache.usergrid.corepersistence.CpEntityManagerFactory" scope="singleton">
 		<constructor-arg ref="cassandraService" />
         <constructor-arg ref="counterUtils"/>
-        <constructor-arg value="${usergrid.counter.skipAggregate}"/>
+        <constructor-arg ref="injector"/>
     </bean>
 
     <bean id="queueManagerFactory"
@@ -148,12 +155,12 @@
         <constructor-arg ref="cassandraCluster"/>
         <constructor-arg ref="properties"/>
     </bean>
-    
-        
+
+
    <bean id="indexBucketLocator" class="org.apache.usergrid.persistence.cassandra.SimpleIndexBucketLocatorImpl">
     	<constructor-arg value="${usergrid.index.defaultbucketsize}"/>
     </bean>
-    
+
     <bean id="mailUtils" class="org.apache.usergrid.utils.MailUtils" />
 
     <bean id="traceTagAspect" class="org.apache.usergrid.persistence.cassandra.util.TraceTagAspect"/>
@@ -169,7 +176,7 @@
            method="applyTrace"/>
       </aop:aspect>
     </aop:config>
-   
+
     <!-- ============================================================== -->
     <!-- Scheduler Settings from removed Scheduler Module's app context -->
     <!-- ============================================================== -->

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/AbstractCoreIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/AbstractCoreIT.java b/stack/core/src/test/java/org/apache/usergrid/AbstractCoreIT.java
index bb639f4..53ad348 100644
--- a/stack/core/src/test/java/org/apache/usergrid/AbstractCoreIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/AbstractCoreIT.java
@@ -19,39 +19,23 @@ package org.apache.usergrid;
 
 import org.junit.ClassRule;
 import org.junit.Rule;
-import org.junit.runner.RunWith;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import org.apache.usergrid.cassandra.SpringResource;
-import org.apache.usergrid.persistence.index.impl.ElasticSearchResource;
-import org.apache.usergrid.setup.SpringIntegrationRunner;
 import org.apache.usergrid.utils.JsonUtils;
 
 
-@RunWith( SpringIntegrationRunner.class )
 public abstract class AbstractCoreIT {
 
     private static final Logger LOG = LoggerFactory.getLogger( AbstractCoreIT.class );
 
     @ClassRule
-    public static SpringResource springResource = SpringResource.getInstance();
-
-    @ClassRule
-    public static ElasticSearchResource elasticSearchResource = new ElasticSearchResource();
-
-
-    @ClassRule
-    public static CoreITSetup setup = new CoreITSetupImpl( springResource, elasticSearchResource );
+    public static CoreITSetup setup = new CoreITSetupImpl( );
 
     @Rule
     public CoreApplication app = new CoreApplication( setup );
 
 
-    public void dump( Object obj ) {
-        dump( "Object", obj );
-    }
-
 
     public void dump( String name, Object obj ) {
         if ( obj != null && LOG.isInfoEnabled() ) {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/Application.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/Application.java b/stack/core/src/test/java/org/apache/usergrid/Application.java
index b13b0ff..faa9b4f 100644
--- a/stack/core/src/test/java/org/apache/usergrid/Application.java
+++ b/stack/core/src/test/java/org/apache/usergrid/Application.java
@@ -21,11 +21,12 @@ import java.util.Map;
 import java.util.UUID;
 
 import org.junit.rules.TestRule;
+
 import org.apache.usergrid.persistence.Entity;
 import org.apache.usergrid.persistence.EntityManager;
 import org.apache.usergrid.persistence.EntityRef;
-import org.apache.usergrid.persistence.index.query.Query;
 import org.apache.usergrid.persistence.Results;
+import org.apache.usergrid.persistence.index.query.Query;
 
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java b/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
index 1970af5..99cfcf5 100644
--- a/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
+++ b/stack/core/src/test/java/org/apache/usergrid/CoreApplication.java
@@ -26,17 +26,18 @@ import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+
 import org.apache.usergrid.mq.QueueManager;
 import org.apache.usergrid.persistence.Entity;
 import org.apache.usergrid.persistence.EntityManager;
-import org.apache.usergrid.persistence.index.query.Query;
-import org.apache.usergrid.persistence.Results;
-
-import static junit.framework.Assert.assertNotNull;
 import org.apache.usergrid.persistence.EntityRef;
+import org.apache.usergrid.persistence.Results;
 import org.apache.usergrid.persistence.SimpleEntityRef;
+import org.apache.usergrid.persistence.index.query.Query;
 import org.apache.usergrid.persistence.model.util.UUIDGenerator;
 
+import static junit.framework.Assert.assertNotNull;
+
 
 public class CoreApplication implements Application, TestRule {
 
@@ -142,6 +143,8 @@ public class CoreApplication implements Application, TestRule {
 
     protected void after( Description description ) {
         LOG.info( "Test {}: finish with application", description.getDisplayName() );
+
+        setup.getEmf().getEntityManager( id ).deleteIndex();
     }
 
 
@@ -176,24 +179,24 @@ public class CoreApplication implements Application, TestRule {
         return setup.getQmf().getQueueManager( getId() );
     }
 
-    
+
     @Override
     public void remove(Entity entity) throws Exception {
         em.delete( entity );
     }
 
-    
+
     @Override
     public void remove(EntityRef entityRef) throws Exception {
         em.delete( entityRef );
     }
 
-    
+
     @Override
     public Entity get( EntityRef entityRef ) throws Exception {
         return em.get( entityRef );
     }
-    
+
 
     @Override
     public Entity get( UUID id, String type ) throws Exception {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/CoreITSetup.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/CoreITSetup.java b/stack/core/src/test/java/org/apache/usergrid/CoreITSetup.java
index 20372ec..201a0c5 100644
--- a/stack/core/src/test/java/org/apache/usergrid/CoreITSetup.java
+++ b/stack/core/src/test/java/org/apache/usergrid/CoreITSetup.java
@@ -20,6 +20,7 @@ package org.apache.usergrid;
 import java.util.UUID;
 
 import org.junit.rules.TestRule;
+
 import org.apache.usergrid.mq.QueueManagerFactory;
 import org.apache.usergrid.persistence.EntityManagerFactory;
 import org.apache.usergrid.persistence.IndexBucketLocator;

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java b/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java
index 82b78e4..fb243ec 100644
--- a/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java
+++ b/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java
@@ -23,17 +23,19 @@ import org.junit.runner.Description;
 import org.junit.runners.model.Statement;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+
 import org.apache.usergrid.cassandra.SpringResource;
-import org.apache.usergrid.corepersistence.CpSetup;
 import org.apache.usergrid.mq.QueueManagerFactory;
 import org.apache.usergrid.persistence.EntityManagerFactory;
 import org.apache.usergrid.persistence.IndexBucketLocator;
 import org.apache.usergrid.persistence.cassandra.CassandraService;
 import org.apache.usergrid.persistence.core.migration.data.DataMigrationManager;
 import org.apache.usergrid.persistence.core.migration.schema.MigrationException;
-import org.apache.usergrid.persistence.index.impl.ElasticSearchResource;
+import org.apache.usergrid.setup.ConcurrentProcessSingleton;
 import org.apache.usergrid.utils.JsonUtils;
 
+import com.google.inject.Injector;
+
 
 public class CoreITSetupImpl implements CoreITSetup {
     private static final Logger LOG = LoggerFactory.getLogger( CoreITSetupImpl.class );
@@ -42,14 +44,33 @@ public class CoreITSetupImpl implements CoreITSetup {
     protected QueueManagerFactory qmf;
     protected IndexBucketLocator indexBucketLocator;
     protected CassandraService cassandraService;
-    protected SpringResource springResource;
-    protected ElasticSearchResource elasticSearchResource;
     protected boolean enabled = false;
 
+    protected SpringResource springResource;
+
+
+    public CoreITSetupImpl( ) {
+        springResource = ConcurrentProcessSingleton.getInstance().getSpringResource();
+
+        if ( !enabled ) {
+                   cassandraService = springResource.getBean( CassandraService.class );
+                   emf = springResource.getBean( EntityManagerFactory.class );
+                   qmf = springResource.getBean( QueueManagerFactory.class );
+                   indexBucketLocator = springResource.getBean( IndexBucketLocator.class );
+
+
+                   //run the migration
+                   try {
+                       springResource.getBean( Injector.class ).getInstance( DataMigrationManager.class ).migrate();
+                   }
+                   catch ( MigrationException e ) {
+                       throw new RuntimeException( "Unable to run migration", e );
+                   }
+
+                   enabled = true;
+
+               }
 
-    public CoreITSetupImpl( SpringResource springResource, ElasticSearchResource elasticSearchResource ) {
-        this.springResource = springResource;
-        this.elasticSearchResource = elasticSearchResource;
     }
 
 
@@ -83,31 +104,14 @@ public class CoreITSetupImpl implements CoreITSetup {
      */
     protected void before( Description description ) throws Throwable {
         LOG.info( "Setting up for {}", description.getDisplayName() );
-        initialize();
-    }
 
 
-    private void initialize() {
-        if ( !enabled ) {
-            cassandraService = springResource.getBean( CassandraService.class );
-            emf = springResource.getBean( EntityManagerFactory.class );
-            qmf = springResource.getBean( QueueManagerFactory.class );
-            indexBucketLocator = springResource.getBean( IndexBucketLocator.class );
-
-            //run the migration
-            try {
-                CpSetup.getInjector().getInstance( DataMigrationManager.class ).migrate();
-            }
-            catch ( MigrationException e ) {
-                throw new RuntimeException( "Unable to run migration", e );
-            }
 
-            enabled = true;
 
-        }
     }
 
 
+
     /** Override to tear down your specific external resource. */
     protected void after( Description description ) {
         LOG.info( "Tearing down for {}", description.getDisplayName() );
@@ -116,49 +120,30 @@ public class CoreITSetupImpl implements CoreITSetup {
 
     @Override
     public EntityManagerFactory getEmf() {
-        if ( emf == null ) {
-            initialize();
-        }
-
         return emf;
     }
 
 
     @Override
     public QueueManagerFactory getQmf() {
-        if ( qmf == null ) {
-            initialize();
-        }
-
-        return qmf;
+         return qmf;
     }
 
 
     @Override
     public IndexBucketLocator getIbl() {
-        if ( indexBucketLocator == null ) {
-            initialize();
-        }
-
-        return indexBucketLocator;
+          return indexBucketLocator;
     }
 
 
     @Override
     public CassandraService getCassSvc() {
-        if ( cassandraService == null ) {
-            initialize();
-        }
-
         return cassandraService;
     }
 
 
     @Override
     public UUID createApplication( String organizationName, String applicationName ) throws Exception {
-        if ( emf == null ) {
-            emf = springResource.getBean( EntityManagerFactory.class );
-        }
 
         if ( USE_DEFAULT_APPLICATION ) {
             return emf.getDefaultAppId();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/AppArgsTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/AppArgsTest.java b/stack/core/src/test/java/org/apache/usergrid/batch/AppArgsTest.java
index b6074b9..9084751 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/AppArgsTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/AppArgsTest.java
@@ -18,16 +18,13 @@ package org.apache.usergrid.batch;
 
 
 import org.junit.Test;
-import org.apache.usergrid.cassandra.Concurrent;
 
 import com.google.common.base.CharMatcher;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-
 /** @author zznate */
-@Concurrent()
 public class AppArgsTest {
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/BulkJobExecutionUnitTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/BulkJobExecutionUnitTest.java b/stack/core/src/test/java/org/apache/usergrid/batch/BulkJobExecutionUnitTest.java
index bb22cd6..72d17fa 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/BulkJobExecutionUnitTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/BulkJobExecutionUnitTest.java
@@ -20,21 +20,19 @@ package org.apache.usergrid.batch;
 import java.util.UUID;
 
 import org.junit.Test;
+
 import org.apache.usergrid.batch.JobExecution.Status;
 import org.apache.usergrid.batch.repository.JobDescriptor;
-import org.apache.usergrid.cassandra.Concurrent;
 import org.apache.usergrid.persistence.entities.JobData;
 import org.apache.usergrid.persistence.entities.JobStat;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
 
-
 /**
  * @author zznate
  * @author tnine
  */
-@Concurrent()
 public class BulkJobExecutionUnitTest {
 
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java b/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java
index 03e1f12..c88175b 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java
@@ -17,10 +17,8 @@
 package org.apache.usergrid.batch;
 
 
-import java.util.Arrays;
-import java.util.List;
-
 import org.junit.Ignore;
+
 import org.apache.usergrid.batch.repository.JobDescriptor;
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerITSuite.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerITSuite.java b/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerITSuite.java
deleted file mode 100644
index 0800c89..0000000
--- a/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerITSuite.java
+++ /dev/null
@@ -1,47 +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.batch;
-
-
-import org.junit.ClassRule;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.apache.usergrid.batch.job.SchedulerRuntime1IT;
-import org.apache.usergrid.batch.job.SchedulerRuntime2IT;
-import org.apache.usergrid.batch.job.SchedulerRuntime3IT;
-import org.apache.usergrid.batch.job.SchedulerRuntime4IT;
-import org.apache.usergrid.batch.job.SchedulerRuntime5IT;
-import org.apache.usergrid.batch.job.SchedulerRuntime6IT;
-import org.apache.usergrid.batch.job.SchedulerRuntime7IT;
-import org.apache.usergrid.batch.job.SchedulerRuntime8IT;
-import org.apache.usergrid.cassandra.SpringResource;
-import org.apache.usergrid.cassandra.Concurrent;
-import org.apache.usergrid.cassandra.ConcurrentSuite;
-
-
-@RunWith(ConcurrentSuite.class)
-@Suite.SuiteClasses(
-        {
-                SchedulerRuntime1IT.class, SchedulerRuntime2IT.class, SchedulerRuntime3IT.class,
-                SchedulerRuntime4IT.class, SchedulerRuntime5IT.class, SchedulerRuntime6IT.class,
-                SchedulerRuntime7IT.class, SchedulerRuntime8IT.class
-        })
-@Concurrent()
-public class ConcurrentSchedulerITSuite {
-    @ClassRule
-    public static SpringResource springResource = SpringResource.getInstance();
-}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerTestSuite.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerTestSuite.java b/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerTestSuite.java
deleted file mode 100644
index 5039f93..0000000
--- a/stack/core/src/test/java/org/apache/usergrid/batch/ConcurrentSchedulerTestSuite.java
+++ /dev/null
@@ -1,35 +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.batch;
-
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.apache.usergrid.batch.AppArgsTest;
-import org.apache.usergrid.batch.BulkJobExecutionUnitTest;
-import org.apache.usergrid.batch.UsergridJobFactoryTest;
-import org.apache.usergrid.cassandra.Concurrent;
-import org.apache.usergrid.cassandra.ConcurrentSuite;
-
-
-@RunWith(ConcurrentSuite.class)
-@Suite.SuiteClasses(
-        {
-                AppArgsTest.class, UsergridJobFactoryTest.class, BulkJobExecutionUnitTest.class,
-        })
-@Concurrent()
-public class ConcurrentSchedulerTestSuite {}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/UsergridJobFactoryTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/UsergridJobFactoryTest.java b/stack/core/src/test/java/org/apache/usergrid/batch/UsergridJobFactoryTest.java
index 44d767b..a166113 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/UsergridJobFactoryTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/UsergridJobFactoryTest.java
@@ -17,19 +17,15 @@
 package org.apache.usergrid.batch;
 
 
-import java.util.List;
 import java.util.UUID;
 
 import org.junit.Test;
+
 import org.apache.usergrid.batch.repository.JobDescriptor;
-import org.apache.usergrid.cassandra.Concurrent;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-
 /** @author zznate */
-@Concurrent()
 public class UsergridJobFactoryTest {
 
     private static UUID jobId = UUID.randomUUID();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java
index 73561e1..8825497 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/AbstractSchedulerRuntimeIT.java
@@ -26,16 +26,19 @@ import org.junit.ClassRule;
 
 import org.apache.usergrid.batch.service.JobSchedulerService;
 import org.apache.usergrid.batch.service.SchedulerService;
-import org.apache.usergrid.cassandra.SpringResource;
 import org.apache.usergrid.cassandra.SchemaManager;
+import org.apache.usergrid.cassandra.SpringResource;
 import org.apache.usergrid.persistence.index.impl.ElasticSearchResource;
 
 import com.google.common.util.concurrent.Service.State;
 
+import net.jcip.annotations.NotThreadSafe;
+
 
 /**
  * Class to test job runtimes
  */
+@NotThreadSafe
 public class AbstractSchedulerRuntimeIT {
 
     protected static final int DEFAULT_COUNT = 10;
@@ -77,7 +80,7 @@ public class AbstractSchedulerRuntimeIT {
 //        elasticSearchResource.after();
     }
 
-    
+
     @Before
     @SuppressWarnings( "all" )
     public void setup() {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java
index 1b5a420..53996a2 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java
@@ -22,6 +22,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.junit.Ignore;
 import org.springframework.stereotype.Component;
+
 import org.apache.usergrid.batch.Job;
 import org.apache.usergrid.batch.JobExecution;
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java
index af2974c..aaa7071 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java
@@ -24,6 +24,7 @@ import org.junit.Ignore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
+
 import org.apache.usergrid.batch.Job;
 import org.apache.usergrid.batch.JobExecution;
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java
index 90c2bf9..0fc104b 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java
@@ -24,6 +24,7 @@ import org.junit.Ignore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
+
 import org.apache.usergrid.batch.Job;
 import org.apache.usergrid.batch.JobExecution;
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExecution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExecution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExecution.java
index c798194..b31b520 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExecution.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExecution.java
@@ -22,6 +22,7 @@ import java.util.concurrent.TimeUnit;
 
 import org.junit.Ignore;
 import org.springframework.stereotype.Component;
+
 import org.apache.usergrid.batch.Job;
 import org.apache.usergrid.batch.JobExecution;
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java
index 50b00db..6109f1f 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java
@@ -24,6 +24,7 @@ import org.junit.Ignore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
+
 import org.apache.usergrid.batch.JobExecution;
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java
index 86daaa0..6dd826a 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java
@@ -24,6 +24,7 @@ import org.junit.Ignore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
+
 import org.apache.usergrid.batch.JobExecution;
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
index b7cea6d..3d85c0e 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
@@ -17,23 +17,23 @@
 package org.apache.usergrid.batch.job;
 
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
 import java.util.concurrent.TimeUnit;
 
 import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.usergrid.cassandra.Concurrent;
+
 import org.apache.usergrid.persistence.entities.JobData;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 
 /**
  * Class to test job runtimes.
  */
-@Concurrent
+
 @Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
 public class SchedulerRuntime1IT extends AbstractSchedulerRuntimeIT {
 	private static final Logger logger = LoggerFactory.getLogger(SchedulerRuntime1IT.class.getName());
@@ -55,20 +55,20 @@ public class SchedulerRuntime1IT extends AbstractSchedulerRuntimeIT {
 
         scheduler.refreshIndex();
 
-        // previously: 
+        // previously:
         // now wait until everything fires or no jobs complete in #waitTime seconds
         // boolean waited = getJobListener().blockTilDone( getCount(),  waitTime);
-        
-        // now: note that the waitForCount only wait for job execution. 
+
+        // now: note that the waitForCount only wait for job execution.
         // It does NOT wait for job Completion
         boolean waited = counterJob.waitForCount(waitTime, TimeUnit.MILLISECONDS);
-        assertTrue( "Failed to run " 
+        assertTrue( "Failed to run "
                 + getCount() + " number of jobs. Waited " + waitTime + " ms.", waited );
-        
+
         // previously:
-        // assertTrue( getJobListener().getSuccessCount() + " successful jobs ran, expected " 
+        // assertTrue( getJobListener().getSuccessCount() + " successful jobs ran, expected "
         // + getCount(), getCount() == getJobListener().getSuccessCount() );
-        
+
         scheduler.refreshIndex();
 
         // now:
@@ -78,9 +78,9 @@ public class SchedulerRuntime1IT extends AbstractSchedulerRuntimeIT {
         	logger.warn("Jobs not yet finished after waited {}, block again" , waitTime);
         }
 
-        assertEquals( "Expected success job: " + getCount()+ ". Actual :" 
-            + getJobListener().getSuccessCount() + ". Total count: " 
+        assertEquals( "Expected success job: " + getCount()+ ". Actual :"
+            + getJobListener().getSuccessCount() + ". Total count: "
             + getJobListener().getDoneCount() , getCount() , getJobListener().getSuccessCount() );
-        
+
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
index a2f870c..88f5311 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
@@ -17,15 +17,15 @@
 package org.apache.usergrid.batch.job;
 
 
-
 import java.util.concurrent.TimeUnit;
 
 import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.apache.usergrid.cassandra.Concurrent;
+
 import org.apache.usergrid.persistence.entities.JobData;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -33,7 +33,7 @@ import static org.junit.Assert.assertTrue;
 /**
  * Class to test job runtimes
  */
-@Concurrent
+
 @Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
 public class SchedulerRuntime2IT extends AbstractSchedulerRuntimeIT {
 	private static final Logger logger = LoggerFactory.getLogger(SchedulerRuntime2IT.class.getName());
@@ -51,16 +51,16 @@ public class SchedulerRuntime2IT extends AbstractSchedulerRuntimeIT {
         }
 
         scheduler.refreshIndex();
-        
+
         // now:
         // note that the waitForCount only wait for job execution. It does NOT wait for job Completion
         boolean waited = counterJob.waitForCount(waitTime, TimeUnit.MILLISECONDS);
-        assertTrue( "Failed to run " + getCount() 
-                + " number of jobs. Waited " + waitTime 
+        assertTrue( "Failed to run " + getCount()
+                + " number of jobs. Waited " + waitTime
                 + " seconds.", waited );
-        
+
         scheduler.refreshIndex();
-        
+
         // now:
         // blockTilDone look into the JobListener hook and blocked until jobs are completed.
         // TODO : need a retry count so it doesn't reblock forever
@@ -68,14 +68,14 @@ public class SchedulerRuntime2IT extends AbstractSchedulerRuntimeIT {
         	logger.warn("Jobs not yet finished after waited {}, block again" , waitTime);
         }
         assertEquals( "Expected success job: " + getCount()
-                + ". Actual :" + getJobListener().getSuccessCount() 
-                + ". Total count: " + getJobListener().getDoneCount() , 
+                + ". Actual :" + getJobListener().getSuccessCount()
+                + ". Total count: " + getJobListener().getDoneCount() ,
                 getCount() , getJobListener().getSuccessCount() );
-        
+
         Thread.sleep( 5000L );
 
         scheduler.refreshIndex();
-        
+
         // set the counter job latch size
         counterJob.setLatch( getCount() );
         getJobListener().setExpected( getCount() );
@@ -85,23 +85,23 @@ public class SchedulerRuntime2IT extends AbstractSchedulerRuntimeIT {
         }
 
         scheduler.refreshIndex();
-        
-        // previously: 
+
+        // previously:
         // now wait until everything fires
         // waited = getJobListener().blockTilDone( 2 * getCount(), 15000L );
         // waited = counterJob.waitForCount(waitTime, TimeUnit.MILLISECONDS );
-        // assertTrue( "Failed to run " + 2* getCount() + " number of jobs. 
+        // assertTrue( "Failed to run " + 2* getCount() + " number of jobs.
         // Success count = " + getJobListener().getSuccessCount() + ". Waited " + waitTime  + " seconds.", waited );
         // assertTrue( 2 * getCount() + " successful jobs ran",
         //  ( 2 * getCount() ) == getJobListener().getSuccessCount() );
-		
+
 		// now:
         // note that the waitForCount only wait for job execution. It does NOT wait for job Completion
         waited = counterJob.waitForCount(waitTime, TimeUnit.MILLISECONDS);
         assertTrue( "Failed to run " + getCount() + " number of jobs. Waited " + waitTime + " seconds.", waited );
-        
+
         scheduler.refreshIndex();
-        
+
         // now:
         // blockTilDone look into the JobListener hook and blocked until jobs are completed.
         // TODO : need a retry count so it doesn't reblock forever
@@ -110,10 +110,10 @@ public class SchedulerRuntime2IT extends AbstractSchedulerRuntimeIT {
         }
 
         scheduler.refreshIndex();
-        
+
         assertEquals( "Expected success job: " +2 * getCount()
-                + ". Actual :" + getJobListener().getSuccessCount() 
-                + ". Total count: " + getJobListener().getDoneCount() , 
+                + ". Actual :" + getJobListener().getSuccessCount()
+                + ". Total count: " + getJobListener().getDoneCount() ,
                 2 * getCount() , getJobListener().getSuccessCount() );
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
index 4eee2d9..dfe4f52 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
@@ -19,13 +19,12 @@ package org.apache.usergrid.batch.job;
 
 import java.util.concurrent.TimeUnit;
 
-import org.apache.usergrid.cassandra.Concurrent;
-import org.apache.usergrid.persistence.entities.JobData;
-import org.apache.usergrid.persistence.entities.JobStat;
-
 import org.junit.Ignore;
 import org.junit.Test;
 
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -33,7 +32,7 @@ import static org.junit.Assert.assertTrue;
 /**
  * Class to test job runtimes
  */
-@Concurrent
+
 @Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
 public class SchedulerRuntime3IT extends AbstractSchedulerRuntimeIT {
 
@@ -54,7 +53,7 @@ public class SchedulerRuntime3IT extends AbstractSchedulerRuntimeIT {
 
         getJobListener().setExpected( 3 );
 
-        JobData returned = scheduler.createJob( 
+        JobData returned = scheduler.createJob(
                 "failureJobExceuction", System.currentTimeMillis(), new JobData() );
 
         scheduler.refreshIndex();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
index 8160535..2cf1c42 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
@@ -17,13 +17,12 @@
 package org.apache.usergrid.batch.job;
 
 
-import org.apache.usergrid.cassandra.Concurrent;
-import org.apache.usergrid.persistence.entities.JobData;
-import org.apache.usergrid.persistence.entities.JobStat;
-
 import org.junit.Ignore;
 import org.junit.Test;
 
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -31,7 +30,7 @@ import static org.junit.Assert.assertTrue;
 /**
  * Class to test job runtimes
  */
-@Concurrent
+
 @Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
 public class SchedulerRuntime4IT extends AbstractSchedulerRuntimeIT {
     /**

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
index 057268c..aa4f018 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
@@ -17,13 +17,12 @@
 package org.apache.usergrid.batch.job;
 
 
-import org.apache.usergrid.cassandra.Concurrent;
-import org.apache.usergrid.persistence.entities.JobData;
-import org.apache.usergrid.persistence.entities.JobStat;
-
 import org.junit.Ignore;
 import org.junit.Test;
 
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -31,7 +30,7 @@ import static org.junit.Assert.assertTrue;
 /**
  * Class to test job runtimes
  */
-@Concurrent
+
 @Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
 public class SchedulerRuntime5IT extends AbstractSchedulerRuntimeIT {
     /**

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
index 5d7b48f..d4cb657 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
@@ -19,13 +19,12 @@ package org.apache.usergrid.batch.job;
 
 import java.util.concurrent.TimeUnit;
 
-import org.apache.usergrid.cassandra.Concurrent;
-import org.apache.usergrid.persistence.entities.JobData;
-import org.apache.usergrid.persistence.entities.JobStat;
-
 import org.junit.Ignore;
 import org.junit.Test;
 
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -35,12 +34,12 @@ import static org.junit.Assert.assertTrue;
 /**
  * Class to test job runtimes
  */
-@Concurrent
+
 @Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
 public class SchedulerRuntime6IT extends AbstractSchedulerRuntimeIT {
 
     /**
-     * Test the scheduler ramps up correctly when there are more jobs to be read after a 
+     * Test the scheduler ramps up correctly when there are more jobs to be read after a
      * pause when the job specifies the retry time
      */
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
index c168d19..0cbe151 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
@@ -17,13 +17,12 @@
 package org.apache.usergrid.batch.job;
 
 
-import org.apache.usergrid.cassandra.Concurrent;
-import org.apache.usergrid.persistence.entities.JobData;
-import org.apache.usergrid.persistence.entities.JobStat;
-
 import org.junit.Ignore;
 import org.junit.Test;
 
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
@@ -31,7 +30,7 @@ import static org.junit.Assert.assertTrue;
 /**
  * Class to test job runtimes
  */
-@Concurrent
+
 //@org.junit.Ignore( "Todd you need to take a look at this since it's not clear to me what was intended in this test." )
 @Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
 public class SchedulerRuntime7IT extends AbstractSchedulerRuntimeIT {

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
index d77fe6f..abc5a13 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
@@ -19,15 +19,14 @@ package org.apache.usergrid.batch.job;
 
 import java.util.UUID;
 
-import org.apache.usergrid.cassandra.Concurrent;
-import org.apache.usergrid.persistence.index.query.Query;
+import org.junit.Ignore;
+import org.junit.Test;
+
 import org.apache.usergrid.persistence.Results;
 import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.index.query.Query;
 import org.apache.usergrid.utils.UUIDUtils;
 
-import org.junit.Ignore;
-import org.junit.Test;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 
@@ -35,12 +34,12 @@ import static org.junit.Assert.assertFalse;
 /**
  * Class to test job runtimes
  */
-@Concurrent
+
 @Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
 public class SchedulerRuntime8IT extends AbstractSchedulerRuntimeIT {
-    
+
     /**
-     * Test the scheduler ramps up correctly when there are more jobs to be read after a pause 
+     * Test the scheduler ramps up correctly when there are more jobs to be read after a pause
      * when the job specifies the retry time
      */
     @Test

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntimeIntervalIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntimeIntervalIT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntimeIntervalIT.java
index f87d641..9504c9f 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntimeIntervalIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntimeIntervalIT.java
@@ -19,28 +19,27 @@ package org.apache.usergrid.batch.job;
 
 import java.util.concurrent.TimeUnit;
 
+import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.usergrid.batch.service.JobSchedulerService;
-import org.apache.usergrid.cassandra.Concurrent;
 import org.apache.usergrid.persistence.entities.JobData;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import org.junit.Ignore;
 
 
 /**
- * Class to test job that the run loop executes in the time expected when there's no jobs to run.  
+ * Class to test job that the run loop executes in the time expected when there's no jobs to run.
  * Tests saturation at each point of the runtime as well
  */
-@Concurrent
+
 @Ignore("Ignored awaiting fix for USERGRID-267")
 public class SchedulerRuntimeIntervalIT extends AbstractSchedulerRuntimeIT {
-	
-	private static final Logger logger = 
+
+	private static final Logger logger =
             LoggerFactory.getLogger(SchedulerRuntimeIntervalIT.class.getName());
 
     private static final long EXPECTED_RUNTIME = 60000;
@@ -48,7 +47,7 @@ public class SchedulerRuntimeIntervalIT extends AbstractSchedulerRuntimeIT {
 
 
     /**
-     * This is a combination of ( count+1 ) * interval*2.  If this test takes longer than this 
+     * This is a combination of ( count+1 ) * interval*2.  If this test takes longer than this
      * to run, we have a bug in how often the run loop is executing
      */
     @Test(timeout = EXPECTED_RUNTIME)
@@ -64,7 +63,7 @@ public class SchedulerRuntimeIntervalIT extends AbstractSchedulerRuntimeIT {
         final int numberOfWorkers = schedulerService.getWorkerSize();
         final int expectedExecutions = numberOfWorkers * pollCount;
 
-        assertEquals("Interval must be set to "+ expectedInterval 
+        assertEquals("Interval must be set to "+ expectedInterval
                 + " for test to work properly", expectedInterval, interval);
 
         CountdownLatchJob counterJob = springResource.getBean( CountdownLatchJob.class );
@@ -75,8 +74,8 @@ public class SchedulerRuntimeIntervalIT extends AbstractSchedulerRuntimeIT {
 
         long fireTime = System.currentTimeMillis();
 
-         // We want to space the jobs out so there will most likely be an empty poll phase.  
-         // For each run where we do get jobs, we want to saturate the worker pool to ensure the 
+         // We want to space the jobs out so there will most likely be an empty poll phase.
+         // For each run where we do get jobs, we want to saturate the worker pool to ensure the
         // semaphore is release properly
         for ( int i = 0; i < pollCount; i++ ) {
 
@@ -94,7 +93,7 @@ public class SchedulerRuntimeIntervalIT extends AbstractSchedulerRuntimeIT {
         	logger.warn("Jobs not yet finished after waited {}, block again" , waitTime);
         }
 
-        // If we get to here without timing out, the test ran correctly.  
+        // If we get to here without timing out, the test ran correctly.
         // The assertion is implicit in the timeout
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1fbe3e54/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListenerTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListenerTest.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListenerTest.java
index 8d72210..96364da 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListenerTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/TestJobListenerTest.java
@@ -17,14 +17,14 @@
 package org.apache.usergrid.batch.job;
 
 
-import org.apache.usergrid.batch.JobExecution;
-import org.apache.usergrid.persistence.entities.JobData;
-import org.apache.usergrid.persistence.entities.JobStat;
-
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.usergrid.batch.JobExecution;
+import org.apache.usergrid.persistence.entities.JobData;
+import org.apache.usergrid.persistence.entities.JobStat;
+
 import static org.junit.Assert.assertTrue;