usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [17/50] [abbrv] incubator-usergrid git commit: Merge remote-tracking branch 'origin/two-dot-o' into USERGRID-405
Date Thu, 19 Mar 2015 23:26:34 GMT
Merge remote-tracking branch 'origin/two-dot-o' into USERGRID-405

Conflicts:
	stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
	stack/core/src/test/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImplIT.java
	stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
	stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/guice/IndexModule.java
	stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
	stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.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/08719b72
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/08719b72
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/08719b72

Branch: refs/heads/USERGRID-480
Commit: 08719b72727d2557e089284dc7bf28b2a8cf1afb
Parents: 12c5035 c1f5b78
Author: Todd Nine <tnine@apigee.com>
Authored: Wed Mar 4 14:24:45 2015 -0700
Committer: Todd Nine <tnine@apigee.com>
Committed: Wed Mar 4 14:24:45 2015 -0700

----------------------------------------------------------------------
 .../src/main/groovy/configure_usergrid.groovy   |   2 +-
 .../main/resources/usergrid-default.properties  |  15 +-
 .../batch/service/JobSchedulerService.java      |   2 +-
 .../corepersistence/CpEntityManager.java        |  80 +-
 .../corepersistence/CpEntityManagerFactory.java | 148 ++-
 .../corepersistence/CpRelationManager.java      |   6 +-
 .../usergrid/corepersistence/CpSetup.java       |  57 +-
 .../usergrid/corepersistence/CpWalker.java      | 119 ++-
 .../usergrid/corepersistence/GuiceFactory.java  |  25 +-
 .../results/FilteringLoader.java                |  42 +-
 .../corepersistence/util/CpNamingUtils.java     |   3 +
 .../apache/usergrid/metrics/MetricsFactory.java | 112 ---
 .../usergrid/persistence/EntityManager.java     |   3 +
 .../persistence/EntityManagerFactory.java       |  22 +-
 .../persistence/cassandra/CassandraService.java |  71 +-
 .../cassandra/EntityManagerFactoryImpl.java     |  43 +-
 .../cassandra/EntityManagerImpl.java            |   7 +
 .../persistence/cassandra/SetupImpl.java        |  60 +-
 .../entities/FailedImportEntity.java            |  11 +-
 .../main/resources/usergrid-core-context.xml    |   9 +-
 .../corepersistence/StaleIndexCleanupTest.java  |  34 +-
 .../count/BatchCountParallelismTest.java        |   2 +
 .../usergrid/persistence/CollectionIT.java      |   2 +-
 .../usergrid/persistence/CoreSchemaManager.java |   4 +-
 .../PerformanceEntityRebuildIndexTest.java      | 192 +++-
 .../cassandra/EntityManagerFactoryImplIT.java   |  90 +-
 .../apache/usergrid/utils/UUIDUtilsTest.java    |  76 +-
 .../impl/EntityCollectionManagerImpl.java       |   7 +-
 .../src/test/resources/log4j.properties         |   2 +-
 stack/corepersistence/common/pom.xml            |  12 +
 .../core/astyanax/AstyanaxKeyspaceProvider.java |   2 +-
 .../persistence/core/astyanax/CassandraFig.java |  10 +-
 .../persistence/core/future/BetterFuture.java   |  43 +
 .../persistence/core/guice/CommonModule.java    |   6 +-
 .../core/metrics/MetricsFactory.java            |  34 +
 .../core/metrics/MetricsFactoryImpl.java        | 113 +++
 .../persistence/core/metrics/MetricsFig.java    |  33 +
 .../common/src/test/resources/log4j.properties  |   6 +-
 .../graph/src/test/resources/log4j.properties   |   8 +-
 stack/corepersistence/pom.xml                   |   1 +
 .../usergrid/persistence/index/EntityIndex.java |   9 +-
 .../persistence/index/EntityIndexBatch.java     |  32 +-
 .../persistence/index/IndexBatchBuffer.java     |  36 +
 .../persistence/index/IndexBufferConsumer.java  |  26 +
 .../persistence/index/IndexBufferProducer.java  |  36 +
 .../usergrid/persistence/index/IndexFig.java    |  45 +-
 .../index/IndexOperationMessage.java            |  65 ++
 .../persistence/index/guice/IndexModule.java    |  17 +-
 .../index/impl/EsEntityIndexBatchImpl.java      | 130 +--
 .../index/impl/EsEntityIndexImpl.java           |  88 +-
 .../index/impl/EsIndexBufferConsumerImpl.java   | 196 ++++
 .../index/impl/EsIndexBufferProducerImpl.java   |  57 ++
 .../index/impl/CorePerformanceIT.java           |  44 +-
 .../impl/EntityConnectionIndexImplTest.java     |   7 +-
 .../persistence/index/impl/EntityIndexTest.java | 112 ++-
 .../src/test/resources/log4j.properties         |   4 +-
 .../datagenerators/EntityDataGenerator.scala    |  17 +-
 .../datagenerators/FeederGenerator.scala        |  24 +-
 .../usergrid/scenarios/EntityScenarios.scala    |  20 +-
 .../org/apache/usergrid/settings/Settings.scala |   2 +
 .../PostCustomEntitySimulation.scala            |  27 +-
 stack/mongo-emulator/pom.xml                    |  15 +-
 stack/pom.xml                                   |  71 +-
 stack/rest/README.md                            |  27 +-
 stack/rest/pom.xml                              | 185 +---
 .../org/apache/usergrid/rest/IndexResource.java | 125 ++-
 .../usergrid/rest/JobServiceBoostrap.java       |  22 +-
 .../org/apache/usergrid/rest/RootResource.java  |  25 +-
 .../apache/usergrid/rest/ShutdownListener.java  |  75 ++
 .../rest/applications/ApplicationResource.java  |  72 +-
 .../usergrid/rest/filters/MeteringFilter.java   |   2 +
 .../applications/ApplicationsResource.java      |  29 +-
 .../security/SecuredResourceFilterFactory.java  |   2 +
 .../security/shiro/filters/SecurityFilter.java  |   3 +
 .../usergrid/rest/test/PropertiesResource.java  |   2 +-
 .../resources/usergrid-rest-deploy-context.xml  |   2 +-
 stack/rest/src/main/webapp/WEB-INF/web.xml      |  13 +-
 .../apache/usergrid/rest/AbstractRestIT.java    | 192 ++--
 .../java/org/apache/usergrid/rest/BasicIT.java  |  69 +-
 .../usergrid/rest/DatabaseInitializer.java      | 146 ---
 .../java/org/apache/usergrid/rest/ITSetup.java  |  57 +-
 .../apache/usergrid/rest/IndexResourceIT.java   |   3 +-
 .../apache/usergrid/rest/PartialUpdateTest.java |   2 +-
 .../apache/usergrid/rest/SystemResourceIT.java  |  60 ++
 .../org/apache/usergrid/rest/TomcatRuntime.java | 192 ++++
 .../applications/ApplicationResourceIT.java     | 941 +++++++++++-------
 .../collection/BrowserCompatibilityTest.java    |  68 +-
 .../collection/CollectionsResourceIT.java       | 252 +++--
 .../collection/DuplicateNameIT.java             |  63 +-
 .../collection/groups/GroupResourceIT.java      |   2 +-
 .../users/ConnectionResourceTest.java           | 272 +++--
 .../collection/users/RetrieveUsersTest.java     |   8 +-
 .../applications/queries/GeoPagingTest.java     |  44 +-
 .../usergrid/rest/management/AdminUsersIT.java  | 981 +++++++++----------
 .../rest/management/ImportResourceIT.java       |   5 +-
 .../rest/management/OrganizationsIT.java        |   2 +-
 .../rest/management/RegistrationIT.java         |   9 +-
 .../organizations/AdminEmailEncodingIT.java     | 161 +--
 .../test/resource2point0/AbstractRestIT.java    |  58 +-
 .../rest/test/resource2point0/ClientSetup.java  |  31 +-
 .../rest/test/resource2point0/RestClient.java   |  18 +
 .../resource2point0/TestPropertiesResource.java |  47 +
 .../endpoints/ApplicationsResource.java         |   5 +
 .../endpoints/CollectionEndpoint.java           | 201 +++-
 .../endpoints/DatabaseResource.java             |  39 +
 .../endpoints/EntityEndpoint.java               |   2 -
 .../endpoints/SetupResource.java                |  46 +
 .../endpoints/SystemResource.java               |  36 +
 .../endpoints/TokenResource.java                |  32 +-
 .../endpoints/mgmt/ApplicationResource.java     |   6 +-
 .../endpoints/mgmt/AuthorizeResource.java       |  59 ++
 .../endpoints/mgmt/ConfirmResource.java         |  46 +
 .../endpoints/mgmt/CredentialsResource.java     |  55 ++
 .../endpoints/mgmt/FeedResource.java            |  48 +
 .../endpoints/mgmt/ManagementResource.java      |  12 +-
 .../endpoints/mgmt/OrgResource.java             |  96 +-
 .../endpoints/mgmt/OrganizationResource.java    |  44 +-
 .../endpoints/mgmt/PasswordResource.java        |  61 ++
 .../endpoints/mgmt/ReactivateResource.java      |  46 +
 .../endpoints/mgmt/ResetResource.java           |  42 +
 .../endpoints/mgmt/TokenResource.java           |  48 +-
 .../endpoints/mgmt/UserResource.java            |  80 ++
 .../endpoints/mgmt/UsersResource.java           |  13 +-
 .../test/resource2point0/model/Credentials.java |  47 +
 .../rest/test/resource2point0/model/Entity.java |  18 +-
 .../rest/test/resource2point0/model/Token.java  |  37 +-
 stack/rest/src/test/resources/arquillian.xml    |  16 +-
 .../resources/usergrid-custom-test.properties   |  14 +-
 .../resources/usergrid-deployment.properties    | 113 ---
 .../resources/usergrid-rest-deploy-context.xml  |  26 +
 stack/services/pom.xml                          |   6 +
 .../cassandra/ManagementServiceImpl.java        |   7 +-
 .../management/export/S3ExportImpl.java         |   6 +-
 .../management/importer/ImportServiceImpl.java  |   5 +-
 .../management/importer/S3ImportImpl.java       |  28 +-
 .../tokens/cassandra/TokenServiceImpl.java      |  14 +-
 .../services/assets/data/BinaryStore.java       |   3 +-
 .../services/assets/data/S3BinaryStore.java     |  18 +-
 .../usergrid/services/guice/ServiceModule.java  |   2 -
 .../notifications/NotificationsService.java     |   4 +-
 .../services/notifications/QueueJob.java        |   6 +-
 .../services/notifications/QueueListener.java   |  17 +-
 .../impl/ApplicationQueueManagerImpl.java       |   2 +-
 .../services/queues/ImportQueueListener.java    |   7 +-
 .../usergrid/services/queues/QueueListener.java |   7 +-
 .../resources/usergrid-services-context.xml     |   4 +-
 .../org/apache/usergrid/ServiceITSetupImpl.java |   1 +
 .../usergrid/management/OrganizationIT.java     |  30 +-
 .../management/export/ExportServiceIT.java      | 183 ++--
 .../importer/FileImportTrackerTest.java         |  55 +-
 .../management/importer/ImportCollectionIT.java |  78 +-
 .../usergrid/management/importer/S3Upload.java  |  18 +-
 .../services/ApplicationsServiceIT.java         |   8 +-
 .../usergrid/services/ServiceInvocationIT.java  |   7 +
 .../apns/NotificationsServiceIT.java            |   2 +-
 .../gcm/NotificationsServiceIT.java             |   4 +-
 .../src/test/resources/log4j.properties         |   4 +-
 .../src/test/resources/project.properties       |   1 +
 .../resources/usergrid-custom-test.properties   |   3 +
 stack/test-utils/pom.xml                        |  11 -
 .../usergrid/cassandra/ClearShiroSubject.java   |  19 +-
 161 files changed, 5466 insertions(+), 3243 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/08719b72/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
