usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [2/6] git commit: merged upstream
Date Thu, 02 Oct 2014 06:35:34 GMT
merged upstream


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

Branch: refs/heads/tempmerge
Commit: 16d497ed29a9c24629a81980dcecf421e773034c
Parents: a5b6274 e5bcbb2
Author: amuramoto <amuramoto@apigee.com>
Authored: Tue Sep 30 15:53:15 2014 -0700
Committer: amuramoto <amuramoto@apigee.com>
Committed: Tue Sep 30 15:53:15 2014 -0700

----------------------------------------------------------------------
 .gitignore                                      |    1 +
 portal/js/global/ug-service.js                  | 1100 +++--
 portal/js/libs/usergrid.sdk.js                  | 4264 +++++++++---------
 sdks/java/pom.xml                               |   33 +-
 stack/.gitignore                                |    4 +-
 .../main/dist/init_instance/init_rest_server.sh |   38 +-
 .../dist/init_instance/install_cassandra.sh     |   14 +-
 .../dist/init_instance/install_elasticsearch.sh |   32 +-
 .../main/dist/init_instance/install_yourkit.sh  |   14 +-
 stack/awscluster/ugcluster-cf.json              |    3 +-
 stack/config/README.txt                         |    4 +-
 .../main/resources/usergrid-default.properties  |    2 +-
 stack/core/pom.xml                              |   10 -
 .../corepersistence/CpEntityManager.java        |   12 +-
 .../corepersistence/CpEntityManagerFactory.java |  184 +-
 .../corepersistence/CpRelationManager.java      |   71 +-
 .../HybridEntityManagerFactory.java             |   10 +
 .../apache/usergrid/metrics/MetricsFactory.java |   18 +-
 .../usergrid/mq/cassandra/QueueManagerImpl.java |   18 +-
 .../mq/cassandra/io/AbstractSearch.java         |  172 +-
 .../mq/cassandra/io/ConsumerTransaction.java    |   17 +-
 .../persistence/EntityManagerFactory.java       |    4 +
 .../cassandra/EntityManagerFactoryImpl.java     |   51 +
 .../usergrid/persistence/entities/Receipt.java  |   20 +-
 .../main/resources/usergrid-core-context.xml    |   13 +-
 .../java/org/apache/usergrid/Application.java   |    7 +
 .../org/apache/usergrid/CoreApplication.java    |    7 +
 .../persistence/PerformanceEntityReadTest.java  |  173 +
 .../persistence/PerformanceEntityWriteTest.java |  170 +
 .../cassandra/QueryProcessorTest.java           |    2 -
 stack/core/src/test/resources/log4j.properties  |    1 +
 .../impl/EntityCollectionManagerImpl.java       |    8 +-
 .../mvcc/stage/write/WriteUniqueVerify.java     |    2 +-
 .../persistence/core/astyanax/CassandraFig.java |    4 +-
 .../core/migration/MigrationManagerImpl.java    |    6 +
 .../graph/impl/GraphManagerImpl.java            |    6 +-
 .../impl/shard/impl/NodeShardCacheImpl.java     |    7 +-
 .../impl/shard/NodeShardCacheTest.java          |    7 +-
 .../index/impl/EsEntityIndexImpl.java           |  185 +-
 .../persistence/index/impl/EsProvider.java      |    1 +
 .../persistence/index/impl/EsQueryVistor.java   |  151 +-
 .../persistence/index/utils/LRUCache2.java      |  151 -
 .../index/impl/ElasticSearchTest.java           |  273 --
 .../impl/EntityConnectionIndexImplTest.java     |    2 -
 .../index/impl/EntityIndexMapUtils.java         |   12 +-
 .../persistence/index/impl/EntityIndexTest.java |   79 +-
 stack/launcher/README.txt                       |    2 +-
 .../resources/usergrid-standalone-context.xml   |    2 +-
 stack/pom.xml                                   |    2 +-
 .../apache/usergrid/rest/SystemResource.java    |   32 +-
 .../apache/usergrid/rest/AbstractRestIT.java    |    6 +-
 .../java/org/apache/usergrid/rest/BasicIT.java  |   34 +-
 .../usergrid/rest/ConcurrentRestITSuite.java    |   54 +-
 .../apache/usergrid/rest/NotificationsIT.java   |  239 +
 .../apache/usergrid/rest/PartialUpdateTest.java |   53 +-
 .../org/apache/usergrid/rest/RestITSuite.java   |   45 +-
 .../apache/usergrid/rest/TomcatResource.java    |    4 +-
 .../ApplicationRequestCounterIT.java            |   97 -
 .../rest/applications/DevicesResourceIT.java    |   87 -
 .../collection/BadGrammarQueryTest.java         |   79 -
 .../collection/CollectionsResourceIT.java       |  205 +
 .../collection/PagingResourceIT.java            |  239 -
 .../activities/ActivityResourceIT.java          |  188 +
 .../collection/activities/AndOrQueryTest.java   |  203 -
 .../collection/activities/OrderByTest.java      |  172 -
 .../activities/PagingEntitiesTest.java          |  141 -
 .../collection/devices/DevicesResourceIT.java   |   87 +
 .../collection/groups/GeoPagingTest.java        |  133 -
 .../collection/groups/GroupResourceIT.java      |  295 ++
 .../collection/paging/PagingEntitiesTest.java   |  141 +
 .../collection/paging/PagingResourceIT.java     |  301 ++
 .../users/ConnectionResourceTest.java           |  271 ++
 .../collection/users/OwnershipResourceIT.java   |  379 ++
 .../collection/users/PermissionsResourceIT.java |  768 ++++
 .../collection/users/RetrieveUsersTest.java     |   87 +
 .../collection/users/UserResourceIT.java        | 1418 ++++++
 .../users/extensions/TestResource.java          |   51 +
 .../events/ApplicationRequestCounterIT.java     |   97 +
 .../applications/queries/AndOrQueryTest.java    |  203 +
 .../queries/BadGrammarQueryTest.java            |   79 +
 .../applications/queries/GeoPagingTest.java     |  133 +
 .../applications/queries/MatrixQueryTests.java  |  202 +
 .../rest/applications/queries/OrderByTest.java  |  172 +
 .../applications/users/ActivityResourceIT.java  |  188 -
 .../users/CollectionsResourceIT.java            |  205 -
 .../users/ConnectionResourceTest.java           |  271 --
 .../applications/users/GroupResourceIT.java     |  295 --
 .../applications/users/MatrixQueryTests.java    |  202 -
 .../applications/users/OwnershipResourceIT.java |  379 --
 .../users/PermissionsResourceIT.java            |  768 ----
 .../applications/users/RetrieveUsersTest.java   |   87 -
 .../rest/applications/users/UserResourceIT.java | 1418 ------
 .../users/extensions/TestResource.java          |   51 -
 .../usergrid/rest/management/AccessTokenIT.java |  350 ++
 .../usergrid/rest/management/AdminUsersIT.java  |  807 ++++
 .../rest/management/ManagementResourceIT.java   |  397 +-
 .../rest/management/OrganizationsIT.java        |  378 ++
 .../organizations/OrganizationResourceIT.java   |   90 -
 .../organizations/OrganizationsResourceIT.java  |  322 --
 .../rest/management/users/MUUserResourceIT.java |  654 ---
 .../UsersOrganizationsResourceIT.java           |   72 -
 stack/rest/src/test/resources/log4j.properties  |   18 +-
 .../notifications/ApplicationQueueManager.java  |  182 +-
 .../notifications/NotificationsService.java     |   31 +-
 .../notifications/NotificationsTaskManager.java |   33 -
 .../services/notifications/QueueJob.java        |    4 +-
 .../services/notifications/QueueListener.java   |  235 +-
 .../services/notifications/QueueManager.java    |    2 -
 .../notifications/SingleQueueTaskManager.java   |  115 +-
 .../services/notifications/TaskManager.java     |  199 -
 .../services/notifications/TaskTracker.java     |    4 +-
 .../services/notifications/gcm/GCMAdapter.java  |   61 +-
 .../resources/usergrid-services-context.xml     |    9 +-
 .../AbstractServiceNotificationIT.java          |   22 +-
 .../apns/NotificationsServiceIT.java            |   12 +-
 .../gcm/NotificationsServiceIT.java             |    9 +-
 stack/tools/README.md                           |   22 +-
 .../org/apache/usergrid/tools/IndexRebuild.java |   99 +-
 .../org/apache/usergrid/tools/ToolBase.java     |   26 +-
 119 files changed, 11428 insertions(+), 10653 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/16d497ed/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 5e46d7f,f85ba30..f62c3fd
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java
@@@ -505,7 -503,8 +503,9 @@@ public class CpEntityManager implement
              logger.debug("About to Write {}:{} version {}", new Object[] { 
                  cpEntity.getId().getType(), cpEntity.getId().getUuid(), cpEntity.getVersion()
});
  
 +            cpEntity = ecm.update( cpEntity ).toBlockingObservable().last();
