usergrid git commit: Fix issue where data from objects nested within an array were not getting indexed.

2015-11-03 Thread mrusso
Repository: usergrid
Updated Branches:
  refs/heads/USERGRID-1088 5772ebbd4 -> 244fa52ee (forced update)


Fix issue where data from objects nested within an array were not getting 
indexed.


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

Branch: refs/heads/USERGRID-1088
Commit: 244fa52ee2685d0ca68986b5747cd21576738d14
Parents: 432c2e9
Author: Michael Russo 
Authored: Tue Nov 3 11:12:29 2015 -0800
Committer: Michael Russo 
Committed: Tue Nov 3 11:25:38 2015 -0800

--
 .../index/impl/EntityMappingParser.java |  4 ++
 .../index/impl/EntityToMapConverterTest.java| 48 
 2 files changed, 52 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/usergrid/blob/244fa52e/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityMappingParser.java
--
diff --git 
a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityMappingParser.java
 
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityMappingParser.java
index 63cef04..2c82782 100644
--- 
a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityMappingParser.java
+++ 
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityMappingParser.java
@@ -202,11 +202,15 @@ public class EntityMappingParser implements FieldParser {
  */
 private void iterate( final Map map ) {
 
+lastCollection.push( map );
+
 for ( final Map.Entry jsonField : map.entrySet() ) {
 pushField( jsonField.getKey() );
 visitValue( jsonField.getValue() );
 popField();
 }
+
+lastCollection.pop();
 }
 
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/244fa52e/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverterTest.java
--
diff --git 
a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverterTest.java
 
b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverterTest.java
index c412cf4..7e7c466 100644
--- 
a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverterTest.java
+++ 
b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverterTest.java
@@ -650,4 +650,52 @@ public class EntityToMapConverterTest {
 
 assertEquals( "value", field.get( IndexingUtils.FIELD_STRING ) );
 }
+
+/**
+ * Objects nested within arrays are allowed to be indexed (just not n+1 
nested arrays themselves)
+ */
+@Test
+public void testObjectNestedInArray() {
+
+final ArrayField array = new ArrayField<>("array");
+
+// this should not get indexed
+final ArrayField nestedArray1 = new 
ArrayField<>("nestedArray");
+nestedArray1.add("1");
+
+// this should get indexed
+final EntityObject nestedObject1 = new EntityObject();
+final ArrayField objectArray = new 
ArrayField<>("nestedArrayInObject");
+final EntityObject nestedObject2 = new EntityObject();
+nestedObject2.setField(new StringField("nestedKey", "nestedValue"));
+objectArray.add(nestedObject2);
+nestedObject1.setField(objectArray);
+
+array.add(nestedArray1);
+array.add(nestedObject1);
+
+Entity rootEntity = new Entity( "test" );
+rootEntity.setField( array );
+
+final UUID version = UUIDGenerator.newTimeUUID();
+EntityUtils.setVersion( rootEntity, version );
+
+final ApplicationScope scope = new ApplicationScopeImpl( createId( 
"application" ) );
+final IndexEdge indexEdge =
+new IndexEdgeImpl( createId( "source" ), "testEdgeType", 
SearchEdge.NodeType.SOURCE, 1000 );
+
+final Map entityMap = EntityToMapConverter.convert( 
scope, indexEdge, rootEntity );
+final List fields = ( List ) entityMap.get( 
IndexingUtils.ENTITY_FIELDS );
+
+// if size of fields is not == 1, then we either
+// 1) did not index anything or 2) indexed the nested array that 
shouldn't be indexed at all
+assertEquals( 1, fields.size() );
+
+final EntityField field = fields.get( 0 );
+  

usergrid git commit: This closes #46

2015-11-03 Thread mdunker
Repository: usergrid
Updated Branches:
  refs/heads/master 568d35d57 -> 02d6a914d


This closes #46


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

Branch: refs/heads/master
Commit: 02d6a914d85f9ef4d631c166164b59b9f1650acc
Parents: 568d35d
Author: Mike Dunker 
Authored: Tue Nov 3 14:49:43 2015 -0800
Committer: Mike Dunker 
Committed: Tue Nov 3 14:49:43 2015 -0800

--

--




usergrid git commit: De-dup management app as part of migration script and fix re-index so it passes the APP uuid into the API call.

2015-11-03 Thread mrusso
Repository: usergrid
Updated Branches:
  refs/heads/2.1-release b04c4cc92 -> dfc70f45c (forced update)


De-dup management app as part of migration script and fix re-index so it passes 
the APP uuid into the API call.


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

Branch: refs/heads/2.1-release
Commit: dfc70f45cc1100776ed81cb346668dd73ca3288b
Parents: 244fa52
Author: Michael Russo 
Authored: Tue Nov 3 14:33:03 2015 -0800
Committer: Michael Russo 
Committed: Tue Nov 3 14:37:28 2015 -0800

--
 stack/scripts/multitenant_migrate.py | 20 
 1 file changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/usergrid/blob/dfc70f45/stack/scripts/multitenant_migrate.py
--
diff --git a/stack/scripts/multitenant_migrate.py 
b/stack/scripts/multitenant_migrate.py
index f728671..c31783c 100644
--- a/stack/scripts/multitenant_migrate.py
+++ b/stack/scripts/multitenant_migrate.py
@@ -232,7 +232,6 @@ class Migrate:
 break
 
 # Migrate app info
-
 if self.is_appinfo_migrated():
 self.logger.info('AppInfo already migrated. Resetting version 
for re-migration.')
 self.reset_appinfo_migration()
@@ -251,11 +250,24 @@ class Migrate:
 break
 self.logger.info('AppInfo Migration Ended.')
 
+# De-dup management app
+job = self.start_dedup(MANAGEMENT_APP_ID)
+self.logger.info('Started management dedup.  App=[%s], Job=[%s]', 
MANAGEMENT_APP_ID, job)
+is_running = True
+while is_running:
+time.sleep(STATUS_INTERVAL_SECONDS)
+is_running = self.is_dedup_running(job)
+if not is_running:
+break
+
+self.logger.info("Finished dedup. App=[%s], Job=[%s]", 
MANAGEMENT_APP_ID, job)
+self.metrics['dedup_end_' + MANAGEMENT_APP_ID] = get_current_time()
+
 # Reindex management app
 
 job = self.start_app_reindex(MANAGEMENT_APP_ID)
 self.metrics['reindex_start'] = get_current_time()
-self.logger.info('Started Re-index.  Job=[%s]', job)
+self.logger.info('Started management Re-index.  Job=[%s]', job)
 is_running = True
 while is_running:
 time.sleep(STATUS_INTERVAL_SECONDS)
@@ -263,7 +275,7 @@ class Migrate:
 if not is_running:
 break
 
-self.logger.info("Finished Re-index. Job=[%s]", job)
+self.logger.info("Finished management Re-index. Job=[%s]", job)
 self.metrics['reindex_end'] = get_current_time()
 
 # Dedup and re-index all of organization's apps
@@ -517,7 +529,7 @@ class Migrate:
 body = json.dumps({'updated': self.start_date})
 
 try:
-r = requests.post(url=self.get_reindex_url(), data=body, 
auth=(self.super_user, self.super_pass))
+r = requests.post(url=self.get_reindex_url() + "/" + appId, 
data=body, auth=(self.super_user, self.super_pass))
 
 if r.status_code == 200:
 response = r.json()



usergrid git commit: This closes #163 - cannot merge from unknown repository

2015-11-03 Thread mdunker
Repository: usergrid
Updated Branches:
  refs/heads/master 11594cebc -> 61a25bddf


This closes #163 - cannot merge from unknown repository


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

Branch: refs/heads/master
Commit: 61a25bddfe5c24ffb750a089e436732ee0d19604
Parents: 11594ce
Author: Mike Dunker 
Authored: Tue Nov 3 14:52:53 2015 -0800
Committer: Mike Dunker 
Committed: Tue Nov 3 14:52:53 2015 -0800

--

--




usergrid git commit: Fix issue where data from objects nested within an array were not getting indexed.

2015-11-03 Thread toddnine
Repository: usergrid
Updated Branches:
  refs/heads/2.1-release 432c2e9c1 -> 244fa52ee


Fix issue where data from objects nested within an array were not getting 
indexed.


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

Branch: refs/heads/2.1-release
Commit: 244fa52ee2685d0ca68986b5747cd21576738d14
Parents: 432c2e9
Author: Michael Russo 
Authored: Tue Nov 3 11:12:29 2015 -0800
Committer: Michael Russo 
Committed: Tue Nov 3 11:25:38 2015 -0800

--
 .../index/impl/EntityMappingParser.java |  4 ++
 .../index/impl/EntityToMapConverterTest.java| 48 
 2 files changed, 52 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/usergrid/blob/244fa52e/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityMappingParser.java
--
diff --git 
a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityMappingParser.java
 
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityMappingParser.java
index 63cef04..2c82782 100644
--- 
a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityMappingParser.java
+++ 
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EntityMappingParser.java
@@ -202,11 +202,15 @@ public class EntityMappingParser implements FieldParser {
  */
 private void iterate( final Map map ) {
 
+lastCollection.push( map );
+
 for ( final Map.Entry jsonField : map.entrySet() ) {
 pushField( jsonField.getKey() );
 visitValue( jsonField.getValue() );
 popField();
 }
+
+lastCollection.pop();
 }
 
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/244fa52e/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverterTest.java
--
diff --git 
a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverterTest.java
 
b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverterTest.java
index c412cf4..7e7c466 100644
--- 
a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverterTest.java
+++ 
b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityToMapConverterTest.java
@@ -650,4 +650,52 @@ public class EntityToMapConverterTest {
 
 assertEquals( "value", field.get( IndexingUtils.FIELD_STRING ) );
 }
+
+/**
+ * Objects nested within arrays are allowed to be indexed (just not n+1 
nested arrays themselves)
+ */
+@Test
+public void testObjectNestedInArray() {
+
+final ArrayField array = new ArrayField<>("array");
+
+// this should not get indexed
+final ArrayField nestedArray1 = new 
ArrayField<>("nestedArray");
+nestedArray1.add("1");
+
+// this should get indexed
+final EntityObject nestedObject1 = new EntityObject();
+final ArrayField objectArray = new 
ArrayField<>("nestedArrayInObject");
+final EntityObject nestedObject2 = new EntityObject();
+nestedObject2.setField(new StringField("nestedKey", "nestedValue"));
+objectArray.add(nestedObject2);
+nestedObject1.setField(objectArray);
+
+array.add(nestedArray1);
+array.add(nestedObject1);
+
+Entity rootEntity = new Entity( "test" );
+rootEntity.setField( array );
+
+final UUID version = UUIDGenerator.newTimeUUID();
+EntityUtils.setVersion( rootEntity, version );
+
+final ApplicationScope scope = new ApplicationScopeImpl( createId( 
"application" ) );
+final IndexEdge indexEdge =
+new IndexEdgeImpl( createId( "source" ), "testEdgeType", 
SearchEdge.NodeType.SOURCE, 1000 );
+
+final Map entityMap = EntityToMapConverter.convert( 
scope, indexEdge, rootEntity );
+final List fields = ( List ) entityMap.get( 
IndexingUtils.ENTITY_FIELDS );
+
+// if size of fields is not == 1, then we either
+// 1) did not index anything or 2) indexed the nested array that 
shouldn't be indexed at all
+assertEquals( 1, fields.size() );
+
+final EntityField field = fields.get( 0 );
+final String path 

usergrid git commit: Adds delta to avoid accidentally deleting a shard as it's allocated

2015-11-03 Thread toddnine
Repository: usergrid
Updated Branches:
  refs/heads/USERGRID-909 817d7ffb4 -> 06d34dbce


Adds delta to avoid accidentally deleting a shard as it's allocated


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

Branch: refs/heads/USERGRID-909
Commit: 06d34dbce75b2868649aea3b44c651ecd3799d30
Parents: 817d7ff
Author: Todd Nine 
Authored: Tue Nov 3 13:47:52 2015 -0700
Committer: Todd Nine 
Committed: Tue Nov 3 13:47:52 2015 -0700

--
 .../impl/ScopedCacheSerializationImpl.java  | 29 
 .../usergrid/persistence/graph/GraphFig.java| 20 ++--
 .../persistence/graph/guice/GraphModule.java|  2 +
 .../impl/shard/ShardEntryGroup.java | 18 +--
 .../shard/impl/NodeShardAllocationImpl.java | 49 +---
 .../shard/impl/ShardEntryGroupIterator.java |  6 ++-
 .../graph/GraphManagerShardConsistencyIT.java   | 37 ++-
 .../impl/shard/NodeShardAllocationTest.java | 12 +++--
 .../impl/shard/NodeShardGroupSearchTest.java| 14 +++---
 .../impl/shard/ShardEntryGroupTest.java | 47 +++
 .../shard/impl/ShardEntryGroupIteratorTest.java |  6 +--
 stack/corepersistence/locks/pom.xml |  8 ++--
 12 files changed, 121 insertions(+), 127 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/usergrid/blob/06d34dbc/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
--
diff --git 
a/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
 
b/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
index 1439bc5..bed84c6 100644
--- 
a/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
+++ 
b/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
@@ -21,6 +21,7 @@ import com.fasterxml.jackson.annotation.PropertyAccessor;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.google.common.base.Optional;
 import com.google.common.base.Preconditions;
 import com.google.common.hash.Funnel;
 import com.google.common.hash.PrimitiveSink;
@@ -79,13 +80,15 @@ public class ScopedCacheSerializationImpl implements 
ScopedCacheSerializati
 private static final int[] NUM_BUCKETS = {20};
 
 /** How to funnel keys for buckets */
-private static final Funnel MAP_KEY_FUNNEL = new Funnel() {
+private static final Funnel MAP_KEY_FUNNEL =
+( Funnel ) ( key, into ) -> into.putString(key, 
StringHashUtils.UTF8 );
+
+
+/**
+ * One second gc grace since our columns expire
+ */
+private static final int GC_GRACE = 1;
 
-@Override
-public void funnel( final String key, final PrimitiveSink into ) {
-into.putString(key, StringHashUtils.UTF8);
-}
-};
 
 /**
  * Locator to get us all buckets
@@ -252,18 +255,6 @@ public class ScopedCacheSerializationImpl implements 
ScopedCacheSerializati
 }
 
 
-private class MutationBatchExec implements Callable {
-private final MutationBatch myBatch;
-private MutationBatchExec(MutationBatch batch) {
-myBatch = batch;
-}
-@Override
-public Void call() throws Exception {
-myBatch.execute();
-return null;
-}
-}
-
 
 private OperationResult executeBatch(MutationBatch batch) {
 try {
@@ -284,7 +275,7 @@ public class ScopedCacheSerializationImpl implements 
ScopedCacheSerializati
 BytesType.class.getSimpleName(),
 BytesType.class.getSimpleName(),
 BytesType.class.getSimpleName(),
-MultiTennantColumnFamilyDefinition.CacheOption.KEYS );
+MultiTennantColumnFamilyDefinition.CacheOption.KEYS, 
Optional.of(GC_GRACE) );
 
 return Arrays.asList(scopedCache);
 }

http://git-wip-us.apache.org/repos/asf/usergrid/blob/06d34dbc/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/GraphFig.java
--
diff --git 
a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/GraphFig.java
 

usergrid git commit: Updates code hale to the latest

2015-11-03 Thread toddnine
Repository: usergrid
Updated Branches:
  refs/heads/USERGRID-909 06d34dbce -> f11c6971f


Updates code hale to the latest


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

Branch: refs/heads/USERGRID-909
Commit: f11c6971fbb65b8c349fab5dec36016a244bfd3b
Parents: 06d34db
Author: Todd Nine 
Authored: Tue Nov 3 17:55:50 2015 -0700
Committer: Todd Nine 
Committed: Tue Nov 3 17:55:50 2015 -0700

--
 stack/corepersistence/pom.xml | 2 +-
 stack/pom.xml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/usergrid/blob/f11c6971/stack/corepersistence/pom.xml
--
diff --git a/stack/corepersistence/pom.xml b/stack/corepersistence/pom.xml
index 3348157..b93e487 100644
--- a/stack/corepersistence/pom.xml
+++ b/stack/corepersistence/pom.xml
@@ -91,7 +91,7 @@ limitations under the License.
 1.7.2
 2.16
 1.10.6
-3.0.0
+3.0.2
 2.18.1
 0.7.5.201505241946
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/f11c6971/stack/pom.xml
--
diff --git a/stack/pom.xml b/stack/pom.xml
index c1ded77..c986738 100644
--- a/stack/pom.xml
+++ b/stack/pom.xml
@@ -126,7 +126,7 @@
   1
   8
 
-  3.0.0
+  3.0.2
 
surefire-junit47
   2.18.1
   1.6.1



usergrid git commit: De-dup management app as part of migration script and fix re-index so it passes the APP uuid into the API call.

2015-11-03 Thread mrusso
Repository: usergrid
Updated Branches:
  refs/heads/2.1-release 244fa52ee -> b04c4cc92


De-dup management app as part of migration script and fix re-index so it passes 
the APP uuid into the API call.


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

Branch: refs/heads/2.1-release
Commit: b04c4cc92daefa1db80aa2ce0cc2e15197d81dba
Parents: 244fa52
Author: Michael Russo 
Authored: Tue Nov 3 14:33:03 2015 -0800
Committer: Michael Russo 
Committed: Tue Nov 3 14:33:03 2015 -0800

--
 stack/scripts/multitenant_migrate.py | 20 
 1 file changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/usergrid/blob/b04c4cc9/stack/scripts/multitenant_migrate.py
--
diff --git a/stack/scripts/multitenant_migrate.py 
b/stack/scripts/multitenant_migrate.py
index f728671..0b64a51 100644
--- a/stack/scripts/multitenant_migrate.py
+++ b/stack/scripts/multitenant_migrate.py
@@ -231,8 +231,20 @@ class Migrate:
 if index_mapping_updated:
 break
 
-# Migrate app info
+# De-dup management app
+job = self.start_dedup(MANAGEMENT_APP_ID)
+self.logger.info('Started management dedup.  App=[%s], Job=[%s]', 
MANAGEMENT_APP_ID, job)
+is_running = True
+while is_running:
+time.sleep(STATUS_INTERVAL_SECONDS)
+is_running = self.is_dedup_running(job)
+if not is_running:
+break
 
+self.logger.info("Finished dedup. App=[%s], Job=[%s]", 
MANAGEMENT_APP_ID, job)
+self.metrics['dedup_end_' + MANAGEMENT_APP_ID] = get_current_time()
+
+# Migrate app info
 if self.is_appinfo_migrated():
 self.logger.info('AppInfo already migrated. Resetting version 
for re-migration.')
 self.reset_appinfo_migration()
@@ -255,7 +267,7 @@ class Migrate:
 
 job = self.start_app_reindex(MANAGEMENT_APP_ID)
 self.metrics['reindex_start'] = get_current_time()
-self.logger.info('Started Re-index.  Job=[%s]', job)
+self.logger.info('Started management Re-index.  Job=[%s]', job)
 is_running = True
 while is_running:
 time.sleep(STATUS_INTERVAL_SECONDS)
@@ -263,7 +275,7 @@ class Migrate:
 if not is_running:
 break
 
-self.logger.info("Finished Re-index. Job=[%s]", job)
+self.logger.info("Finished management Re-index. Job=[%s]", job)
 self.metrics['reindex_end'] = get_current_time()
 
 # Dedup and re-index all of organization's apps
@@ -517,7 +529,7 @@ class Migrate:
 body = json.dumps({'updated': self.start_date})
 
 try:
-r = requests.post(url=self.get_reindex_url(), data=body, 
auth=(self.super_user, self.super_pass))
+r = requests.post(url=self.get_reindex_url() + "/" + appId, 
data=body, auth=(self.super_user, self.super_pass))
 
 if r.status_code == 200:
 response = r.json()



usergrid git commit: This closes #312 - closed at request of developer

2015-11-03 Thread mdunker
Repository: usergrid
Updated Branches:
  refs/heads/master 61a25bddf -> 38a7d6236


This closes #312 - closed at request of developer


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

Branch: refs/heads/master
Commit: 38a7d62364637eef53b7a184e0e66cc2f46eef55
Parents: 61a25bd
Author: Mike Dunker 
Authored: Tue Nov 3 14:54:15 2015 -0800
Committer: Mike Dunker 
Committed: Tue Nov 3 14:54:15 2015 -0800

--

--