----------------------------------------------------------------------
diff --cc stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
index 9d0b03a,9aa36a0..e0d7daa
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
@@@ -15,26 -15,19 +15,18 @@@
   */
  package org.apache.usergrid.corepersistence;
  
 -import com.google.common.cache.CacheBuilder;
 -import com.google.common.cache.CacheLoader;
 -import com.google.common.cache.LoadingCache;
 -import com.google.inject.Injector;
 -import com.yammer.metrics.annotation.Metered;
 -import static java.lang.String.CASE_INSENSITIVE_ORDER;
  
- import java.util.Arrays;
- import java.util.HashMap;
- import java.util.HashSet;
- import java.util.Iterator;
- import java.util.List;
- import java.util.Map;
- import java.util.Set;
- import java.util.TreeMap;
- import java.util.UUID;
+ import java.util.*;
  import java.util.concurrent.atomic.AtomicBoolean;
  
 +import org.slf4j.Logger;
 +import org.slf4j.LoggerFactory;
 +import org.springframework.beans.BeansException;
 +import org.springframework.context.ApplicationContext;
 +import org.springframework.context.ApplicationContextAware;
 +
  import org.apache.commons.lang.StringUtils;
  
 -import org.apache.usergrid.corepersistence.rx.AllEntitiesInSystemObservable;
  import org.apache.usergrid.corepersistence.util.CpNamingUtils;
  import org.apache.usergrid.persistence.AbstractEntity;
  import org.apache.usergrid.persistence.Entity;