+             // using ecm.update() here causes Core tests to fail
 -            cpEntity = ecm.write( cpEntity ).toBlockingObservable().last();
++//            cpEntity = ecm.write( cpEntity ).toBlockingObservable().last();
  
              logger.debug("Wrote {}:{} version {}", new Object[] { 
                  cpEntity.getId().getType(), cpEntity.getId().getUuid(), cpEntity.getVersion()
});

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/16d497ed/stack/rest/src/test/java/org/apache/usergrid/rest/PartialUpdateTest.java
----------------------------------------------------------------------
diff --cc stack/rest/src/test/java/org/apache/usergrid/rest/PartialUpdateTest.java
index e150755,d685811..c2f3fcb
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/PartialUpdateTest.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/PartialUpdateTest.java
@@@ -23,7 -23,9 +23,13 @@@ import java.io.IOException
  import java.util.LinkedHashMap;
  import java.util.Map;
  import javax.ws.rs.core.MediaType;
++<<<<<<< HEAD
 +
++=======
+ import static org.junit.Assert.assertEquals;
+ import static org.junit.Assert.assertNotNull;
+ import static org.junit.Assert.fail;
++>>>>>>> e5bcbb23be66d12e428d817fd8b0b495793a939c
  import org.junit.Rule;
  import org.junit.Test;
  import org.slf4j.Logger;
