Merge branch 'release-2.1.1'
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/9950af76 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/9950af76 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/9950af76 Branch: refs/heads/master Commit: 9950af7684255e1949637ddbb8ca8effa74498a3 Parents: e0931be d069185 Author: Dave Johnson <snoopd...@apache.org> Authored: Tue Apr 19 12:50:10 2016 -0400 Committer: Dave Johnson <snoopd...@apache.org> Committed: Tue Apr 19 12:50:10 2016 -0400 ---------------------------------------------------------------------- .../main/resources/usergrid-default.properties | 24 + .../apache/usergrid/batch/job/OnlyOnceJob.java | 22 +- .../corepersistence/ApplicationIdCache.java | 6 +- .../corepersistence/ApplicationIdCacheImpl.java | 64 +- .../usergrid/corepersistence/CoreModule.java | 6 + .../corepersistence/CpEntityManager.java | 231 +++++- .../corepersistence/CpEntityManagerFactory.java | 49 +- .../corepersistence/CpManagerCache.java | 2 +- .../corepersistence/CpRelationManager.java | 149 +++- .../usergrid/corepersistence/CpSetup.java | 100 +-- .../corepersistence/EntityManagerFig.java | 4 + .../usergrid/corepersistence/ManagerCache.java | 2 +- .../asyncevents/AsyncEventService.java | 7 + .../asyncevents/AsyncEventServiceImpl.java | 153 +++- .../asyncevents/EventBuilder.java | 12 +- .../asyncevents/EventBuilderImpl.java | 37 +- .../asyncevents/model/AsyncEvent.java | 7 +- .../model/DeIndexOldVersionsEvent.java | 50 ++ .../asyncevents/model/EdgeDeleteEvent.java | 4 +- .../asyncevents/model/EdgeIndexEvent.java | 70 ++ .../model/ElasticsearchIndexEvent.java | 2 +- .../asyncevents/model/EntityDeleteEvent.java | 3 + .../asyncevents/model/EntityIndexEvent.java | 54 ++ .../model/InitializeApplicationIndexEvent.java | 2 +- .../index/IndexProcessorFig.java | 13 +- .../corepersistence/index/IndexSchemaCache.java | 50 ++ .../index/IndexSchemaCacheFactory.java | 44 ++ .../index/IndexSchemaCacheFig.java | 39 + .../index/IndexSchemaCacheImpl.java | 119 +++ .../corepersistence/index/IndexServiceImpl.java | 98 ++- .../index/ReIndexRequestBuilder.java | 7 + .../index/ReIndexRequestBuilderImpl.java | 32 + .../index/ReIndexServiceImpl.java | 49 +- .../pipeline/builder/IdBuilder.java | 6 + .../pipeline/read/FilterFactory.java | 8 +- .../read/traverse/AbstractReadGraphFilter.java | 18 +- .../pipeline/read/traverse/IdFilter.java | 52 ++ .../results/IdQueryExecutor.java | 66 ++ .../service/ApplicationServiceImpl.java | 37 +- .../service/CollectionSearch.java | 9 + .../service/CollectionService.java | 5 + .../service/CollectionServiceImpl.java | 23 + .../service/ServiceSchedulerFig.java | 2 +- .../usergrid/persistence/EntityManager.java | 7 + .../persistence/EntityManagerFactory.java | 6 +- .../persistence/MultiQueryIterator.java | 2 +- .../persistence/NotificationGraphIterator.java | 163 +++++ .../persistence/PagingResultsIterator.java | 25 +- .../apache/usergrid/persistence/PathQuery.java | 67 +- .../org/apache/usergrid/persistence/Query.java | 2 + .../apache/usergrid/persistence/Results.java | 20 + .../persistence/cassandra/ApplicationCF.java | 2 +- .../persistence/cassandra/CassandraService.java | 2 - .../usergrid/persistence/cassandra/Setup.java | 28 +- .../persistence/entities/Notification.java | 106 ++- .../corepersistence/StaleIndexCleanupTest.java | 184 +---- .../index/AsyncEventServiceImplTest.java | 23 +- .../usergrid/corepersistence/index/RxTest.java | 129 ++++ .../usergrid/persistence/CoreSchemaManager.java | 14 +- .../cassandra/EntityManagerFactoryImplIT.java | 8 +- .../impl/ScopedCacheSerializationImpl.java | 9 +- .../impl/EntityCollectionManagerImpl.java | 2 +- .../mvcc/stage/write/WriteUniqueVerify.java | 9 +- .../serialization/SerializationFig.java | 3 + .../core/astyanax/CassandraClusterImpl.java | 4 +- .../persistence/core/astyanax/ColumnSearch.java | 7 +- .../core/astyanax/MultiRowColumnIterator.java | 37 +- .../astyanax/MultiRowShardColumnIterator.java | 462 ++++++++++++ .../core/consistency/TimeServiceImpl.java | 5 +- .../core/executor/TaskExecutorFactory.java | 10 +- .../persistence/core/shard/SmartShard.java | 61 ++ .../astyanax/MultiRowColumnIteratorTest.java | 14 +- .../usergrid/persistence/graph/GraphFig.java | 17 + .../graph/impl/GraphManagerImpl.java | 2 +- .../impl/EdgeMetadataSerializationV2Impl.java | 4 +- .../impl/shard/NodeShardCache.java | 7 +- .../graph/serialization/impl/shard/Shard.java | 33 +- .../impl/shard/impl/EdgeSearcher.java | 113 ++- .../shard/impl/EdgeShardSerializationImpl.java | 56 +- .../shard/impl/NodeShardAllocationImpl.java | 38 +- .../impl/shard/impl/NodeShardCacheImpl.java | 29 +- .../shard/impl/ShardEntryGroupIterator.java | 12 + .../shard/impl/ShardGroupCompactionImpl.java | 179 +++-- .../impl/ShardedEdgeSerializationImpl.java | 51 +- .../impl/shard/impl/ShardsColumnIterator.java | 64 +- .../shard/impl/serialize/ShardSerializer.java | 86 +++ .../graph/GraphManagerShardConsistencyIT.java | 215 +++--- .../impl/shard/EdgeShardSerializationTest.java | 12 +- .../impl/shard/NodeShardAllocationTest.java | 44 +- .../impl/shard/ShardGroupCompactionTest.java | 4 +- .../graph/src/test/resources/log4j.properties | 6 + .../persistence/map/impl/MapManagerImpl.java | 6 + stack/corepersistence/pom.xml | 2 +- .../persistence/index/EntityIndexBatch.java | 13 +- .../usergrid/persistence/index/IndexFig.java | 2 +- .../index/impl/EntityToMapConverter.java | 93 ++- .../index/impl/EsEntityIndexBatchImpl.java | 21 +- .../index/impl/EsEntityIndexImpl.java | 25 +- .../index/impl/FailureMonitorImpl.java | 2 +- .../persistence/index/impl/IndexOperation.java | 9 +- .../index/impl/IndexOperationMessage.java | 2 +- .../persistence/index/impl/EntityIndexTest.java | 2 +- .../usergrid/persistence/queue/QueueFig.java | 4 + .../apache/usergrid/mongo/BasicMongoTest.java | 8 +- .../apache/usergrid/mongo/MongoQueryTest.java | 18 +- stack/pom.xml | 2 +- .../org/apache/usergrid/rest/ApiResponse.java | 7 +- .../rest/applications/ApplicationResource.java | 2 +- .../rest/applications/CollectionResource.java | 233 ++++++ .../rest/applications/ServiceResource.java | 140 +++- .../notifiers/NotifierResource.java | 3 +- .../notifiers/NotifiersResource.java | 3 +- .../rest/applications/users/UserResource.java | 26 +- .../rest/applications/users/UsersResource.java | 3 +- .../IllegalArgumentExceptionMapper.java | 4 +- .../ServiceResourceNotFoundExceptionMapper.java | 9 +- .../organizations/OrganizationResource.java | 8 +- .../security/SecuredResourceFilterFactory.java | 29 +- .../OAuth2AccessTokenSecurityFilter.java | 3 +- .../usergrid/rest/system/DatabaseResource.java | 4 +- .../usergrid/rest/system/IndexResource.java | 6 + .../rest/applications/ApplicationCreateIT.java | 3 +- .../applications/ApplicationResourceIT.java | 2 +- .../collection/CollectionsResourceIT.java | 716 ++++++++++++++++++- .../collection/paging/PagingResourceIT.java | 70 +- .../collection/users/PermissionsResourceIT.java | 6 +- .../rest/test/resource/AbstractRestIT.java | 1 + .../rest/test/resource/ClientSetup.java | 10 + .../test/resource/endpoints/NamedResource.java | 22 + .../resources/usergrid-custom-test.properties | 4 + .../cassandra/ManagementServiceImpl.java | 91 ++- .../usergrid/security/shiro/ShiroCache.java | 41 +- .../security/shiro/ShiroCacheManager.java | 15 +- .../shiro/credentials/AdminUserAccessToken.java | 3 + .../ApplicationClientCredentials.java | 5 + .../shiro/principals/AdminUserPrincipal.java | 3 + .../principals/ApplicationGuestPrincipal.java | 4 +- .../shiro/principals/ApplicationPrincipal.java | 4 +- .../principals/ApplicationUserPrincipal.java | 3 + .../shiro/principals/OrganizationPrincipal.java | 4 +- .../security/shiro/utils/LocalShiroCache.java | 80 +++ .../usergrid/security/tokens/TokenService.java | 3 + .../tokens/cassandra/TokenServiceImpl.java | 40 +- .../services/AbstractCollectionService.java | 56 ++ .../services/AbstractConnectionsService.java | 13 + .../usergrid/services/AbstractService.java | 14 +- .../org/apache/usergrid/services/Service.java | 3 + .../usergrid/services/ServiceManager.java | 1 - .../usergrid/services/ServiceRequest.java | 5 + .../applications/ApplicationsService.java | 14 + .../usergrid/services/groups/GroupsService.java | 4 + .../notifications/NotificationDeviceFilter.java | 45 ++ .../notifications/NotificationsService.java | 32 +- .../services/notifications/QueueListener.java | 41 +- .../services/notifications/TaskManager.java | 25 +- .../services/notifications/gcm/GCMAdapter.java | 7 +- .../impl/ApplicationQueueManagerImpl.java | 283 ++++++-- .../usergrid/services/queues/QueueListener.java | 2 +- .../usergrid/services/roles/RolesService.java | 2 + .../usergrid/services/users/UsersService.java | 2 + .../services/users/roles/RolesService.java | 4 + .../resources/usergrid-services-context.xml | 11 +- .../migration/AppInfoMigrationPluginTest.java | 8 +- .../apns/NotificationsServiceIT.java | 32 +- .../gcm/NotificationsServiceIT.java | 58 +- .../resources/usergrid-custom-test.properties | 1 + .../usergrid/cassandra/SchemaManager.java | 3 - .../usergrid/cassandra/FakeSchemaManager.java | 8 +- .../test/notifications/notifications.js | 5 - tests/performance/runLoadNestedEntities.sh | 98 +++ .../datagenerators/EntityDataGenerator.scala | 40 ++ .../org/apache/usergrid/enums/EntityType.scala | 3 +- 172 files changed, 5597 insertions(+), 1162 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid/blob/9950af76/stack/corepersistence/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid/blob/9950af76/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/IndexFig.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid/blob/9950af76/stack/pom.xml ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid/blob/9950af76/stack/services/src/main/java/org/apache/usergrid/security/tokens/cassandra/TokenServiceImpl.java ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid/blob/9950af76/tests/integration/test/notifications/notifications.js ----------------------------------------------------------------------