usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject incubator-usergrid git commit: Removed adding collections to the read queue via read worker. Instead i'm doing it on a per collection basis outside the worker processes for debugging. Will go back and add it to the workers after initial tests.
Date Mon, 06 Jul 2015 23:32:07 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/MigrationTool 7426cc061 -> d5573059c


Removed adding collections to the read queue via read worker. Instead i'm doing it on a per
collection basis outside the worker processes for debugging. Will go back and add it to the
workers after initial tests.


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

Branch: refs/heads/MigrationTool
Commit: d5573059c402bee2bd112d91fcf1c208bb967715
Parents: 7426cc0
Author: GERey <greyes@apigee.com>
Authored: Mon Jul 6 16:32:04 2015 -0700
Committer: GERey <greyes@apigee.com>
Committed: Mon Jul 6 16:32:04 2015 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/usergrid/tools/Migration.java  |  3 ++-
 .../java/org/apache/usergrid/tools/MigrationTest.java   | 12 +++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d5573059/stack/tools/src/main/java/org/apache/usergrid/tools/Migration.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/Migration.java b/stack/tools/src/main/java/org/apache/usergrid/tools/Migration.java
index d295b44..42f6855 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/Migration.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/Migration.java
@@ -264,7 +264,7 @@ public class Migration extends ExportingToolBase {
                     ApplicationWriteTask task = new ApplicationWriteTask();
                     task.entity = entity;
 
-                    addCollectionsToTask(   task, entity );
+                    //addCollectionsToTask(   task, entity );
                     addDictionariesToTask(  task, entity );
                     addConnectionsToTask(   task, entity );
 
@@ -295,6 +295,7 @@ public class Migration extends ExportingToolBase {
                     task.collectionsByName.put( collectionName, uuids );
                 }
 
+                //probably better to read sets of a thousand rather then a single bulk 100k
pull.
                 Results collectionMembers = em.getCollection( entity, collectionName, null,
100000, Level.IDS, false );
 
                 List<UUID> entityIds = collectionMembers.getIds();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d5573059/stack/tools/src/test/java/org/apache/usergrid/tools/MigrationTest.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/test/java/org/apache/usergrid/tools/MigrationTest.java b/stack/tools/src/test/java/org/apache/usergrid/tools/MigrationTest.java
index ad7c592..c196ca3 100644
--- a/stack/tools/src/test/java/org/apache/usergrid/tools/MigrationTest.java
+++ b/stack/tools/src/test/java/org/apache/usergrid/tools/MigrationTest.java
@@ -62,8 +62,8 @@ public class MigrationTest {
     public void testExportUserAndOrg() throws Exception {
 
 
-        // Create orgOwner+Application
-        int numOfEntities = 10;
+        // Works pretty well with larger values as well
+        int numOfEntities = 500;
 
         final String random1 = RandomStringUtils.randomAlphanumeric( 10 );
 
@@ -90,10 +90,12 @@ public class MigrationTest {
         for ( int index = 0; index < numOfEntities; index++ ) {
             entityLevelProperties = new LinkedHashMap<String, Object>();
             entityLevelProperties.put( "username", "user_"+index );
+            entityLevelProperties.put( "firstproperty","first"+RandomStringUtils.randomAlphanumeric(
10 ));
+            entityLevelProperties.put( "secondproperty","second"+RandomStringUtils.randomAlphanumeric(
10 ));
+            entityLevelProperties.put( "thirdproperty","third"+RandomStringUtils.randomAlphanumeric(
10 ));
+
             entNotCopied[index] = customMaker.create( "superappCol" + random1, entityLevelProperties
);
         }
-        //    }
-       // }
 
 
         // export to file
@@ -140,7 +142,7 @@ public class MigrationTest {
         }
 
         //TODO: Add further verification.
-        for ( int i = 0; i < 10; i++ ) {
+        for ( int i = 0; i < numOfEntities; i++ ) {
             assertTrue( usernames.contains( "user_"+i ) );
         }
 


Mime
View raw message