@@@ -57,7 -50,10 +63,14 @@@ public class PartialUpdateTest extends 
              put( "username", "bart" );
              put( "employer", "Brawndo" );
              put( "email", "bart@personal-email.example.com" );
++<<<<<<< HEAD
 +            put( "location", geolocation);
++=======
+             put( "location", new LinkedHashMap<String, Object>() {{
+                 put("latitude", "37.3638875323994");
+                 put("longitude", "-122.12334411518498");
+             }} );
++>>>>>>> e5bcbb23be66d12e428d817fd8b0b495793a939c
          }};
  
          JsonNode userNode = mapper.readTree( 
@@@ -70,32 -66,63 +83,68 @@@
          assertNotNull( userNode );
          String uuid = userNode.withArray("entities").get(0).get("uuid").asText();
          assertNotNull( uuid );
- 
          refreshIndex( "test-organization", "test-app" );
  
 -        // Update bart's employer without specifying any required fields 
 -        // (with uuid specified in URL)
 -
 -        Map<String, Object> updateProperties = new LinkedHashMap<String, Object>()
{{
 -            put( "employer", "Initech" );
 -        }};
 -
 -        try {
 -            mapper.readTree( 
 -                resource().path( "/test-organization/test-app/user/" + uuid ) 
 -                    .queryParam( "access_token", adminAccessToken )
 -                    .accept( MediaType.APPLICATION_JSON )
 -                    .type( MediaType.APPLICATION_JSON )
 -                    .put( String.class, updateProperties ));
 -
 -        } catch ( UniformInterfaceException uie ) {
 -            fail("Update failed due to: " + uie.getResponse().getEntity(String.class));
 +        // update user bart passing only an update to a property
 +        for(int i=1; i<20; i++) {
 +            geolocation.put("latitude", latitude += 0.00001);
 +            geolocation.put("longitude", longitude += 0.00001);
 +            Map<String, Object> updateProperties = new LinkedHashMap<String, Object>()
{{
 +                put("employer", "Initech");
 +                put("location", geolocation);
 +            }};
 +
 +            try {
 +                JsonNode updatedNode = mapper.readTree(
 +                        resource().path("/test-organization/test-app/user/" + uuid)
 +                                .queryParam("access_token", adminAccessToken)
 +                                .accept(MediaType.APPLICATION_JSON)
 +                                .type(MediaType.APPLICATION_JSON)
 +                                .put(String.class, updateProperties));
 +                assertNotNull(updatedNode);
 +                assertNotEquals(latitude, updatedNode.get("entities").get(0).get("location").get("latitude"));
 +                assertNotEquals(longitude, updatedNode.get("entities").get(0).get("location").get("longitude"));
- 
 +            } catch (UniformInterfaceException uie) {
 +                fail("Update failed due to: " + uie.getResponse().getEntity(String.class));
 +            }
          }
+         refreshIndex( "test-organization", "test-app" );
+ 
+         userNode = mapper.readTree( 
+             resource().path( "/test-organization/test-app/users/" + uuid )
+                 .queryParam( "access_token", adminAccessToken )
+                 .accept( MediaType.APPLICATION_JSON )
+                 .get( String.class ));
+         assertNotNull( userNode );
+         assertEquals( "Initech", userNode.withArray("entities").get(0).get("employer").asText());
+ 
+ 
+         // Update bart's employer without specifying any required fields 
+         // (this time with username specified in URL)
+ 
+         updateProperties = new LinkedHashMap<String, Object>() {{
+             put( "employer", "ACME Corporation" );
+         }};
+ 
+         try {
+             mapper.readTree( 
+                 resource().path( "/test-organization/test-app/users/bart")
+                     .queryParam( "access_token", adminAccessToken )
+                     .accept( MediaType.APPLICATION_JSON )
+                     .type( MediaType.APPLICATION_JSON )
+                     .put( String.class, updateProperties ));
+ 
+         } catch ( UniformInterfaceException uie ) {
+             fail("Update failed due to: " + uie.getResponse().getEntity(String.class));
+         }
+         refreshIndex( "test-organization", "test-app" );
+ 
+         userNode = mapper.readTree( 
+             resource().path( "/test-organization/test-app/users/bart" )
+                 .queryParam( "access_token", adminAccessToken )
+                 .accept( MediaType.APPLICATION_JSON )
+                 .get( String.class ));
+         assertNotNull( userNode );
+         assertEquals( "ACME Corporation", userNode.withArray("entities").get(0).get("employer").asText());
      }
  }


Mime
View raw message