@@@ -710,10 -763,15 +771,11 @@@ public class CpEntityManagerFactory imp
  
          //explicitly invoke create index, we don't know if it exists or not in ES during
a rebuild.
          em.createIndex();
 -        Application app = em.getApplication();
 +        em.reindex(po);
  
-         Application app = em.getApplication();
-         logger.info("\n\nRebuilt index for application {} id {}\n", app.getName(), appId
);
+         em.reindex( po );
+ 
 -        if(app!=null) {
 -            logger.info("\n\nRebuilt index for application {} id {}\n", app.getName(), appId);
 -        }else{
 -            logger.info("\n\nDid not rebuild index for application id {}\n",  appId);
 -        }
++        logger.info("\n\nRebuilt index for applicationId {} \n", appId );
      }
  
  

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/08719b72/stack/core/src/main/java/org/apache/usergrid/corepersistence/util/CpNamingUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/08719b72/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/08719b72/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
----------------------------------------------------------------------
diff --cc stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
index 97c0479,33321a4..5e61753
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
@@@ -19,7 -19,9 +19,10 @@@
  package org.apache.usergrid.persistence.core.guice;
  
  
+ import org.apache.usergrid.persistence.core.metrics.MetricsFactory;
+ import org.apache.usergrid.persistence.core.metrics.MetricsFactoryImpl;
+ import org.apache.usergrid.persistence.core.metrics.MetricsFig;
 +import org.apache.usergrid.persistence.core.migration.data.*;
  import org.safehaus.guicyfig.GuicyFigModule;
  
  import org.apache.usergrid.persistence.core.astyanax.AstyanaxKeyspaceProvider;
