usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [4/9] incubator-usergrid git commit: Merge branch 'two-dot-o-dev' into USERGRID-533-create-app-test
Date Mon, 06 Apr 2015 20:50:52 GMT
Merge branch 'two-dot-o-dev' into USERGRID-533-create-app-test


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

Branch: refs/heads/USERGRID-533-create-app-test
Commit: 3a1ee574ccc2a4bd9a0de6ede5ea732619aa65f7
Parents: d159bec 29f231b
Author: Dave Johnson <dmjohnson@apigee.com>
Authored: Fri Apr 3 15:59:46 2015 -0400
Committer: Dave Johnson <dmjohnson@apigee.com>
Committed: Fri Apr 3 15:59:46 2015 -0400

----------------------------------------------------------------------
 .../corepersistence/CpEntityManager.java        | 180 +++------
 .../corepersistence/CpEntityManagerFactory.java |  62 ++--
 .../corepersistence/CpManagerCache.java         |  10 +-
 .../corepersistence/CpRelationManager.java      | 129 ++-----
 .../usergrid/corepersistence/CpWalker.java      |   4 +-
 .../usergrid/corepersistence/ManagerCache.java  |   4 +-
 .../events/EntityDeletedHandler.java            |  34 +-
 .../events/EntityVersionCreatedHandler.java     |  14 +-
 .../events/EntityVersionDeletedHandler.java     |  89 +++--
 .../migration/AppInfoMigrationPlugin.java       |  14 +-
 .../migration/EntityTypeMappingMigration.java   |   4 +-
 .../results/ElasticSearchQueryExecutor.java     |   5 +
 .../results/FilteringLoader.java                | 113 +++---
 .../rx/impl/AllApplicationsObservableImpl.java  |   8 +-
 .../rx/impl/AllEntitiesInSystemImpl.java        |  13 +-
 .../corepersistence/util/CpNamingUtils.java     | 146 ++++++--
 .../usergrid/persistence/EntityManager.java     |   6 +-
 .../persistence/EntityManagerFactory.java       |   6 +-
 .../cassandra/EntityManagerFactoryImpl.java     |   7 +
 .../cassandra/EntityManagerImpl.java            |   6 +-
 .../org/apache/usergrid/CoreApplication.java    |  10 +-
 .../org/apache/usergrid/CoreITSetupImpl.java    |   9 +-
 .../corepersistence/StaleIndexCleanupTest.java  |  21 +-
 .../migration/EntityTypeMappingMigrationIT.java |  10 +-
 .../rx/AllEntitiesInSystemObservableIT.java     |   2 +-
 .../rx/EdgesFromSourceObservableIT.java         |   9 +-
 .../rx/EdgesToTargetObservableIT.java           |  53 ++-
 .../usergrid/persistence/CollectionIT.java      |   2 +-
 .../persistence/query/IteratingQueryIT.java     |   2 +
 .../apache/usergrid/utils/EdgeTestUtils.java    |  50 +++
 .../persistence/collection/CollectionScope.java |  45 ---
 .../collection/EntityCollectionManager.java     |  49 ++-
 .../EntityCollectionManagerFactory.java         |  13 +-
 .../persistence/collection/FieldSet.java        |   2 +-
 .../cache/CachedEntityCollectionManager.java    |  14 +-
 .../collection/event/EntityDeleted.java         |   8 +-
 .../collection/event/EntityVersionCreated.java  |   7 +-
 .../collection/event/EntityVersionDeleted.java  |   8 +-
 .../exception/CollectionRuntimeException.java   |  30 +-
 .../exception/EntityTooLargeException.java      |   6 +-
 .../exception/WriteCommitException.java         |  11 +-
 .../WriteOptimisticVerifyException.java         |  11 +-
 .../exception/WriteStartException.java          |  11 +-
 .../exception/WriteUniqueVerifyException.java   |   6 +-
 .../collection/guice/CollectionModule.java      |   3 +-
 .../guice/CollectionTaskExecutor.java           |   4 +-
 .../collection/impl/CollectionScopeImpl.java    | 102 -----
 .../EntityCollectionManagerFactoryImpl.java     |  21 +-
 .../impl/EntityCollectionManagerImpl.java       |  44 ++-
 .../collection/impl/EntityDeletedTask.java      |  36 +-
 .../impl/EntityVersionCleanupTask.java          |  18 +-
 .../impl/EntityVersionCreatedTask.java          |  13 +-
 .../impl/EntityVersionTaskFactory.java          |  17 +-
 .../mvcc/MvccLogEntrySerializationStrategy.java |  80 ----
 .../collection/mvcc/changelog/ChangeLog.java    |   2 -
 .../mvcc/entity/MvccValidationUtils.java        |  16 -
 .../mvcc/entity/impl/MvccEntityDeleteEvent.java |   8 +-
 .../mvcc/entity/impl/MvccEntityEvent.java       |  11 +-
 .../mvcc/entity/impl/MvccEntityWriteEvent.java  |   6 +-
 .../mvcc/stage/CollectionIoEvent.java           |   9 +-
 .../mvcc/stage/EntityUpdateEvent.java           |  34 --
 .../mvcc/stage/delete/MarkCommit.java           |  15 +-
 .../collection/mvcc/stage/delete/MarkStart.java |  20 +-
 .../mvcc/stage/write/RollbackAction.java        |  12 +-
 .../mvcc/stage/write/WriteCommit.java           |  25 +-
 .../mvcc/stage/write/WriteOptimisticVerify.java |  12 +-
 .../collection/mvcc/stage/write/WriteStart.java |  16 +-
 .../mvcc/stage/write/WriteUniqueVerify.java     |  41 +-
 .../MvccEntitySerializationStrategy.java        |  18 +-
 .../MvccLogEntrySerializationStrategy.java      |  82 ++++
 .../collection/serialization/UniqueValue.java   |   1 -
 .../UniqueValueSerializationStrategy.java       |  37 +-
 .../serialization/UniqueValueSet.java           |   3 -
 .../impl/CollectionDataVersions.java            |  12 +-
 .../impl/EntityVersionSerializer.java           |   9 +-
 .../serialization/impl/LogEntryIterator.java    |   8 +-
 .../serialization/impl/MutableFieldSet.java     |   6 +-
 .../MvccEntitySerializationStrategyImpl.java    |  73 ++--
 ...vccEntitySerializationStrategyProxyImpl.java |  18 +-
 .../MvccEntitySerializationStrategyV3Impl.java  |  83 ++---
 .../MvccLogEntrySerializationProxyImpl.java     | 149 ++++++++
 .../MvccLogEntrySerializationStrategyImpl.java  |  92 ++---
 ...MvccLogEntrySerializationStrategyV1Impl.java | 118 ++++++
 ...MvccLogEntrySerializationStrategyV2Impl.java | 106 ++++++
 .../serialization/impl/SerializationModule.java | 151 +++++---
 .../serialization/impl/UniqueFieldEntry.java    |   1 -
 .../impl/UniqueFieldEntrySerializer.java        |   3 -
 .../serialization/impl/UniqueValueImpl.java     |   5 +-
 .../UniqueValueSerializationStrategyImpl.java   | 212 ++++++-----
 ...iqueValueSerializationStrategyProxyImpl.java | 179 +++++++++
 .../UniqueValueSerializationStrategyV1Impl.java | 159 ++++++++
 .../UniqueValueSerializationStrategyV2Impl.java | 139 +++++++
 .../migration/CollectionMigrationPlugin.java    |   2 +-
 .../impl/migration/EntityIdScope.java           |  12 +-
 .../migration/MvccEntityDataMigrationImpl.java  |  56 ++-
 .../serialization/impl/util/Inflector.java      | 370 +++++++++++++++++++
 .../impl/util/LegacyScopeUtils.java             |  51 +++
 .../collection/ApplicationContextImplTest.java  |  33 ++
 .../collection/CollectionContextImplTest.java   |  53 ---
 .../EntityCollectionManagerFactoryTest.java     |   9 +-
 .../collection/EntityCollectionManagerIT.java   |  92 ++---
 .../EntityCollectionManagerStressTest.java      |  14 +-
 .../impl/EntityVersionCleanupTaskTest.java      |  35 +-
 .../impl/EntityVersionCreatedTaskTest.java      |  27 +-
 .../mvcc/stage/AbstractEntityStageTest.java     |   6 +-
 .../mvcc/stage/AbstractIdStageTest.java         |   4 +-
 .../mvcc/stage/AbstractMvccEntityStageTest.java |   6 +-
 .../mvcc/stage/TestEntityGenerator.java         |   2 +-
 .../mvcc/stage/delete/MarkCommitTest.java       |  14 +-
 .../mvcc/stage/delete/MarkStartTest.java        |   6 +-
 ...niqueValueSerializationStrategyImplTest.java | 330 -----------------
 .../mvcc/stage/write/WriteCommitTest.java       |  12 +-
 .../stage/write/WriteOptimisticVerifyTest.java  |  35 +-
 .../mvcc/stage/write/WriteStartTest.java        |  20 +-
 .../mvcc/stage/write/WriteUniqueVerifyIT.java   |  34 +-
 .../mvcc/stage/write/WriteUniqueVerifyTest.java |  13 +-
 .../impl/LogEntryIteratorTest.java              |  14 +-
 ...MvccEntitySerializationStrategyImplTest.java |  50 +--
 ...ntitySerializationStrategyProxyV1_3Test.java |   2 -
 ...ntitySerializationStrategyProxyV2_3Test.java |   2 -
 ...ccEntitySerializationStrategyV1ImplTest.java |  10 +-
 ...ccEntitySerializationStrategyV2ImplTest.java |  10 +-
 .../MvccEntitySerializationStrategyV2Test.java  |  20 +-
 ...ccEntitySerializationStrategyV3ImplTest.java |  16 +-
 .../impl/MvccLESSTransientTest.java             |  27 +-
 ...ccLogEntrySerializationStrategyImplTest.java | 107 +++---
 ...EntrySerializationStrategyProxyImplTest.java |  90 +++++
 ...LogEntrySerializationStrategyV1ImplTest.java |  55 +++
 ...LogEntrySerializationStrategyV2ImplTest.java |  53 +++
 .../impl/ScopedRowKeySerializerTest.java        |   2 +-
 .../impl/SerializationComparison.java           |   2 +-
 .../impl/SettingsValidationTest.java            |   1 -
 ...niqueValueSerializationStrategyImplTest.java | 344 +++++++++++++++++
 ...ValueSerializationStrategyProxyImplTest.java | 100 +++++
 ...queValueSerializationStrategyV1ImplTest.java |  57 +++
 ...queValueSerializationStrategyV2ImplTest.java |  58 +++
 ...ctMvccEntityDataMigrationV1ToV3ImplTest.java |   9 +-
 .../MvccEntityDataMigrationV1ToV3ImplTest.java  |   6 -
 .../collection/util/EntityHelper.java           |   1 -
 .../collection/util/LogEntryMock.java           |  10 +-
 .../collection/util/UniqueValueEntryMock.java   |  17 +-
 .../persistence/core/guice/ProxyImpl.java       |  42 ---
 .../core/migration/data/VersionedData.java      |   2 +-
 .../core/migration/schema/Migration.java        |   2 +-
 .../persistence/core/rx/ObservableIterator.java |   2 +
 .../core/scope/ApplicationScopeImpl.java        |   3 +
 .../persistence/graph/guice/GraphModule.java    |   5 +-
 .../graph/impl/GraphManagerImpl.java            |   3 +-
 .../graph/impl/stage/EdgeMetaRepairImpl.java    |   3 +-
 .../impl/stage/NodeDeleteListenerImpl.java      |   3 +-
 .../shard/count/NodeShardApproximationImpl.java |  11 +-
 .../graph/impl/EdgeDeleteListenerTest.java      |   3 -
 .../graph/impl/NodeDeleteListenerTest.java      |   3 -
 .../graph/impl/stage/EdgeMetaRepairTest.java    |   3 -
 .../EdgeMetaDataSerializationProxyV1Test.java   |   3 -
 .../EdgeMetaDataSerializationProxyV2Test.java   |   2 -
 .../index/impl/EntityToMapConverter.java        |  10 +-
 .../impl/EsApplicationEntityIndexImpl.java      |  14 +-
 .../index/impl/EsIndexBufferConsumerImpl.java   |  79 ++--
 .../persistence/index/impl/EntityIndexTest.java |   2 +-
 .../apache/usergrid/rest/MigrateResource.java   |   2 +
 .../org/apache/usergrid/rest/RootResource.java  |   6 +-
 .../applications/ApplicationResource.java       |   2 +-
 .../organizations/AdminEmailEncodingIT.java     |   6 +-
 .../cassandra/ApplicationCreatorImpl.java       |  12 +-
 .../apns/FailedConnectionListener.java          |  31 +-
 .../org/apache/usergrid/ServiceITSetup.java     |   2 +
 .../org/apache/usergrid/ServiceITSetupImpl.java |  11 +-
 .../migration/AppInfoMigrationPluginTest.java   |   7 +-
 .../apache/usergrid/management/EmailFlowIT.java |   3 +-
 .../cassandra/ApplicationCreatorIT.java         |  10 +-
 171 files changed, 3744 insertions(+), 2314 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3a1ee574/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
----------------------------------------------------------------------
diff --cc stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
index 2ae9e64,5647d18..6013d54
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
@@@ -2296,20 -2243,9 +2243,15 @@@ public class CpEntityManager implement
      private Id getIdForUniqueEntityField( final String collectionName, final String propertyName,
                                            final Object propertyValue ) {
  
-         CollectionScope collectionScope = getCollectionScopeNameFromEntityType(
-             getApplicationScope().getApplication(), collectionName);
- 
-         final EntityCollectionManager ecm = managerCache.getEntityCollectionManager(collectionScope);
- 
          //convert to a string, that's what we store
-         final Id results = ecm.getIdField( new StringField(
+         final Id results = ecm.getIdField( Inflector.getInstance().singularize( collectionName
), new StringField(
                  propertyName, propertyValue.toString() ) ).toBlocking() .lastOrDefault(
null );
 +
 +//        final Id results = ecm.getIdField(
 +//            Inflector.getInstance().singularize( collectionName ),
 +//            new StringField( propertyName, propertyValue.toString() )
 +//        ).toBlocking() .lastOrDefault( null );
 +
          return results;
      }
  

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/3a1ee574/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
----------------------------------------------------------------------


Mime
View raw message