usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [13/50] incubator-usergrid git commit: Merge branch 'two-dot-o' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into two-dot-o-events
Date Mon, 22 Dec 2014 15:36:12 GMT
Merge branch 'two-dot-o' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into
two-dot-o-events

Conflicts:
	stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
	stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/EntityIndex.java


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

Branch: refs/heads/UG-rest-test-framework-overhaul
Commit: 4a36aa16ccdb7b60122bcf32522788706beff806
Parents: 7000bd9 b6a8bc6
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Fri Oct 31 14:09:36 2014 -0400
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Fri Oct 31 14:09:36 2014 -0400

----------------------------------------------------------------------
 .../main/resources/usergrid-default.properties  |   2 +
 .../corepersistence/CpEntityManagerFactory.java |  20 ++++
 .../HybridEntityManagerFactory.java             |  10 ++
 .../persistence/EntityManagerFactory.java       |   4 +
 .../cassandra/EntityManagerFactoryImpl.java     |  10 ++
 .../collection/EntityCollectionManager.java     |   9 +-
 .../impl/EntityCollectionManagerImpl.java       | 110 ++++++++++++-------
 .../serialization/SerializationFig.java         |   4 -
 .../collection/EntityCollectionManagerIT.java   |  12 ++
 .../usergrid/persistence/index/EntityIndex.java |  11 +-
 .../usergrid/persistence/index/IndexFig.java    |  12 ++
 .../index/impl/EsEntityIndexImpl.java           |  76 ++++++++-----
 .../persistence/index/impl/EsProvider.java      |   2 +
 .../impl/EntityConnectionIndexImplTest.java     |  22 +++-
 stack/loadtests/src/main/scripts/gatling-mvn.sh |   3 +
 .../src/test/resources/logback-test.xml         |  41 +++++++
 stack/loadtests/src/test/resources/logback.xml  |   3 +-
 .../apache/usergrid/rest/SwaggerServlet.java    |   5 +-
 .../rest/filters/HealthCheckFilter.java         |  68 ++++++++++++
 stack/rest/src/main/webapp/WEB-INF/web.xml      |  10 ++
 20 files changed, 351 insertions(+), 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a36aa16/stack/core/src/main/java/org/apache/usergrid/corepersistence/HybridEntityManagerFactory.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a36aa16/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
index 5b75f22,360d8e0..0205824
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/EntityCollectionManager.java
@@@ -70,10 -68,21 +67,16 @@@ public interface EntityCollectionManage
       */
      public Observable<EntitySet> load(Collection<Id> entityIds);
  
 -
      /**
       * Takes the change and reloads an entity with all changes applied in this entity applied.
 -     * The resulting entity from calling load will be the previous version of this entity
+ the entity
 -     * in this object applied to it.
 -     * @param entity
 -     * @return
 +     * The resulting entity from calling load will be the previous version of this entity
plus 
 +     * the entity in this object applied to it.
       */
      public Observable<Entity> update ( Entity entity );
+ 
+     /** 
+      * Return true if connection query index system (Cassandra) is healthy.
+      */
+     public boolean isHealthy();
+ 
  }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4a36aa16/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
index 5b6265c,f24334e..26ab6aa
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
@@@ -34,7 -31,10 +34,6 @@@ import org.apache.usergrid.persistence.
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
  
- import org.apache.usergrid.persistence.collection.guice.CollectionTaskExecutor;
 -import org.apache.usergrid.persistence.collection.CollectionScope;
 -import org.apache.usergrid.persistence.collection.EntityCollectionManager;
 -import org.apache.usergrid.persistence.collection.EntitySet;
 -import org.apache.usergrid.persistence.collection.VersionSet;
  import org.apache.usergrid.persistence.collection.guice.Write;
  import org.apache.usergrid.persistence.collection.guice.WriteUpdate;
  import org.apache.usergrid.persistence.collection.mvcc.MvccEntitySerializationStrategy;
@@@ -58,6 -57,12 +55,14 @@@ import org.apache.usergrid.persistence.
  import com.google.common.base.Preconditions;
  import com.google.inject.Inject;
  import com.google.inject.assistedinject.Assisted;
+ import com.netflix.astyanax.Keyspace;
+ import com.netflix.astyanax.connectionpool.OperationResult;
+ import com.netflix.astyanax.model.ColumnFamily;
+ import com.netflix.astyanax.model.CqlResult;
+ import com.netflix.astyanax.serializers.StringSerializer;
++import org.apache.usergrid.persistence.collection.guice.CollectionTaskExecutor;
+ import org.apache.usergrid.persistence.collection.serialization.SerializationFig;
++import org.apache.usergrid.persistence.core.task.TaskExecutor;
  
  import rx.Observable;
  import rx.Subscriber;