@@@ -75,13 -81,16 +77,15 @@@ public class CommonModule extends Abstr
  
          bind( DataMigrationManager.class ).to( DataMigrationManagerImpl.class );
  
+         bind( MetricsFactory.class ).to( MetricsFactoryImpl.class );
  
 +        bind (MigrationInfoCache.class).to( MigrationInfoCacheImpl.class );
+         install(new GuicyFigModule(MetricsFig.class));
  
 -        //do multibindings for migrations
 -        Multibinder<DataMigration> dataMigrationMultibinder = Multibinder.newSetBinder(
binder(), DataMigration.class );
 -//        dataMigrationMultibinder.addBinding();
 -//        dataMigrationManagerMultibinder.addBinding().to( DataMigrationManagerImpl.class
);
 -//        migrationBinding.addBinding().to( Key.get( MigrationInfoSerialization.class )
);
  
 +        //do multibindings for migrations
 +        //create the empty multibinder so other plugins can use it
 +         Multibinder.newSetBinder( binder(), MigrationPlugin.class);
      }
  
  

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/08719b72/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/EntityIndex.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/08719b72/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/08719b72/stack/pom.xml
----------------------------------------------------------------------
diff --cc stack/pom.xml
index 81e7bdd,53755b3..4c0dcd7
--- a/stack/pom.xml
+++ b/stack/pom.xml
@@@ -1535,8 -1513,14 +1513,14 @@@
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.maven.surefire</groupId>
 -                              <artifactId>surefire-junit47</artifactId>
 +                              <artifactId>surefire-junit4</artifactId>
                                <version>${surefire.plugin.version}</version>
+                               <exclusions>
+                                   <exclusion>
+                                       <groupId>org.apache.maven.surfire</groupId>
+                                       <artifactId>common-junit3</artifactId>
+                                   </exclusion>
+                               </exclusions>
                            </dependency>
                        </dependencies>
                    </plugin>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/08719b72/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
----------------------------------------------------------------------
diff --cc stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
index a0404e1,3269ec0..92d1e2b
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
@@@ -20,12 -20,9 +20,10 @@@
  
  package org.apache.usergrid.rest;
  
 +import com.google.common.base.Preconditions;
  import com.sun.jersey.api.json.JSONWithPadding;
- import org.apache.usergrid.persistence.EntityManager;
  import org.apache.usergrid.persistence.EntityManagerFactory;
  import org.apache.usergrid.persistence.EntityRef;
- import org.apache.usergrid.persistence.index.EntityIndex;
  import org.apache.usergrid.persistence.index.utils.UUIDUtils;
  import org.apache.usergrid.rest.security.annotations.RequireSystemAccess;
  import org.slf4j.Logger;
@@@ -183,11 -236,10 +237,12 @@@ public class IndexResource extends Abst
      @POST
      @Path( RootResource.APPLICATION_ID_PATH )
      public JSONWithPadding addIndex(@Context UriInfo ui,
-                                     @PathParam( "applicationId" ) final String applicationIdStr,
-                                     Map<String, Object> config,
-                                     @QueryParam( "callback" ) @DefaultValue( "callback"
) String callback)  throws Exception{
+             @PathParam( "applicationId" ) final String applicationIdStr,
+             Map<String, Object> config,
+             @QueryParam( "callback" ) @DefaultValue( "callback" ) String callback)  throws
Exception{
+ 
 +        Preconditions.checkNotNull(config,"Payload for config is null, please pass {replicas:int,
shards:int} in body");
 +
          ApiResponse response = createApiResponse();
          final UUID appId = UUIDUtils.tryExtractUUID(applicationIdStr);
  

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/08719b72/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
----------------------------------------------------------------------
diff --cc stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
index 2babc60,bd96434..cc89122
--- a/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/OrganizationIT.java
@@@ -90,9 -90,9 +90,9 @@@ public class OrganizationIT 
  
          OrganizationInfo organization2 = setup.getMgmtSvc().getOrganizationForApplication(
applicationId );
          assertNotNull( organization2 );
 -        assertEquals( "wrong organization name", orgName, organization2.getName() );
 +        assertEquals( "wrong organization name", organization.getName(), organization2.getName()
);
  
-         boolean verified = setup.getMgmtSvc().verifyAdminUserPassword( user.getUuid(), "test"
);
+         boolean verified = setup.getMgmtSvc().verifyAdminUserPassword( organization.getOwner().getUuid(),
"test" );
          assertTrue( verified );
  
          setup.getMgmtSvc().activateOrganization( organization2 );


Mime
View raw message