@@@ -73,11 -78,11 +78,10 @@@ import rx.schedulers.Schedulers
   */
  public class EntityCollectionManagerImpl implements EntityCollectionManager {
  
-     private static final Logger log = LoggerFactory.getLogger(EntityCollectionManagerImpl.class);
+     private static final Logger logger = LoggerFactory.getLogger(EntityCollectionManagerImpl.class);
  
      private final CollectionScope collectionScope;
-     private final UUIDService uuidService;
  
 -
      //start stages
      private final WriteStart writeStart;
      private final WriteStart writeUpdate;
@@@ -90,37 -96,28 +94,37 @@@
      private final MarkStart markStart;
      private final MarkCommit markCommit;
  
-     private final TaskExecutor taskExecutor;
- 
-     private EntityVersionCleanupFactory entityVersionCleanupFactory;
-     private EntityVersionCreatedFactory entityVersionCreatedFactory;
- 
      private final MvccLogEntrySerializationStrategy mvccLogEntrySerializationStrategy;
      private final MvccEntitySerializationStrategy entitySerializationStrategy;
-     private final EntityDeletedFactory entityDeletedFactory;
      private final UniqueValueSerializationStrategy uniqueValueSerializationStrategy;
  
++    private final EntityVersionCleanupFactory entityVersionCleanupFactory;
++    private final EntityVersionCreatedFactory entityVersionCreatedFactory;
++    private final EntityDeletedFactory entityDeletedFactory;
++    private final TaskExecutor taskExecutor;
++
+     private final Keyspace keyspace;
+     private SerializationFig config;
+ 
  
      @Inject
-     public EntityCollectionManagerImpl( 
-         final UUIDService                          uuidService, 
-         @Write final WriteStart                    writeStart,
-         @WriteUpdate final WriteStart              writeUpdate,
-         final WriteUniqueVerify                    writeVerifyUnique,
-         final WriteOptimisticVerify                writeOptimisticVerify,
-         final WriteCommit                          writeCommit, 
-         final RollbackAction                       rollback,
-         final MarkStart                            markStart, 
-         final MarkCommit                           markCommit,
-         final EntityVersionCleanupFactory          entityVersionCleanupFactory,
-         final EntityVersionCreatedFactory          entityVersionCreatedFactory,
-         final MvccEntitySerializationStrategy      entitySerializationStrategy,
-         final UniqueValueSerializationStrategy     uniqueValueSerializationStrategy,
-         final MvccLogEntrySerializationStrategy    mvccLogEntrySerializationStrategy,
-         final EntityDeletedFactory                 entityDeletedFactory,
+     public EntityCollectionManagerImpl(
+         @Write final WriteStart writeStart,
+         @WriteUpdate final WriteStart writeUpdate,
+         final WriteUniqueVerify writeVerifyUnique,
+         final WriteOptimisticVerify writeOptimisticVerify,
+         final WriteCommit writeCommit, final RollbackAction rollback,
+         final MarkStart markStart, final MarkCommit markCommit,
+         final MvccEntitySerializationStrategy entitySerializationStrategy,
+         final UniqueValueSerializationStrategy uniqueValueSerializationStrategy,
+         final MvccLogEntrySerializationStrategy mvccLogEntrySerializationStrategy,
+         final Keyspace keyspace,
+         final SerializationFig config,
++        final EntityVersionCleanupFactory entityVersionCleanupFactory,
++        final EntityVersionCreatedFactory entityVersionCreatedFactory,
++        final EntityDeletedFactory        entityDeletedFactory,
 +        @CollectionTaskExecutor final TaskExecutor taskExecutor,
-         @Assisted final CollectionScope            collectionScope
- 
+         @Assisted final CollectionScope collectionScope
      ) {
          this.uniqueValueSerializationStrategy = uniqueValueSerializationStrategy;
          this.entitySerializationStrategy = entitySerializationStrategy;
@@@ -141,10 -134,11 +141,15 @@@
          this.markStart = markStart;
          this.markCommit = markCommit;
  
-         this.uuidService = uuidService;
-         this.collectionScope = collectionScope;
-         this.taskExecutor = taskExecutor;
+         this.keyspace = keyspace;
+         this.config = config;
+ 
 +        this.entityVersionCleanupFactory = entityVersionCleanupFactory;
++        this.entityVersionCreatedFactory = entityVersionCreatedFactory;
++        this.entityDeletedFactory = entityDeletedFactory;
++        this.taskExecutor = taskExecutor;
++
+         this.collectionScope = collectionScope;
          this.mvccLogEntrySerializationStrategy = mvccLogEntrySerializationStrategy;
      }
  


Mime
View raw message