[12/51] [abbrv] usergrid git commit: Fix issue where tokenInfo was not being updated with latest inactive value. Add trace logging to TokenSerializationImpl. Fix issue with push notifications where th
Fix issue where tokenInfo was not being updated with latest inactive value. Add trace logging to TokenSerializationImpl. Fix issue with push notifications where the InactiveDeviceManager was making a duplicate (yet incorrect) query for devices. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/bea9a418 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/bea9a418 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/bea9a418 Branch: refs/heads/asf-site Commit: bea9a4180ebadb79e7f101cfc6d0d06efc39b359 Parents: 146e47d Author: Michael Russo Authored: Sun Jun 18 12:36:56 2017 -0700 Committer: Michael Russo Committed: Sun Jun 18 12:36:56 2017 -0700 -- .../token/impl/TokenSerializationImpl.java | 35 ++-- .../security/tokens/impl/TokenServiceImpl.java | 9 +++-- .../notifications/InactiveDeviceManager.java| 6 3 files changed, 31 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/bea9a418/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java -- diff --git a/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java b/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java index 2207b99..240da00 100644 --- a/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java +++ b/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java @@ -130,22 +130,27 @@ public class TokenSerializationImpl implements TokenSerialization { public void deleteTokens(final List tokenUUIDs, final ByteBuffer principalKeyBuffer){ Preconditions.checkNotNull(tokenUUIDs, "token UUID list is required"); +Preconditions.checkNotNull(tokenUUIDs, "principalKeyBuffer is required"); -final BatchStatement batchStatement = new BatchStatement(); +logger.trace("deleteTokens, token UUIDs: {}", tokenUUIDs); -tokenUUIDs.forEach( tokenUUID -> batchStatement.add( -QueryBuilder.delete() -.from(TOKENS_TABLE) -.where(QueryBuilder -.eq("key", DataType.uuid().serialize(tokenUUID, ProtocolVersion.NEWEST_SUPPORTED); +final BatchStatement batchStatement = new BatchStatement(); -if(principalKeyBuffer != null){ +tokenUUIDs.forEach( tokenUUID -> batchStatement.add( QueryBuilder.delete() -.from(PRINCIPAL_TOKENS_TABLE) +.from(TOKENS_TABLE) .where(QueryBuilder -.eq("key", principalKeyBuffer))); -} +.eq("key", DataType.uuid().serialize(tokenUUID, ProtocolVersion.NEWEST_SUPPORTED))) +) +); + +batchStatement.add( +QueryBuilder.delete() +.from(PRINCIPAL_TOKENS_TABLE) +.where(QueryBuilder +.eq("key", principalKeyBuffer))); + session.execute(batchStatement); @@ -157,6 +162,9 @@ public class TokenSerializationImpl implements TokenSerialization { Preconditions.checkNotNull(tokenUUID, "token UUID is required"); +logger.trace("revokeToken, token UUID: {}", tokenUUID); + + final BatchStatement batchStatement = new BatchStatement(); batchStatement.add( @@ -188,6 +196,8 @@ public class TokenSerializationImpl implements TokenSerialization { Preconditions.checkNotNull(inactiveTime, "inactiveTime is required"); Preconditions.checkNotNull(ttl, "ttl is required"); +logger.trace("updateTokenAccessTime, token UUID: {}, accessedTime: {}, inactiveTime: {}, ttl: {}", +tokenUUID, accessedTime, inactiveTime, ttl); final BatchStatement batchStatement = new BatchStatement(); final Clause inKey = @@ -265,6 +275,8 @@ public class TokenSerializationImpl implements TokenSerialization { }); +logger.trace("getTokenInfo, info: {}", tokenInfo); + return tokenInfo; } @@ -277,6 +289,7 @@ public class TokenSerializationImpl implements TokenSerialization { Preconditions.checkNotNull(tokenUUID, "tokenInfo is required"); Preconditions.checkNotNull(ttl, "ttl is required"); +logger.trace("putTokenInfo, token UUID: {}, tokenInfo: {}, ttl: {}", tokenUUID, tokenInfo, ttl); final BatchStatement batchStatement = new BatchStatement(); final Using usingTTL = QueryBuilder.ttl(ttl); @@ -332,6 +345,8 @@ public clas
[21/51] [abbrv] usergrid git commit: add a little more wait time
add a little more wait time Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/36e28a87 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/36e28a87 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/36e28a87 Branch: refs/heads/asf-site Commit: 36e28a8704bd129be9c78b16fb4f0b77e97381df Parents: 7d9cc89 Author: Mike Dunker Authored: Wed Aug 16 22:30:34 2017 -0700 Committer: Mike Dunker Committed: Wed Aug 16 22:30:34 2017 -0700 -- .../apache/usergrid/rest/applications/queries/QueryTestBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/36e28a87/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/QueryTestBase.java -- diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/QueryTestBase.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/QueryTestBase.java index 0adafef..1eec9ae 100644 --- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/QueryTestBase.java +++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/QueryTestBase.java @@ -65,7 +65,7 @@ public class QueryTestBase extends AbstractRestIT { logger.info(entities[i].entrySet().toString()); } //refresh the index so that they are immediately searchable -this.waitForQueueDrainAndRefreshIndex(); +this.waitForQueueDrainAndRefreshIndex(1000); return entities; }
[27/51] [abbrv] usergrid git commit: change test collection names so no race condition conflicts
change test collection names so no race condition conflicts Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/d06dbc95 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/d06dbc95 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/d06dbc95 Branch: refs/heads/asf-site Commit: d06dbc95a5e41a9cebb20f5859860dd74b6ae9ac Parents: 4b916c4 Author: Mike Dunker Authored: Wed Aug 16 22:28:54 2017 -0700 Committer: Mike Dunker Committed: Thu Aug 17 11:59:47 2017 -0700 -- .../applications/queries/AndOrQueryTest.java| 111 +++ .../queries/BadGrammarQueryTest.java| 12 +- .../rest/applications/queries/OrderByTest.java | 137 ++- .../queries/SelectMappingsQueryTest.java| 53 +++ 4 files changed, 160 insertions(+), 153 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/d06dbc95/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/AndOrQueryTest.java -- diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/AndOrQueryTest.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/AndOrQueryTest.java index 4bdd3fc..d49460c 100644 --- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/AndOrQueryTest.java +++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/AndOrQueryTest.java @@ -47,20 +47,20 @@ public class AndOrQueryTest extends QueryTestBase { @Test public void queryAndInclusive() throws IOException { int numOfEntities = 20; -String collectionName = "activities"; +String collectionName = "apples"; // create our test entities generateTestEntities(numOfEntities, collectionName); // Query where madeup = true (the last half) and the last quarter of entries QueryParameters params = new QueryParameters() .setQuery("select * where madeup = true AND ordinal >= " + (numOfEntities - numOfEntities / 4)); -Collection activities = this.app().collection("activities").get(params); +Collection coll = this.app().collection(collectionName).get(params); // results should have madeup = true and ordinal 15-19 -assertEquals(numOfEntities / 4, activities.getResponse().getEntityCount()); +assertEquals(numOfEntities / 4, coll.getResponse().getEntityCount()); // loop though entities that were returned, and test against the ordinals and values we are // expecting, starting with the last entity and decrementing int index = 19; -while (activities.hasNext()) { -Entity activity = activities.next(); +while (coll.hasNext()) { +Entity activity = coll.next(); // ensure the 'madeup' property is set to true assertTrue(Boolean.parseBoolean(activity.get("madeup").toString())); // make sure the correct ordinal properties are returned @@ -71,15 +71,15 @@ public class AndOrQueryTest extends QueryTestBase { @Test public void someTestProp() throws IOException { int numOfEntities = 20; -String collectionName = "activities"; +String collectionName = "bananas"; // create our test entities generateTestEntities(numOfEntities, collectionName); // Query where madeup = true (the last half) and the last quarter of entries QueryParameters params = new QueryParameters() .setQuery("where sometestprop = 'testprop'"); -Collection activities = this.app().collection("activities").get(params); +Collection coll = this.app().collection(collectionName).get(params); // results should have madeup = true and ordinal 15-19 -assertEquals(10, activities.getResponse().getEntityCount()); +assertEquals(10, coll.getResponse().getEntityCount()); } @@ -87,15 +87,15 @@ public class AndOrQueryTest extends QueryTestBase { @Test public void someTestPropPartialContains() throws IOException { int numOfEntities = 20; -String collectionName = "activities"; +String collectionName = "cantaloupes"; // create our test entities generateTestEntities(numOfEntities, collectionName); // Query where madeup = true (the last half) and the last quarter of entries QueryParameters params = new QueryParameters() .setQuery("where sometestprop contains 'test*'"); -Collection activities = this.app().collection("activities").get(params); +Collection coll = this.app().collection(collectionName).get(params); // results should have madeup = true and ordinal 15-19 -
[33/51] [abbrv] usergrid git commit: Converts de-indexing of edges and entities to identify documents in the index to delete based on data in Cassandra vs. resource intensive queries to the index. Fix
Converts de-indexing of edges and entities to identify documents in the index to delete based on data in Cassandra vs. resource intensive queries to the index. Fixes issue where nodes were not actually getting deleted from graph as marked edges were being filtered out during the delete process itself. Update to a newer vs. of jamm (used for jvm memory management in the test framework). Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c201f1f6 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c201f1f6 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c201f1f6 Branch: refs/heads/asf-site Commit: c201f1f67aa0f373958c3886c893979215cba88f Parents: 570e1ab Author: Michael Russo Authored: Sat Jul 8 17:10:25 2017 -0700 Committer: Mike Dunker Committed: Fri Aug 18 17:00:43 2017 -0700 -- .../corepersistence/EntityManagerFig.java | 2 +- .../asyncevents/AsyncEventServiceImpl.java | 23 +-- .../asyncevents/EventBuilder.java | 15 +- .../asyncevents/EventBuilderImpl.java | 172 ++- .../corepersistence/index/IndexService.java | 16 +- .../corepersistence/index/IndexServiceImpl.java | 56 ++ .../read/traverse/AbstractReadGraphFilter.java | 37 +--- .../AbstractReadReverseGraphFilter.java | 36 +--- .../org/apache/usergrid/persistence/Query.java | 17 ++ .../rx/EdgesFromSourceObservableIT.java | 2 +- .../rx/EdgesToTargetObservableIT.java | 4 +- .../core/src/test/resources/project.properties | 2 +- .../persistence/graph/GraphManager.java | 2 +- .../graph/impl/GraphManagerImpl.java| 21 +-- .../graph/impl/SimpleSearchByEdgeType.java | 9 + .../graph/impl/stage/NodeDeleteListener.java| 6 +- .../impl/stage/NodeDeleteListenerImpl.java | 64 +++ .../graph/serialization/EdgesObservable.java| 6 +- .../impl/EdgeMetadataSerializationV2Impl.java | 1 - .../serialization/impl/EdgesObservableImpl.java | 22 +-- .../impl/TargetIdObservableImpl.java| 4 +- .../impl/migration/EdgeDataMigrationImpl.java | 2 +- .../graph/impl/NodeDeleteListenerTest.java | 8 +- .../usergrid/persistence/index/EntityIndex.java | 12 +- .../index/impl/EsEntityIndexImpl.java | 63 --- .../persistence/index/query/Identifier.java | 3 +- stack/pom.xml | 8 +- stack/rest/pom.xml | 4 +- .../rest/src/test/resources/project.properties | 2 +- stack/services/pom.xml | 4 +- .../src/test/resources/project.properties | 2 +- stack/test-utils/pom.xml| 4 +- .../src/test/resources/project.properties | 2 +- stack/tools/pom.xml | 2 +- stack/websocket/pom.xml | 2 +- 35 files changed, 286 insertions(+), 349 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/c201f1f6/stack/core/src/main/java/org/apache/usergrid/corepersistence/EntityManagerFig.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/EntityManagerFig.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/EntityManagerFig.java index 872ffbb..46c7a1d 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/EntityManagerFig.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/EntityManagerFig.java @@ -39,7 +39,7 @@ public interface EntityManagerFig extends GuicyFig { int sleep(); @Key( "usergrid.entityManager.enable_deindex_on_update" ) -@Default( "true" ) +@Default( "false" ) boolean getDeindexOnUpdate(); /** http://git-wip-us.apache.org/repos/asf/usergrid/blob/c201f1f6/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java index 0e55e9b..79a80c0 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java @@ -640,8 +640,7 @@ public class AsyncEventServiceImpl implements AsyncEventService { } // default this observable's return to empty index operation message if nothing is emitted -return eventBuilder.buildDeleteEdge(applicationScope, edge) -.toBlo
[37/51] [abbrv] usergrid git commit: Give entity creation time to finish during collection delete test.
Give entity creation time to finish during collection delete test. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/3d3ba490 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/3d3ba490 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/3d3ba490 Branch: refs/heads/asf-site Commit: 3d3ba49065018a74a51709ed23bb777826b21f78 Parents: 8e9eff8 Author: Mike Dunker Authored: Mon Aug 28 19:29:06 2017 -0700 Committer: Mike Dunker Committed: Mon Aug 28 19:29:06 2017 -0700 -- .../org/apache/usergrid/persistence/CollectionDeleteTest.java | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/3d3ba490/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionDeleteTest.java -- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionDeleteTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionDeleteTest.java index ddf2c68..d062ef4 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionDeleteTest.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/CollectionDeleteTest.java @@ -111,6 +111,9 @@ public class CollectionDeleteTest extends AbstractCoreIT { } logger.info("Created {} entities", ENTITIES_TO_DELETE); + +app.waitForQueueDrainAndRefreshIndex(1); + long timeFirstPutDone = System.currentTimeMillis(); logger.info("timeFirstPutDone={}", timeFirstPutDone);
[09/51] [abbrv] usergrid git commit: Initial commit of new token module to replace Hector for access token storage.
Initial commit of new token module to replace Hector for access token storage. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/179f12db Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/179f12db Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/179f12db Branch: refs/heads/asf-site Commit: 179f12db0ef55cf9c28936678a933e2de04034eb Parents: 3f819dc Author: Michael Russo Authored: Fri Jun 16 00:15:14 2017 -0700 Committer: Michael Russo Committed: Fri Jun 16 00:15:14 2017 -0700 -- stack/corepersistence/pom.xml | 1 + stack/corepersistence/token/pom.xml | 70 +++ .../persistence/token/guice/TokenModule.java| 48 ++ .../token/impl/TokenSerialization.java | 50 ++ .../token/impl/TokenSerializationImpl.java | 536 +++ .../persistence/token/TokenTestModule.java | 40 ++ .../token/src/test/resources/log4j.properties | 38 ++ 7 files changed, 783 insertions(+) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/179f12db/stack/corepersistence/pom.xml -- diff --git a/stack/corepersistence/pom.xml b/stack/corepersistence/pom.xml index 8a45323..45aad4b 100644 --- a/stack/corepersistence/pom.xml +++ b/stack/corepersistence/pom.xml @@ -113,6 +113,7 @@ limitations under the License. queue cache actorsystem +token http://git-wip-us.apache.org/repos/asf/usergrid/blob/179f12db/stack/corepersistence/token/pom.xml -- diff --git a/stack/corepersistence/token/pom.xml b/stack/corepersistence/token/pom.xml new file mode 100644 index 000..fcbd73c --- /dev/null +++ b/stack/corepersistence/token/pom.xml @@ -0,0 +1,70 @@ + + +http://maven.apache.org/POM/4.0.0"; + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> + + +persistence +org.apache.usergrid +2.2.0-SNAPSHOT + + +4.0.0 +The module for handling access token persistence + +token +Usergrid Token + + + + +org.apache.commons +commons-lang3 +${commons.lang.version} + + + +org.apache.usergrid +common +${project.version} + + + + + +org.apache.usergrid +common +${project.version} +tests +test + + + + + + + http://git-wip-us.apache.org/repos/asf/usergrid/blob/179f12db/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/guice/TokenModule.java -- diff --git a/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/guice/TokenModule.java b/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/guice/TokenModule.java new file mode 100644 index 000..13d6b43 --- /dev/null +++ b/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/guice/TokenModule.java @@ -0,0 +1,48 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. The ASF licenses this file to You + * under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. For additional information regarding + * copyright in this work, please see the NOTICE file in the top level + * directory of this distribution. + */ +package org.apache.usergrid.persistence.token.guice; + +import com.google.inject.AbstractModule; +import com.google.inject.Key; +import com.google.inject.multibindings.Multibinder; +import org.apache.usergrid.persistence.cache.CacheFactory; +import org.apache.usergrid.persistence.cache.impl.CacheFactoryImpl; +import org.apache.usergrid.persistence.cache.impl.TokenSerialization; +import org.apache.usergrid.persistence.cache.impl.TokenSerializationImpl; +import org.apache.usergrid.persistence.core.migration.schema.Migration; + + +/** + * Wire up cache impl. + */ +public class TokenModule extends AbstractModule { + +@Override +protected
[24/51] [abbrv] usergrid git commit: fix broken recaptcha
fix broken recaptcha Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/459163b8 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/459163b8 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/459163b8 Branch: refs/heads/asf-site Commit: 459163b8ddb4b80ebb43273a8646ee9c8a6fe2bd Parents: be2f69c Author: Mike Dunker Authored: Wed Aug 9 18:39:23 2017 -0700 Committer: Mike Dunker Committed: Thu Aug 17 09:47:40 2017 -0700 -- .../rest/applications/ApplicationResource/authorize_form.jsp | 2 +- .../rest/applications/users/UserResource/resetpw_email_form.jsp | 4 ++-- .../rest/applications/users/UserResource/resetpw_set_form.jsp| 2 +- .../rest/applications/users/UsersResource/resetpw_email_form.jsp | 4 ++-- .../rest/management/ManagementResource/authorize_form.jsp| 2 +- .../rest/management/users/UserResource/resetpw_email_form.jsp| 4 ++-- .../rest/management/users/UserResource/resetpw_set_form.jsp | 2 +- .../rest/management/users/UsersResource/resetpw_email_form.jsp | 4 ++-- 8 files changed, 12 insertions(+), 12 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/459163b8/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/ApplicationResource/authorize_form.jsp -- diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/ApplicationResource/authorize_form.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/ApplicationResource/authorize_form.jsp index 0079bcf..ed934a7 100644 --- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/ApplicationResource/authorize_form.jsp +++ b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/ApplicationResource/authorize_form.jsp @@ -29,7 +29,7 @@ limitations under the License. - ${fn:escapeXml(it.errorMsg)} + ${fn:escapeXml(it.errorMsg)} http://git-wip-us.apache.org/repos/asf/usergrid/blob/459163b8/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/users/UserResource/resetpw_email_form.jsp -- diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/users/UserResource/resetpw_email_form.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/users/UserResource/resetpw_email_form.jsp index 59026bf..5230ea7 100644 --- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/users/UserResource/resetpw_email_form.jsp +++ b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/users/UserResource/resetpw_email_form.jsp @@ -27,7 +27,7 @@ limitations under the License. - + ${fn:escapeXml(it.errorMsg)} @@ -37,7 +37,7 @@ limitations under the License. - ${fn:escapeXml(it.reCaptchaHtml)} + ${it.reCaptchaHtml} http://git-wip-us.apache.org/repos/asf/usergrid/blob/459163b8/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/users/UserResource/resetpw_set_form.jsp -- diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/users/UserResource/resetpw_set_form.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/users/UserResource/resetpw_set_form.jsp index 19b6528..c0203ce 100644 --- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/users/UserResource/resetpw_set_form.jsp +++ b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/users/UserResource/resetpw_set_form.jsp @@ -31,7 +31,7 @@ limitations under the License. - ${fn:escapeXml(it.errorMsg)} + ${fn:escapeXml(it.errorMsg)} http://git-wip-us.apache.org/repos/asf/usergrid/blob/459163b8/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/users/UsersResource/resetpw_email_form.jsp -- diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/applications/u
[05/51] [abbrv] usergrid git commit: Add a new Asset binary provider for Google Cloud Storage. Refactor the BinaryStore implementation to follow a Factory pattern.
http://git-wip-us.apache.org/repos/asf/usergrid/blob/bafd4627/stack/services/src/main/java/org/apache/usergrid/services/assets/data/GoogleBinaryStore.java -- diff --git a/stack/services/src/main/java/org/apache/usergrid/services/assets/data/GoogleBinaryStore.java b/stack/services/src/main/java/org/apache/usergrid/services/assets/data/GoogleBinaryStore.java new file mode 100644 index 000..ae661f1 --- /dev/null +++ b/stack/services/src/main/java/org/apache/usergrid/services/assets/data/GoogleBinaryStore.java @@ -0,0 +1,223 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.usergrid.services.assets.data; + + +import com.google.api.services.storage.StorageScopes; +import com.google.auth.oauth2.GoogleCredentials; +import com.google.cloud.HttpTransportOptions; +import com.google.cloud.TransportOptions; +import com.google.cloud.WriteChannel; +import com.google.cloud.storage.*; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang.RandomStringUtils; +import org.apache.usergrid.persistence.Entity; +import org.apache.usergrid.persistence.EntityManager; +import org.apache.usergrid.persistence.EntityManagerFactory; +import org.apache.usergrid.utils.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.*; +import java.nio.ByteBuffer; +import java.security.GeneralSecurityException; +import java.util.Map; +import java.util.Properties; +import java.util.UUID; +import java.util.concurrent.atomic.AtomicLong; + + +public class GoogleBinaryStore implements BinaryStore { + +private static final Logger logger = LoggerFactory.getLogger(GoogleBinaryStore.class); +private static final long FIVE_MB = ( FileUtils.ONE_MB * 5 ); + + +private EntityManagerFactory entityManagerFactory; + +private Properties properties; + +private String bucketName; + +private Storage instance = null; + +private String reposLocation = FileUtils.getTempDirectoryPath(); + +public GoogleBinaryStore(Properties properties, + EntityManagerFactory entityManagerFactory, + String reposLocation) throws IOException, GeneralSecurityException { +this.entityManagerFactory = entityManagerFactory; +this.properties = properties; +this.reposLocation = reposLocation; +} + +private synchronized Storage getService() throws IOException, GeneralSecurityException { + +logger.trace("Getting Google Cloud Storage service"); + +// leave this here for tests because they do things like manipulate properties dynamically to test invalid values +this.bucketName = properties.getProperty( "usergrid.binary.bucketname" ); + + +if (instance == null) { + +// Google provides different authentication types which are different based on if the application is +// running within GCE(Google Compute Engine) or GAE (Google App Engine). If Usergrid is running in +// GCE or GAE, the SDK will automatically authenticate and get access to +// cloud storage. Else, the full path to a credential file should be provided in the following environment variable +// +// GOOGLE_APPLICATION_CREDENTIALS +// +// The SDK will attempt to load the credential file for a service account. See the following +// for more info: https://developers.google.com/identity/protocols/application-default-credentials#howtheywork +GoogleCredentials credentials = GoogleCredentials.getApplicationDefault().createScoped(StorageScopes.all()); + + +final TransportOptions transportOptions = HttpTransportOptions.newBuilder() +.setConnectTimeout(3) // in milliseconds +.setReadTimeout(3) // in milliseconds +.build(); + +instance = StorageOptions.newBuilder() +.setCredentials(credentials) +.setTransportOptions(transportOptions) +.build() +.getService(); +} + +return instance; +} + + +@Override +
[26/51] [abbrv] usergrid git commit: more cassandra.timeout increases for tests
more cassandra.timeout increases for tests Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/4b916c4d Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/4b916c4d Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/4b916c4d Branch: refs/heads/asf-site Commit: 4b916c4d39fa0018fbe01f8e0489b0f5d083e41e Parents: 70de6fd Author: Mike Dunker Authored: Thu Aug 17 11:57:53 2017 -0700 Committer: Mike Dunker Committed: Thu Aug 17 11:57:53 2017 -0700 -- stack/core/src/test/resources/usergrid-custom-test.properties | 1 + .../collection/src/test/resources/dynamic-test.properties | 1 + .../collection/src/test/resources/usergrid-CHOP.properties | 1 + .../collection/src/test/resources/usergrid-UNIT.properties | 1 + .../collection/src/test/resources/usergrid.properties | 1 + .../common/src/test/resources/usergrid-UNIT.properties | 2 +- .../graph/src/test/resources/usergrid-AWS.properties | 1 + .../graph/src/test/resources/usergrid-CHOP.properties | 1 + .../graph/src/test/resources/usergrid-UNIT.properties | 1 + stack/corepersistence/graph/src/test/resources/usergrid.properties | 1 + .../queryindex/src/test/resources/dynamic-test.properties | 1 + .../queryindex/src/test/resources/usergrid-CHOP.properties | 1 + .../queryindex/src/test/resources/usergrid-UNIT.properties | 1 + stack/corepersistence/queue/src/test/resources/qakka.properties| 1 + stack/rest/src/test/resources/usergrid-custom-test.properties | 1 + 15 files changed, 15 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/4b916c4d/stack/core/src/test/resources/usergrid-custom-test.properties -- diff --git a/stack/core/src/test/resources/usergrid-custom-test.properties b/stack/core/src/test/resources/usergrid-custom-test.properties index 8f9058d..e32b146 100644 --- a/stack/core/src/test/resources/usergrid-custom-test.properties +++ b/stack/core/src/test/resources/usergrid-custom-test.properties @@ -16,6 +16,7 @@ # with ug.heapmax=5000m and ug.heapmin=3000m (set in Maven settings.xml) #cassandra.connections=30 cassandra.timeout.pool=2 +cassandra.timeout=2 #Not a good number for real systems. Write shards should be 2x cluster size from our tests http://git-wip-us.apache.org/repos/asf/usergrid/blob/4b916c4d/stack/corepersistence/collection/src/test/resources/dynamic-test.properties -- diff --git a/stack/corepersistence/collection/src/test/resources/dynamic-test.properties b/stack/corepersistence/collection/src/test/resources/dynamic-test.properties index ca1a51c..59b8d31 100644 --- a/stack/corepersistence/collection/src/test/resources/dynamic-test.properties +++ b/stack/corepersistence/collection/src/test/resources/dynamic-test.properties @@ -2,6 +2,7 @@ # safe dynamic property defaults for our testing via IDE or Maven cassandra.connections=30 cassandra.timeout.pool=3 +cassandra.timeout=3 cassandra.port=9160 cassandra.hosts=localhost cassandra.cluster_name=Usergrid http://git-wip-us.apache.org/repos/asf/usergrid/blob/4b916c4d/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties -- diff --git a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties index c82bf83..9e95663 100644 --- a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties +++ b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties @@ -20,6 +20,7 @@ cassandra.connections=30 cassandra.timeout.pool=3 +cassandra.timeout=3 cassandra.port=9160 # a comma delimited private IP address list to your chop cassandra cluster http://git-wip-us.apache.org/repos/asf/usergrid/blob/4b916c4d/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties -- diff --git a/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties b/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties index 82bea14..0253e6e 100644 --- a/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties +++ b/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties @@ -21,6 +21,7 @@ # purposely setting connections lower to slow down the activity on the cassandra server locally cassandra.connections=5 cassandra.timeout.pool=6 +cassandra.timeout=6 cass
[14/51] [abbrv] usergrid git commit: Fix precondition checks and add another try/catch around the token workflow org id.
Fix precondition checks and add another try/catch around the token workflow org id. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c0ba7103 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c0ba7103 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c0ba7103 Branch: refs/heads/asf-site Commit: c0ba7103949564dd9cebc3631fe8e5002a7e73d2 Parents: 9963449 Author: Michael Russo Authored: Mon Jun 19 08:49:57 2017 -0700 Committer: Michael Russo Committed: Mon Jun 19 08:49:57 2017 -0700 -- .../persistence/token/impl/TokenSerializationImpl.java | 8 .../usergrid/security/tokens/impl/TokenServiceImpl.java | 6 +- 2 files changed, 9 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/c0ba7103/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java -- diff --git a/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java b/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java index 240da00..7825da0 100644 --- a/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java +++ b/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java @@ -192,9 +192,9 @@ public class TokenSerializationImpl implements TokenSerialization { public void updateTokenAccessTime(UUID tokenUUID, long accessedTime, long inactiveTime, int ttl ){ Preconditions.checkNotNull(tokenUUID, "token UUID is required"); -Preconditions.checkNotNull(accessedTime, "accessedTime is required"); -Preconditions.checkNotNull(inactiveTime, "inactiveTime is required"); -Preconditions.checkNotNull(ttl, "ttl is required"); +Preconditions.checkArgument(accessedTime > -1 , "accessedTime is required to be positive"); +Preconditions.checkArgument(inactiveTime > -1 , "inactiveTime is required to be positive"); +Preconditions.checkArgument(ttl > -1 , "ttl is required to be positive"); logger.trace("updateTokenAccessTime, token UUID: {}, accessedTime: {}, inactiveTime: {}, ttl: {}", tokenUUID, accessedTime, inactiveTime, ttl); @@ -287,7 +287,7 @@ public class TokenSerializationImpl implements TokenSerialization { Preconditions.checkNotNull(tokenUUID, "tokenUUID is required"); Preconditions.checkNotNull(tokenUUID, "tokenInfo is required"); -Preconditions.checkNotNull(ttl, "ttl is required"); +Preconditions.checkArgument(ttl > -1 , "ttl is required to be positive"); logger.trace("putTokenInfo, token UUID: {}, tokenInfo: {}, ttl: {}", tokenUUID, tokenInfo, ttl); http://git-wip-us.apache.org/repos/asf/usergrid/blob/c0ba7103/stack/services/src/main/java/org/apache/usergrid/security/tokens/impl/TokenServiceImpl.java -- diff --git a/stack/services/src/main/java/org/apache/usergrid/security/tokens/impl/TokenServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/security/tokens/impl/TokenServiceImpl.java index f149a1f..05859ad 100644 --- a/stack/services/src/main/java/org/apache/usergrid/security/tokens/impl/TokenServiceImpl.java +++ b/stack/services/src/main/java/org/apache/usergrid/security/tokens/impl/TokenServiceImpl.java @@ -456,7 +456,11 @@ public class TokenServiceImpl implements TokenService { UUID workflowOrgId = null; if (tokenDetails.containsKey(TOKEN_WORKFLOW_ORG_ID)) { -workflowOrgId = (UUID) tokenDetails.get(TOKEN_WORKFLOW_ORG_ID); +try { +workflowOrgId = (UUID) tokenDetails.get(TOKEN_WORKFLOW_ORG_ID); +} catch (ClassCastException cce){ +logger.error("Unable to cast {} to primitive UUID type", TOKEN_WORKFLOW_ORG_ID); +} } return new TokenInfo( uuid, type, created, accessed, inactive, duration, principal, state, workflowOrgId );
[16/51] [abbrv] usergrid git commit: Remove unused import.
Remove unused import. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/d8a7e10c Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/d8a7e10c Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/d8a7e10c Branch: refs/heads/asf-site Commit: d8a7e10cab3b6403d4688b4256c0449652261b62 Parents: c748242 Author: Michael Russo Authored: Mon Jun 19 12:56:35 2017 -0700 Committer: Michael Russo Committed: Mon Jun 19 12:56:35 2017 -0700 -- .../apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java | 1 - 1 file changed, 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/d8a7e10c/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java -- diff --git a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java index 1370298..5b49bc7 100644 --- a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java +++ b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java @@ -26,7 +26,6 @@ import java.util.concurrent.ExecutorService; import com.amazonaws.ClientConfiguration; import com.amazonaws.services.sqs.model.*; -import com.sun.javaws.exceptions.InvalidArgumentException; import org.slf4j.Logger; import org.slf4j.LoggerFactory;
[01/51] [abbrv] usergrid git commit: Switch DISTRIBUTED database queueing to default not cache in memory as the in memory impl causes duplicate messgae processing quite often at the moment.
Repository: usergrid Updated Branches: refs/heads/asf-site 77ad91a69 -> 893a04ddc http://git-wip-us.apache.org/repos/asf/usergrid/blob/d3e988bc/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/UserResourceIT.java -- diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/UserResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/UserResourceIT.java index f8cb9d4e..af87ca5 100644 --- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/UserResourceIT.java +++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/UserResourceIT.java @@ -75,7 +75,7 @@ public class UserResourceIT extends AbstractRestIT { usersResource = this.app().collection("users"); userResource = this.app().collection("user"); -clientSetup.refreshIndex(); +waitForQueueDrainAndRefreshIndex(); } @Test @@ -249,14 +249,14 @@ public class UserResourceIT extends AbstractRestIT { // same as above, but with actor partially filled out Entity entity = usersResource.entity(userId.toString()).activities().post(activity); -refreshIndex(); +waitForQueueDrainAndRefreshIndex(); UUID firstActivityId = entity.getUuid(); activity = new ActivityEntity("r...@rodsimpson.com", "POST", "activity 2"); entity = usersResource.entity(userId.toString()).activities().post(activity); -refreshIndex(); +waitForQueueDrainAndRefreshIndex(); UUID secondActivityId = entity.getUuid(); @@ -284,7 +284,7 @@ public class UserResourceIT extends AbstractRestIT { map.put("email", email); Entity userEntity = usersResource.post(new Entity(map)); -refreshIndex(); +waitForQueueDrainAndRefreshIndex(); // get the user with username property that has an email value Entity testUser = usersResource.entity(username).get(); @@ -315,7 +315,7 @@ public class UserResourceIT extends AbstractRestIT { map.put("email", email); usersResource.post(new Entity(map)); -refreshIndex(); +waitForQueueDrainAndRefreshIndex(); // get the user with email property value // get the user with username property that has an email value @@ -339,7 +339,7 @@ public class UserResourceIT extends AbstractRestIT { map.put("email", email); usersResource.post(new Entity(map)); -refreshIndex(); +waitForQueueDrainAndRefreshIndex(); // get the user with email property value // get the user with username property that has an email value @@ -409,7 +409,7 @@ public class UserResourceIT extends AbstractRestIT { Entity entity = usersResource.post(user); UUID createdId = entity.getUuid(); -refreshIndex(); +waitForQueueDrainAndRefreshIndex(); Collection results = usersResource.get(new QueryParameters().setQuery(String.format("name = '%s'", name))); entity = new User(results.getResponse().getEntities().get(0)); assertEquals(createdId, entity.getUuid()); @@ -429,13 +429,13 @@ public class UserResourceIT extends AbstractRestIT { UUID createdId = entity.getUuid(); -refreshIndex(); +waitForQueueDrainAndRefreshIndex(); Entity newEntity = usersResource.entity(createdId.toString()).get(); userResource.entity(newEntity).delete(); -refreshIndex(); +waitForQueueDrainAndRefreshIndex(); Collection results = usersResource.get( new QueryParameters().setQuery(String.format("username = '%s'", username))); @@ -460,7 +460,7 @@ public class UserResourceIT extends AbstractRestIT { User entity = new User(username, name, email, "password"); entity = new User(usersResource.post(entity)); -refreshIndex(); +waitForQueueDrainAndRefreshIndex(); UUID firstCreatedId = entity.getUuid(); username = "username2"; @@ -470,7 +470,7 @@ public class UserResourceIT extends AbstractRestIT { entity = new User(username, name, email, "password"); entity = new User(usersResource.post(entity)); -refreshIndex(); +waitForQueueDrainAndRefreshIndex(); UUID secondCreatedId = entity.getUuid(); @@ -484,7 +484,7 @@ public class UserResourceIT extends AbstractRestIT { assertEquals(secondCreatedId.toString(), conn1.getUuid().toString()); -refreshIndex(); +waitForQueueDrainAndRefreshIndex(); Entity conn2 = usersResource.entity( @@ -492,7 +492,7 @@ public class UserResourceIT extends AbstractRestIT { assertEquals(secondCreatedId.toString(), conn2.getUuid().toString()); -refreshIndex(); +waitForQueueDrainAndRefreshI
[13/51] [abbrv] usergrid git commit: Add try/catch around fetching and casting of token info from serialization map. Also, throw exceptions early.
Add try/catch around fetching and casting of token info from serialization map. Also, throw exceptions early. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/99634490 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/99634490 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/99634490 Branch: refs/heads/asf-site Commit: 9963449003b1559277780ab193fb529ddfdf3b4b Parents: bea9a41 Author: Michael Russo Authored: Mon Jun 19 08:31:31 2017 -0700 Committer: Michael Russo Committed: Mon Jun 19 08:31:31 2017 -0700 -- .../security/tokens/impl/TokenServiceImpl.java | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/99634490/stack/services/src/main/java/org/apache/usergrid/security/tokens/impl/TokenServiceImpl.java -- diff --git a/stack/services/src/main/java/org/apache/usergrid/security/tokens/impl/TokenServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/security/tokens/impl/TokenServiceImpl.java index 21bd0db..f149a1f 100644 --- a/stack/services/src/main/java/org/apache/usergrid/security/tokens/impl/TokenServiceImpl.java +++ b/stack/services/src/main/java/org/apache/usergrid/security/tokens/impl/TokenServiceImpl.java @@ -417,11 +417,21 @@ public class TokenServiceImpl implements TokenService { throw new InvalidTokenException( "Token not found in database" ); } -String type = (String) tokenDetails.get(TOKEN_TYPE); -long created = (long) tokenDetails.get(TOKEN_CREATED); -long accessed = (long) tokenDetails.get(TOKEN_ACCESSED); -long inactive = (long) tokenDetails.get(TOKEN_INACTIVE); -long duration = (long) tokenDetails.get(TOKEN_DURATION); +String type; +long created, accessed, inactive, duration; +try { +type = (String) tokenDetails.get(TOKEN_TYPE); +created = (long) tokenDetails.get(TOKEN_CREATED); +accessed = (long) tokenDetails.get(TOKEN_ACCESSED); +inactive = (long) tokenDetails.get(TOKEN_INACTIVE); +duration = (long) tokenDetails.get(TOKEN_DURATION); +} catch (ClassCastException cce){ +logger.error("Unable to cast token info to primitive type: {}", cce); +throw new RuntimeException("Unable to cast token info to primitive type"); +} catch (NullPointerException npe){ +logger.error("Unable to obtain token info from serialization layer, on or more missing properties: {}", npe); +throw new RuntimeException("Unable to obtain token info from serialization layer, on or more missing properties"); +} String principalTypeStr = (String) tokenDetails.get(TOKEN_PRINCIPAL_TYPE);
[20/51] [abbrv] usergrid git commit: change test collection names so no race condition conflicts
change test collection names so no race condition conflicts Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/7d9cc895 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/7d9cc895 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/7d9cc895 Branch: refs/heads/asf-site Commit: 7d9cc89599508d74fdc7e59aec5ab980e55a871a Parents: f22c6c4 Author: Mike Dunker Authored: Wed Aug 16 22:28:54 2017 -0700 Committer: Mike Dunker Committed: Wed Aug 16 22:28:54 2017 -0700 -- .../applications/queries/AndOrQueryTest.java| 111 +++ .../queries/BadGrammarQueryTest.java| 12 +- .../rest/applications/queries/OrderByTest.java | 137 ++- .../queries/SelectMappingsQueryTest.java| 53 +++ 4 files changed, 160 insertions(+), 153 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/7d9cc895/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/AndOrQueryTest.java -- diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/AndOrQueryTest.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/AndOrQueryTest.java index 4bdd3fc..d49460c 100644 --- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/AndOrQueryTest.java +++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/AndOrQueryTest.java @@ -47,20 +47,20 @@ public class AndOrQueryTest extends QueryTestBase { @Test public void queryAndInclusive() throws IOException { int numOfEntities = 20; -String collectionName = "activities"; +String collectionName = "apples"; // create our test entities generateTestEntities(numOfEntities, collectionName); // Query where madeup = true (the last half) and the last quarter of entries QueryParameters params = new QueryParameters() .setQuery("select * where madeup = true AND ordinal >= " + (numOfEntities - numOfEntities / 4)); -Collection activities = this.app().collection("activities").get(params); +Collection coll = this.app().collection(collectionName).get(params); // results should have madeup = true and ordinal 15-19 -assertEquals(numOfEntities / 4, activities.getResponse().getEntityCount()); +assertEquals(numOfEntities / 4, coll.getResponse().getEntityCount()); // loop though entities that were returned, and test against the ordinals and values we are // expecting, starting with the last entity and decrementing int index = 19; -while (activities.hasNext()) { -Entity activity = activities.next(); +while (coll.hasNext()) { +Entity activity = coll.next(); // ensure the 'madeup' property is set to true assertTrue(Boolean.parseBoolean(activity.get("madeup").toString())); // make sure the correct ordinal properties are returned @@ -71,15 +71,15 @@ public class AndOrQueryTest extends QueryTestBase { @Test public void someTestProp() throws IOException { int numOfEntities = 20; -String collectionName = "activities"; +String collectionName = "bananas"; // create our test entities generateTestEntities(numOfEntities, collectionName); // Query where madeup = true (the last half) and the last quarter of entries QueryParameters params = new QueryParameters() .setQuery("where sometestprop = 'testprop'"); -Collection activities = this.app().collection("activities").get(params); +Collection coll = this.app().collection(collectionName).get(params); // results should have madeup = true and ordinal 15-19 -assertEquals(10, activities.getResponse().getEntityCount()); +assertEquals(10, coll.getResponse().getEntityCount()); } @@ -87,15 +87,15 @@ public class AndOrQueryTest extends QueryTestBase { @Test public void someTestPropPartialContains() throws IOException { int numOfEntities = 20; -String collectionName = "activities"; +String collectionName = "cantaloupes"; // create our test entities generateTestEntities(numOfEntities, collectionName); // Query where madeup = true (the last half) and the last quarter of entries QueryParameters params = new QueryParameters() .setQuery("where sometestprop contains 'test*'"); -Collection activities = this.app().collection("activities").get(params); +Collection coll = this.app().collection(collectionName).get(params); // results should have madeup = true and ordinal 15-19 -
[06/51] [abbrv] usergrid git commit: Add a new Asset binary provider for Google Cloud Storage. Refactor the BinaryStore implementation to follow a Factory pattern.
Add a new Asset binary provider for Google Cloud Storage. Refactor the BinaryStore implementation to follow a Factory pattern. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/bafd4627 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/bafd4627 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/bafd4627 Branch: refs/heads/asf-site Commit: bafd462744803f28175b13d0c205e3b029a6ac54 Parents: 949b465 Author: Michael Russo Authored: Wed Apr 26 15:43:40 2017 -0700 Committer: Michael Russo Committed: Wed Apr 26 15:43:40 2017 -0700 -- .../main/resources/usergrid-default.properties | 22 +- .../test/resources/usergrid-test-context.xml| 6 +- .../rest/applications/ServiceResource.java | 62 +-- .../applications/assets/AssetsResource.java | 38 +- .../main/resources/usergrid-rest-context.xml| 15 +- .../applications/assets/AssetResourceIT.java| 2 +- .../applications/assets/AwsAssetResourceIT.java | 4 +- .../assets/GoogleAssetResourceIT.java | 419 +++ .../applications/assets/aws/NoAWSCredsRule.java | 124 -- .../assets/rules/NoAWSCredsRule.java| 136 ++ .../assets/rules/NoGoogleCredsRule.java | 118 ++ stack/services/pom.xml | 6 + .../services/assets/BinaryStoreFactory.java | 83 .../services/assets/data/AWSBinaryStore.java| 320 ++ .../assets/data/AwsSdkS3BinaryStore.java| 317 -- .../services/assets/data/GoogleBinaryStore.java | 223 ++ .../assets/data/LocalFileBinaryStore.java | 17 +- .../services/assets/data/S3BinaryStore.java | 346 --- .../test/resources/usergrid-test-context.xml| 12 +- 19 files changed, 1381 insertions(+), 889 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/bafd4627/stack/config/src/main/resources/usergrid-default.properties -- diff --git a/stack/config/src/main/resources/usergrid-default.properties b/stack/config/src/main/resources/usergrid-default.properties index 9c75ef0..0d1a193 100644 --- a/stack/config/src/main/resources/usergrid-default.properties +++ b/stack/config/src/main/resources/usergrid-default.properties @@ -565,13 +565,29 @@ usergrid.binary.bucketname=usergrid-binaries # usergrid.temp.files=/tmp/usergrid -# Set the implementation of binary uploading to be used -# Aws for aws s3 uploading, local +# Set the implementation of binary uploading to be used. Valid values: +# +# local - uses the local file system and "usergrid.temp.files" specifies the location +# aws - uses AWS Simple Storage Service (S3) +# google - uses Google Cloud Platform Storage service (GCS) +# +# +# If Google is specified, the following ENVIRONMENT variable must be set on the system running Usergrid: +# +# GOOGLE_APPLICATION_CREDENTIALS=/full/path/to/credentialfile.json +# +# See: https://developers.google.com/identity/protocols/application-default-credentials#howtheywork +# +# +# If AWS is specified, the following JVM Arguments must be set: +# +# AWS_ACCESS_KEY_ID=awsKeyId +# AWS_SECRET_KEY=awsKeySecret +# usergrid.binary.uploader=local - ### Usergrid Admin ## # # Usergrid has a sysadmin user which has access to the complete Usergrid system http://git-wip-us.apache.org/repos/asf/usergrid/blob/bafd4627/stack/query-validator/src/test/resources/usergrid-test-context.xml -- diff --git a/stack/query-validator/src/test/resources/usergrid-test-context.xml b/stack/query-validator/src/test/resources/usergrid-test-context.xml index 7affe6d..19af73d 100644 --- a/stack/query-validator/src/test/resources/usergrid-test-context.xml +++ b/stack/query-validator/src/test/resources/usergrid-test-context.xml @@ -44,7 +44,11 @@ - + + + + + http://git-wip-us.apache.org/repos/asf/usergrid/blob/bafd4627/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ServiceResource.java -- diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ServiceResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ServiceResource.java index 3835b75..9373f5e 100644 --- a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ServiceResource.java +++ b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ServiceResource.java @@ -20,6 +20,7 @@ package org.apache.usergrid.rest.applications; import com.amazonaws.AmazonServiceException; import com.fasterxml.jackson.databind.ObjectMapper;
[02/51] [abbrv] usergrid git commit: Switch DISTRIBUTED database queueing to default not cache in memory as the in memory impl causes duplicate messgae processing quite often at the moment.
http://git-wip-us.apache.org/repos/asf/usergrid/blob/d3e988bc/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/distributed/impl/DistributedQueueServiceImpl.java -- diff --git a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/distributed/impl/DistributedQueueServiceImpl.java b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/distributed/impl/DistributedQueueServiceImpl.java index 98e055a..b1f72aa 100644 --- a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/distributed/impl/DistributedQueueServiceImpl.java +++ b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/qakka/distributed/impl/DistributedQueueServiceImpl.java @@ -20,6 +20,8 @@ package org.apache.usergrid.persistence.qakka.distributed.impl; import akka.actor.ActorRef; +import akka.actor.ActorSystem; +import akka.dispatch.OnFailure; import akka.pattern.Patterns; import akka.util.Timeout; import com.codahale.metrics.*; @@ -42,7 +44,9 @@ import org.apache.usergrid.persistence.qakka.serialization.queuemessages.Databas import org.slf4j.Logger; import org.slf4j.LoggerFactory; import scala.concurrent.Await; +import scala.concurrent.ExecutionContext; import scala.concurrent.Future; +import scala.concurrent.Promise; import java.lang.reflect.Method; import java.util.*; @@ -235,20 +239,21 @@ public class DistributedQueueServiceImpl implements DistributedQueueService { public Collection getNextMessagesInternal( String queueName, int count ) { if ( actorSystemManager.getClientActor() == null || !actorSystemManager.isReady() ) { -logger.error("Akka Actor System is not ready yet for requests."); -return Collections.EMPTY_LIST; +logger.warn("Akka Actor System is not ready yet for requests."); +return Collections.emptyList(); } int maxRetries = qakkaFig.getMaxGetRetries(); int tries = 0; +boolean interrupted = false; + QueueGetRequest request = new QueueGetRequest( queueName, count ); while ( ++tries < maxRetries ) { try { Timeout t = new Timeout( qakkaFig.getGetTimeoutSeconds(), TimeUnit.SECONDS ); // ask ClientActor and wait (up to timeout) for response - Future fut = Patterns.ask( actorSystemManager.getClientActor(), request, t ); Object responseObject = Await.result( fut, t.duration() ); @@ -259,8 +264,8 @@ public class DistributedQueueServiceImpl implements DistributedQueueService { if ( response != null && response instanceof QueueGetResponse) { QueueGetResponse qprm = (QueueGetResponse)response; if ( qprm.isSuccess() ) { -if (tries > 1) { -logger.warn( "getNextMessage {} SUCCESS after {} tries", queueName, tries ); +if (tries > 1 && !interrupted) { +logger.warn( "getNextMessage for queue {} SUCCESS after {} tries", queueName, tries ); } } return qprm.getQueueMessages(); @@ -284,10 +289,13 @@ public class DistributedQueueServiceImpl implements DistributedQueueService { } } catch ( TimeoutException e ) { -logger.trace("TIMEOUT popping to queue " + queueName + " retrying " + tries, e ); - -} catch ( Exception e ) { -logger.debug("ERROR popping to queue " + queueName + " retrying " + tries, e ); +logger.warn("TIMEOUT popping queue " + queueName + ", attempt: " + tries, e ); +} catch(InterruptedException e){ +interrupted = true; +// this might happen, retry the ask again +logger.trace("Thread was marked interrupted so unable to wait for the result, attempt: {}", tries); +}catch ( Exception e ) { +logger.error("ERROR popping queue " + queueName + ", attempt: " + tries, e ); } } http://git-wip-us.apache.org/repos/asf/usergrid/blob/d3e988bc/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/distributed/actors/ShardAllocatorTest.java -- diff --git a/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/distributed/actors/ShardAllocatorTest.java b/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/distributed/actors/ShardAllocatorTest.java index 11f3d08..4745cb1 100644 --- a/stack/corepersistence/queue/src/test/java/org/apache/usergrid/persistence/qakka/distributed/actors/ShardAllocatorTest.java +++
[29/51] [abbrv] usergrid git commit: Basic code improvements 1. Increase some testing timeouts. 2. improve some logging statements. 3. Fix duplicate dependency in cored-persistence pom.xml 4. Accept S
Basic code improvements 1. Increase some testing timeouts. 2. improve some logging statements. 3. Fix duplicate dependency in cored-persistence pom.xml 4. Accept SNS or DISTRIBUTED_SNS as SNS queue types. 5. Drop missed test keyspaces for qakka tests. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/400365c3 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/400365c3 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/400365c3 Branch: refs/heads/asf-site Commit: 400365c36eb1a46ba76ca3b2cf8f2db6670227b1 Parents: 25f1b0e Author: Mike Dunker Authored: Thu Aug 17 08:59:18 2017 -0700 Committer: Mike Dunker Committed: Thu Aug 17 13:37:06 2017 -0700 -- .../main/resources/usergrid-default.properties| 2 +- .../resources/usergrid-custom-test.properties | 2 +- .../actorsystem/ActorSystemManagerImpl.java | 3 ++- .../persistence/index/impl/EsEntityIndexImpl.java | 2 +- stack/corepersistence/queue/pom.xml | 18 ++ .../persistence/queue/guice/QueueModule.java | 2 +- .../persistence/qakka/KeyspaceDropper.java| 6 +- .../qakka/core/QueueMessageManagerTest.java | 2 +- .../resources/usergrid-custom-test.properties | 2 +- 9 files changed, 19 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/stack/config/src/main/resources/usergrid-default.properties -- diff --git a/stack/config/src/main/resources/usergrid-default.properties b/stack/config/src/main/resources/usergrid-default.properties index 77b047e..bf1f5e7 100644 --- a/stack/config/src/main/resources/usergrid-default.properties +++ b/stack/config/src/main/resources/usergrid-default.properties @@ -112,7 +112,7 @@ cassandra.embedded=false # Read timeout for an individual request (in millseconds) # -#cassandra.timeout=5000 +#cassandra.timeout=2 # Set the credentials used for Cassandra, if any. http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/stack/core/src/test/resources/usergrid-custom-test.properties -- diff --git a/stack/core/src/test/resources/usergrid-custom-test.properties b/stack/core/src/test/resources/usergrid-custom-test.properties index e32b146..df253f0 100644 --- a/stack/core/src/test/resources/usergrid-custom-test.properties +++ b/stack/core/src/test/resources/usergrid-custom-test.properties @@ -16,7 +16,7 @@ # with ug.heapmax=5000m and ug.heapmin=3000m (set in Maven settings.xml) #cassandra.connections=30 cassandra.timeout.pool=2 -cassandra.timeout=2 +cassandra.timeout=25000 #Not a good number for real systems. Write shards should be 2x cluster size from our tests http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java -- diff --git a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java index bfa3abe..ea9ada8 100644 --- a/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java +++ b/stack/corepersistence/actorsystem/src/main/java/org/apache/usergrid/persistence/actorsystem/ActorSystemManagerImpl.java @@ -377,6 +377,7 @@ public class ActorSystemManagerImpl implements ActorSystemManager { Iterator messageTypes = routerProducer.getMessageTypes().iterator(); while ( messageTypes.hasNext() ) { Class messageType = messageTypes.next(); +logger.info("createClusterSystem: routerProducer {}: message type={}", routerProducer.getRouterPath(), messageType.getName()); routersByMessageType.put( messageType, routerProducer.getRouterPath() ); } } @@ -467,7 +468,7 @@ public class ActorSystemManagerImpl implements ActorSystemManager { if (started) { logger.info( "ClientActor [{}] has started", ra.path() ); } else { -throw new RuntimeException( "ClientActor ["+ra.path()+"] did not start in time" ); +throw new RuntimeException( "ClientActor ["+ra.path()+"] did not start in time, validate that akka seeds are configured properly" ); } } http://git-wip-us.apache.org/repos/asf/usergrid/blob/400365c3/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexIm
[51/51] [abbrv] usergrid git commit: Updates website content to reference community maintained buttons
Updates website content to reference community maintained buttons Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/893a04dd Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/893a04dd Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/893a04dd Branch: refs/heads/asf-site Commit: 893a04ddc99d80b27d527e791697ba8c4dcfe042 Parents: a769f30 Author: Todd Nine Authored: Wed Oct 18 10:09:30 2017 -0600 Committer: Todd Nine Committed: Wed Oct 18 10:20:57 2017 -0600 -- content/index.html | 4 +- content/releases/index.html| 1 + docs/README.md | 2 +- website/content/index.html | 4 +- website/content/static/github-btn.html | 2 - website/tmp/checksums | 3 - website/tmp/compiled_content | 14130 -- website/tmp/dependencies |10 - 8 files changed, 6 insertions(+), 14150 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/content/index.html -- diff --git a/content/index.html b/content/index.html index 0394438..83803f0 100644 --- a/content/index.html +++ b/content/index.html @@ -78,8 +78,8 @@ - - +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=watch&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=fork&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/content/releases/index.html -- diff --git a/content/releases/index.html b/content/releases/index.html index beb5bca..2c71570 100644 --- a/content/releases/index.html +++ b/content/releases/index.html @@ -98,6 +98,7 @@ Project releases are approved by vote of the Apache Usergrid Project Management Committee (PMC). Support for a release is provided by project volunteers on the project http://usergrid.apache.org/community/#mailing-lists";>mailing lists. Bugs found in a release may be discussed on the list and reported through the https://issues.apache.org/jira/browse/USERGRID";>issue tracker. The user mailing list and issue tracker are the only support options hosted by the Apache Usergrid project. + Note: When downloading from a mirror, please be sure to verify that checksums and signatures are correct. To do so, use the checksum and signature files from the main Apache site at https://www.apache.org/dist/usergrid/usergrid-2/v2.1.0/";>https://dist.apache.org/repos/dist/release/usergrid/usergrid-2/v2.1.0/. Find here the KEYS file, which contains all OpenPGP keys we use to sign releases here: https://www.apache.org/dist/usergrid/KEYS";>https://www.apache.org/dist/usergrid/KEYS http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/docs/README.md -- diff --git a/docs/README.md b/docs/README.md index 2f7888c..27a8baf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,8 +6,8 @@ Usergrid documentation is written in [Markdown](https://help.github.com/articles Sphinx requires Python and pip. Once you have Python, you can install sphinx and pip like so: - $ sudo easy_install sphinx $ sudo easy_install pip + $ sudo pip install sphinx==1.3.2 ## How to build the Usergrid documentation using Sphinx http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/website/content/index.html -- diff --git a/website/content/index.html b/website/content/index.html index 7dbabff..a80b1c2 100644 --- a/website/content/index.html +++ b/website/content/index.html @@ -14,8 +14,8 @@ title: the BaaS not made for Hipsters - - +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=watch&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=fork&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> http://git-wip-us.apa
[17/51] [abbrv] usergrid git commit: Merge commit 'refs/pull/573/head' of github.com:apache/usergrid
Merge commit 'refs/pull/573/head' of github.com:apache/usergrid Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/375814e0 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/375814e0 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/375814e0 Branch: refs/heads/asf-site Commit: 375814e00330f28b4209c7595ed591187abbb245 Parents: d8a7e10 c0ba710 Author: Michael Russo Authored: Mon Jun 19 12:58:30 2017 -0700 Committer: Michael Russo Committed: Mon Jun 19 12:58:30 2017 -0700 -- .../src/test/resources/usergrid-test.properties | 2 - stack/core/pom.xml | 6 + .../usergrid/corepersistence/CoreModule.java| 3 +- .../usergrid/corepersistence/CpSetup.java | 11 - .../persistence/cassandra/CassandraService.java | 3 - .../map/impl/MapSerializationImpl.java | 35 +- stack/corepersistence/pom.xml | 1 + stack/corepersistence/token/pom.xml | 70 ++ .../persistence/token/TokenSerialization.java | 50 ++ .../persistence/token/guice/TokenModule.java| 44 + .../token/impl/TokenSerializationImpl.java | 451 ++ .../persistence/token/TestTokenModule.java | 38 + .../token/TokenSerializationTest.java | 202 + .../token/src/test/resources/log4j.properties | 38 + .../resources/usergrid-standalone.properties| 2 - .../rest/management/ManagementResource.java | 4 +- .../rest/management/users/UserResource.java | 2 +- .../rest/management/users/UsersResource.java| 3 +- .../rest/management/ManagementResourceIT.java | 8 +- .../security/sso/SSOProviderFactory.java| 2 +- .../tokens/cassandra/TokenServiceImpl.java | 848 --- .../security/tokens/impl/TokenServiceImpl.java | 748 .../notifications/InactiveDeviceManager.java| 6 - .../resources/usergrid-services-context.xml | 3 +- .../security/tokens/TokenServiceIT.java | 2 +- .../test/resources/testApplicationContext.xml | 2 +- 26 files changed, 1680 insertions(+), 904 deletions(-) --
[31/51] [abbrv] usergrid git commit: move deletes to new delete queue -- read repair will fix attempts to access deleted entities and connections, so indexing and collection deletes can proceed more s
move deletes to new delete queue -- read repair will fix attempts to access deleted entities and connections, so indexing and collection deletes can proceed more slowly than other types of changes Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/570e1ab4 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/570e1ab4 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/570e1ab4 Branch: refs/heads/asf-site Commit: 570e1ab4e2d4d356756fedee6b7ed5a1bd2d8e93 Parents: 39ec4f2 Author: Mike Dunker Authored: Fri Aug 18 15:12:56 2017 -0700 Committer: Mike Dunker Committed: Fri Aug 18 15:12:56 2017 -0700 -- .../asyncevents/AsyncEventQueueType.java| 35 ++ .../asyncevents/AsyncEventService.java | 4 +- .../asyncevents/AsyncEventServiceImpl.java | 463 +-- .../index/IndexProcessorFig.java| 18 + .../corepersistence/index/ReIndexAction.java| 5 +- .../index/ReIndexServiceImpl.java | 3 +- .../read/traverse/AbstractReadGraphFilter.java | 11 +- .../AbstractReadReverseGraphFilter.java | 11 +- 8 files changed, 292 insertions(+), 258 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/570e1ab4/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventQueueType.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventQueueType.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventQueueType.java new file mode 100644 index 000..4b91e17 --- /dev/null +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventQueueType.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.usergrid.corepersistence.asyncevents; + +public enum AsyncEventQueueType { +REGULAR ("regular"), UTILITY("utility"), DELETE("delete"); + +private String displayName; +AsyncEventQueueType(String displayName) { +this.displayName = displayName; +} + +@Override +public String toString() { +return displayName; +} +} + http://git-wip-us.apache.org/repos/asf/usergrid/blob/570e1ab4/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventService.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventService.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventService.java index cab4e3e..9e346cf 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventService.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventService.java @@ -84,9 +84,9 @@ public interface AsyncEventService extends ReIndexAction { /** * * @param indexOperationMessage - * @param forUtilityQueue + * @param queueType */ -void queueIndexOperationMessage(final IndexOperationMessage indexOperationMessage, boolean forUtilityQueue); +void queueIndexOperationMessage(final IndexOperationMessage indexOperationMessage, AsyncEventQueueType queueType); /** * @param applicationScope http://git-wip-us.apache.org/repos/asf/usergrid/blob/570e1ab4/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java index 9501ad3..0e55e9b 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java +++ b/stack/core/src/main/java/org/apache/usergrid/
[2/3] usergrid git commit: Updates website content to reference community maintained buttons
http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/website/tmp/compiled_content -- diff --git a/website/tmp/compiled_content b/website/tmp/compiled_content deleted file mode 100644 index 91c5445..000 --- a/website/tmp/compiled_content +++ /dev/null @@ -1,14130 +0,0 @@ -{: data{�I"/bootstrap/bootstrap/:ET{:default{: lastI"��/*! - * Bootstrap v3.0.0 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - *//*! normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decorati on:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}input,button,select ,textarea{font-family:inherit;font-size:inherit;line-height:inherit}button,input,select[multiple],textarea{background-image:none}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16.098px;font-weight:200;line-height:1.4}@media(min-w idth:768px){.lead{font-size:21px}}small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-warning{color:#c09853}.text-danger{color:#b94a48}.text-success{color:#468847}.text-info{color:#3a87ad}.text-left{text-align:left}.text-right{text-align:right}.text-center{t
[49/51] [abbrv] usergrid git commit: Updates website content to reference community maintained buttons
http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/website/tmp/dependencies -- diff --git a/website/tmp/dependencies b/website/tmp/dependencies deleted file mode 100644 index 8ddff40..000 --- a/website/tmp/dependencies +++ /dev/null @@ -1,10 +0,0 @@ -{: data{: -edges[[iQiF[iQiN[iUi[iVi[iViF[iViN[iWi[iWiF[iWiN: vertices[X0[: itemI"/bootstrap/bootstrap/:ET[;I"/community/; T[;I"/css/bootflat-extensions/; T[;I"/css/bootflat-square/; T[;I"/css/bootflat/;T[;I"/css/font-awesome/; T[;I"/css/usergrid-site/; T[;I"/favicon/; T[;I"#/font/fontawesome-webfont-eot/; T[;I"#/font/fontawesome-webfont-svg/; T[;I"#/font/fontawesome-webfont-ttf/; T[;I"$/font/fontawesome-webfont-woff/; T[;I"/font/FontAwesome/; T[;I"/img/alberto/; T[;I"/img/alex/; T[;I""/img/apache_usergrid_favicon/; T[;I"%/img/apache_usergrid_logo_white/; T[;I"+/img/apache_usergrid_logo_white_small/; T[;I"/img/check_flat/default/; T[;I"/img/dave/;T[;I" /img/ed/; T[;I"/img/egg-logo/;T[;I"/img/github/; T[;I"/img/grey/;T[;I"/img/intellij/;T[;I"/img/jeff/; T[;I"/img/michael_r/; T[;I"/img/miked/; T[;I"/img/nate/; T[;I"/img/rod/; T[;I"/img/scott/; T[;I"/img/shawn/; T[;I"/img/stliu/; T[;I"/img/strong/; T[;I"/img/structure101/;T[;I"/img/sungju/; T[;I"/img/tim/; T[;I"/img/todd/;T[;I"/img/usergrid-logo/; T[;I"/img/usergrid/;T[;I"/img/usergrid_160/; T[;I"/img/usergrid_200/;T[;I"/img/usergrid_300/; T[;I"#/img/usergrid_300_transparent/;T[;I"/img/usergrid_400/; T[;I"/img/usergrid_800/;T[;I"/img/usergrid_card/; T[;I"/img/usergrid_logo/; T[;I"/img/usergrid_logo_205_50/; T[;I"/img/usergrid_logo_260_50/;T[;I"/img/usergrid_logo_720/; T[;I"/img/usergrid_logo_720p/; T[;I" /img/usergrid_logo_900_200/; T[;I"/img/usergrid_logo_white/; T[;I"/img/usergrid_profile_128/; T[;I"/img/usergrid_profile_256/; T[;I"%/img/usergrid_profile_256_white/; T[;I"'/img/usergrid_profile_512_margins/; T[;I"$/img/usergrid_profile_64_white/; T[;I"&/img/usergrid_profile_background/; T[;I"!/img/usergrid_screencast_bg/; T[;I"/img/usergrid_small_100/; T[;I"/img/userg rid_wiki/;T[;I"/img/yourkit/; T[;I"/; T[;I"/js/bootstrap/;T[;I"/js/head/; T[;I"/js/html5shiv/;T[;I"/js/jquery-1/; T[;I"/js/jquery/; T[;I"/js/respond/; T[;I"/js/usergrid-site/;T[;I"/releases/; T[;I"/static/github-btn/; T[:layouto:Nanoc::Identifier: -@type:legacy:@stringI"/community/; T[; -o;;; ;I"/default/;T[; -o;;; ;I"/docs/; T[; -o;;; ;I" /footer/; T[; -o;;; ;I" /header/; T[; -@�[; -@�[; -@�:versioni \ No newline at end of file
[42/51] [abbrv] usergrid git commit: add reset_url as field in admin confirmation email
add reset_url as field in admin confirmation email Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/173be8a4 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/173be8a4 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/173be8a4 Branch: refs/heads/asf-site Commit: 173be8a4b968eda617f73a3baf05fa7870594657 Parents: 7f40d68 Author: Mike Dunker Authored: Fri Sep 22 14:51:55 2017 -0700 Committer: Mike Dunker Committed: Tue Sep 26 08:09:04 2017 -0700 -- .../management/cassandra/ManagementServiceImpl.java| 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/173be8a4/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java -- diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java index 2302d8d..ab93563 100644 --- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java +++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java @@ -2680,10 +2680,17 @@ public class ManagementServiceImpl implements ManagementService { String token = getConfirmationTokenForAdminUser(user.getUuid(), 0, organizationId); OrganizationConfig orgConfig = organizationId != null ? getOrganizationConfigByUuid(organizationId) : getOrganizationConfigForUserInfo(user); -String confirmation_url = orgConfig.getFullUrl(WorkflowUrl.ADMIN_CONFIRMATION_URL, -user.getUuid().toString()) + "?token=" + token; +String confirmation_url = orgConfig.getFullUrl(WorkflowUrl.ADMIN_CONFIRMATION_URL, user.getUuid().toString()) + +"?token=" + token; + +String reset_token = getPasswordResetTokenForAdminUser( user.getUuid(), 0, organizationId ); +String resetPropertyUrl = orgConfig.getFullUrlTemplate(WorkflowUrl.ADMIN_RESETPW_URL); +String reset_url = String.format(resetPropertyUrl, user.getUuid().toString()) ++ "?token=" + reset_token; + sendAdminUserEmail(user, "User Account Confirmation: " + user.getEmail(), -emailMsg(hashMap("confirm_email", user.getEmail()).map("confirmation_url", confirmation_url), +emailMsg(hashMap("confirm_email", user.getEmail()).map("confirmation_url", confirmation_url) +.map("reset_url", reset_url), PROPERTIES_EMAIL_ADMIN_CONFIRMATION)); }
[45/51] [abbrv] usergrid git commit: Remove orphaned collection edges with no target entity
Remove orphaned collection edges with no target entity Also remove extraneous entityID sort from the default Elasticsearch sort Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/f4842b06 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/f4842b06 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/f4842b06 Branch: refs/heads/asf-site Commit: f4842b06cd9fbc03af03039cc1f050a887c9b45c Parents: 4a65910 Author: Mike Dunker Authored: Fri Oct 13 10:13:55 2017 -0700 Committer: Mike Dunker Committed: Fri Oct 13 10:13:55 2017 -0700 -- .../usergrid/corepersistence/CoreModule.java| 3 + .../read/traverse/EntityLoadVerifyFilter.java | 72 +--- .../pipeline/read/traverse/ReadRepairFig.java | 38 +++ .../impl/SearchRequestBuilderStrategy.java | 3 +- 4 files changed, 106 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/f4842b06/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java index a0748e6..909c073 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java @@ -27,6 +27,7 @@ import org.apache.usergrid.corepersistence.migration.CoreMigration; import org.apache.usergrid.corepersistence.migration.CoreMigrationPlugin; import org.apache.usergrid.corepersistence.migration.DeDupConnectionDataMigration; import org.apache.usergrid.corepersistence.pipeline.PipelineModule; +import org.apache.usergrid.corepersistence.pipeline.read.traverse.ReadRepairFig; import org.apache.usergrid.corepersistence.rx.impl.*; import org.apache.usergrid.corepersistence.service.*; import org.apache.usergrid.locking.guice.LockModule; @@ -160,6 +161,8 @@ public class CoreModule extends AbstractModule { install( new GuicyFigModule( EntityManagerFig.class ) ); +install( new GuicyFigModule( ReadRepairFig.class ) ); + install( new GuicyFigModule( AsyncEventsSchedulerFig.class ) ); install( new GuicyFigModule( ServiceSchedulerFig.class ) ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/f4842b06/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java index 3f6e26d..7cc9735 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java @@ -23,6 +23,11 @@ package org.apache.usergrid.corepersistence.pipeline.read.traverse; import java.util.ArrayList; import java.util.List; +import org.apache.usergrid.corepersistence.util.CpNamingUtils; +import org.apache.usergrid.persistence.Schema; +import org.apache.usergrid.persistence.core.scope.ApplicationScope; +import org.apache.usergrid.persistence.graph.*; +import org.apache.usergrid.persistence.graph.impl.SimpleSearchByEdge; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -52,11 +57,17 @@ public class EntityLoadVerifyFilter extends AbstractFilter, Fil private static final Logger logger = LoggerFactory.getLogger( EntityLoadVerifyFilter.class ); private final EntityCollectionManagerFactory entityCollectionManagerFactory; +private final GraphManagerFactory graphManagerFactory; +private final ReadRepairFig readRepairFig; @Inject -public EntityLoadVerifyFilter( final EntityCollectionManagerFactory entityCollectionManagerFactory ) { +public EntityLoadVerifyFilter( final EntityCollectionManagerFactory entityCollectionManagerFactory, + final GraphManagerFactory graphManagerFactory, + final ReadRepairFig readRepairFig) { this.entityCollectionManagerFactory = entityCollectionManagerFactory; +this.graphManagerFactory = graphManagerFactory; +this.readRepairFig = readRepairFig; } @@ -64,8 +75,9 @@ public class EntityLoadVerifyFilter extends AbstractFilter, Fil public Observable> call( final Observable> filterResultObservable ) { +final ApplicationScope applicationScope =
[04/51] [abbrv] usergrid git commit: Add new push notification test and remove duplicate index processing on entity create/update.
Add new push notification test and remove duplicate index processing on entity create/update. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/949b4650 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/949b4650 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/949b4650 Branch: refs/heads/asf-site Commit: 949b4650608ce9ecd3d3bea10ff81d7fe7f8be2f Parents: d3e988b Author: Michael Russo Authored: Wed Apr 5 19:01:11 2017 -0700 Committer: Michael Russo Committed: Wed Apr 5 19:01:11 2017 -0700 -- .../batch/service/JobSchedulerService.java | 8 ++-- .../batch/service/SchedulerServiceImpl.java | 2 +- .../asyncevents/AsyncEventServiceImpl.java | 14 ++ .../org/apache/usergrid/ServiceITSetup.java | 3 ++ .../org/apache/usergrid/ServiceITSetupImpl.java | 17 --- .../apns/NotificationsServiceIT.java| 47 +--- 6 files changed, 62 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/949b4650/stack/core/src/main/java/org/apache/usergrid/batch/service/JobSchedulerService.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/service/JobSchedulerService.java b/stack/core/src/main/java/org/apache/usergrid/batch/service/JobSchedulerService.java index 807daa3..23a86af 100644 --- a/stack/core/src/main/java/org/apache/usergrid/batch/service/JobSchedulerService.java +++ b/stack/core/src/main/java/org/apache/usergrid/batch/service/JobSchedulerService.java @@ -129,9 +129,9 @@ public class JobSchedulerService extends AbstractScheduledService { } for ( JobDescriptor jd : activeJobs ) { -logger.info( "Submitting work for {}", jd ); +logger.debug( "Submitting work for {}", jd ); submitWork( jd ); -logger.info( "Work submitted for {}", jd ); +logger.debug( "Work submitted for {}", jd ); } } } @@ -228,7 +228,7 @@ public class JobSchedulerService extends AbstractScheduledService { // TODO wrap and throw specifically typed exception for onFailure, // needs jobId -logger.info( "Starting job {} with execution data {}", job, execution ); +logger.debug( "Starting job {} with execution data {}", job, execution ); job.execute( execution ); @@ -259,7 +259,7 @@ public class JobSchedulerService extends AbstractScheduledService { //TODO, refactor into the execution itself for checking if done if ( execution.getStatus() == Status.IN_PROGRESS ) { -logger.info( "Successful completion of bulkJob {}", execution ); +logger.debug( "Successful completion of bulkJob {}", execution ); execution.completed(); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/949b4650/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerServiceImpl.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerServiceImpl.java index af933f6..9b3714c 100644 --- a/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerServiceImpl.java +++ b/stack/core/src/main/java/org/apache/usergrid/batch/service/SchedulerServiceImpl.java @@ -305,7 +305,7 @@ public class SchedulerServiceImpl implements SchedulerService, JobAccessor, JobR getEm().update( data ); } -logger.info( "Updating stats for job {}", data.getJobName() ); +logger.debug( "Updating stats for job {}", data.getJobName() ); getEm().update( stat ); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/949b4650/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java index e565754..75d2ce0 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java @@ -420,8 +420,8 @@ public class AsyncEventServiceImpl implements AsyncEventService { if( !
[08/51] [abbrv] usergrid git commit: dead letter queue handling 1. Add workers that move messages from dead letter queues back to the indexing and utility queues. 2. Change ERROR for DuplicateUniquePr
dead letter queue handling 1. Add workers that move messages from dead letter queues back to the indexing and utility queues. 2. Change ERROR for DuplicateUniquePropertyExistsException to INFO. This happens when someone tries to create an entity with the same unique value as another entity, which is not an error that should be logged. 3. Add better logging when cluster region or region list has an invalid region. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/59354608 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/59354608 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/59354608 Branch: refs/heads/asf-site Commit: 5935460829622ceee91d72ff8a3b44529875ae29 Parents: 3f819dc Author: Mike Dunker Authored: Wed Jun 14 16:00:13 2017 -0700 Committer: Mike Dunker Committed: Wed Jun 14 16:00:13 2017 -0700 -- .../main/resources/usergrid-default.properties | 26 +- .../usergrid/corepersistence/CoreModule.java| 1 + .../asyncevents/AsyncEventServiceImpl.java | 283 +++ .../index/IndexProcessorFig.java| 30 +- .../persistence/queue/LegacyQueueFig.java | 7 +- .../persistence/queue/LegacyQueueManager.java | 9 + .../persistence/queue/LegacyQueueScope.java | 5 + .../persistence/queue/LocalQueueManager.java| 20 +- .../persistence/queue/guice/QueueModule.java| 4 + .../queue/impl/LegacyQueueScopeImpl.java| 25 +- .../queue/impl/QakkaQueueManager.java | 13 + .../queue/impl/SNSQueueManagerImpl.java | 97 +-- .../services/AbstractCollectionService.java | 9 + .../services/queues/ImportQueueManager.java | 8 + 14 files changed, 452 insertions(+), 85 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/59354608/stack/config/src/main/resources/usergrid-default.properties -- diff --git a/stack/config/src/main/resources/usergrid-default.properties b/stack/config/src/main/resources/usergrid-default.properties index 0d1a193..d505a96 100644 --- a/stack/config/src/main/resources/usergrid-default.properties +++ b/stack/config/src/main/resources/usergrid-default.properties @@ -305,10 +305,15 @@ cassandra.lock.writecl=LOCAL_QUORUM # #elasticsearch.refresh_search_max=10 -# Set the amount of time to wait when Elasticsearch rejects a requests before +# Set the amount of time to wait when indexing or utility queue rejects a request before # retrying. This provides simple backpressure. (in milliseconds) # -#elasticsearch.rejected_retry_wait +#elasticsearch.rejected_retry_wait=1000 + +# Set the amount of time to wait when indexing or utility dead letter queue rejects a request before +# retrying. This provides simple backpressure. (in milliseconds) +# +#elasticsearch.deadletter.rejected_retry_wait=2000 @@ -332,18 +337,29 @@ cassandra.lock.writecl=LOCAL_QUORUM # #usergrid.use.default.queue=false -# The number of worker threads used to read index write requests from the queue. +# The number of worker threads used to read index write requests from the indexing queue. # #elasticsearch.worker_count=8 +# The number of worker threads used to read index write requests from the utility queue. +# +#elasticsearch.worker_count_utility=2 + +# The number of worker threads used to read dead letter messages from the indexing dead letter queue. +# +#elasticsearch.worker_count_deadletter=1 + +# The number of worker threads used to read dead letter messages from the utility dead letter queue. +# +#elasticsearch.worker_count_utility_deadletter=1 + # Set the number of worker threads used for processing index write requests to # Elasticsearch from the buffer. # #index.flush.workers=10 # Set the implementation to use for queuing in Usergrid. -# Valid values: TEST, LOCAL, SQS, SNS -# NOTE: SQS and SNS equate to the same implementation of Amazon queue services. +# Valid values: LOCAL, DISTRIBUTED, DISTRIBUTED_SNS # #elasticsearch.queue_impl=LOCAL http://git-wip-us.apache.org/repos/asf/usergrid/blob/59354608/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java index af297f2..d4cf8cb 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java @@ -44,6 +44,7 @@ import org.apache.usergrid.persistence.core.scope.ApplicationScope; import org.apache.usergrid.persistence.graph.guice.GraphModule; import org.apach
[19/51] [abbrv] usergrid git commit: increase test cassandra.timeout settings
increase test cassandra.timeout settings Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/f22c6c4b Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/f22c6c4b Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/f22c6c4b Branch: refs/heads/asf-site Commit: f22c6c4bbe89b6fa94ce223b3381e23ccda4f71c Parents: a6fee78 Author: Mike Dunker Authored: Wed Aug 16 20:07:45 2017 -0700 Committer: Mike Dunker Committed: Wed Aug 16 20:07:45 2017 -0700 -- .../common/src/test/resources/usergrid-UNIT.properties | 2 +- stack/rest/src/test/resources/usergrid-custom-test.properties | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/f22c6c4b/stack/corepersistence/common/src/test/resources/usergrid-UNIT.properties -- diff --git a/stack/corepersistence/common/src/test/resources/usergrid-UNIT.properties b/stack/corepersistence/common/src/test/resources/usergrid-UNIT.properties index 0a43209..13b2937 100644 --- a/stack/corepersistence/common/src/test/resources/usergrid-UNIT.properties +++ b/stack/corepersistence/common/src/test/resources/usergrid-UNIT.properties @@ -24,7 +24,7 @@ cassandra.port=9160 cassandra.hosts=localhost cassandra.cluster_name=Usergrid collections.keyspace=Usergrid_Collections -cassandra.timeout=1 +cassandra.timeout=2 cassandra.embedded=true collections.keyspace.strategy.options=replication_factor:1 http://git-wip-us.apache.org/repos/asf/usergrid/blob/f22c6c4b/stack/rest/src/test/resources/usergrid-custom-test.properties -- diff --git a/stack/rest/src/test/resources/usergrid-custom-test.properties b/stack/rest/src/test/resources/usergrid-custom-test.properties index 615bedd..cbec81f 100644 --- a/stack/rest/src/test/resources/usergrid-custom-test.properties +++ b/stack/rest/src/test/resources/usergrid-custom-test.properties @@ -18,6 +18,7 @@ cassandra.startup=external cassandra.connections=30 cassandra.timeout.pool=2 +cassandra.timeout=2 hystrix.threadpool.graph_user.coreSize=1200
[07/51] [abbrv] usergrid git commit: Allow name and any property set with aliasProperty to be changed.
Allow name and any property set with aliasProperty to be changed. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/3f819dc0 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/3f819dc0 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/3f819dc0 Branch: refs/heads/asf-site Commit: 3f819dc0679f84edb57c52e69b58622417cfd59f Parents: bafd462 Author: Michael Russo Authored: Wed May 17 13:50:10 2017 -0700 Committer: Michael Russo Committed: Wed May 17 13:50:10 2017 -0700 -- .../src/main/java/org/apache/usergrid/persistence/Schema.java | 2 +- .../java/org/apache/usergrid/persistence/schema/PropertyInfo.java | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/3f819dc0/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java b/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java index 6b8f139..87a9a51 100644 --- a/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java +++ b/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java @@ -1252,7 +1252,7 @@ public class Schema implements SchemaManager { property.setName( PROPERTY_NAME ); property.setRequired( false ); property.setType( String.class ); -property.setMutable( false ); +property.setMutable( true ); property.setAliasProperty( true ); property.setIndexed( true ); property.setBasic( true ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/3f819dc0/stack/core/src/main/java/org/apache/usergrid/persistence/schema/PropertyInfo.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/schema/PropertyInfo.java b/stack/core/src/main/java/org/apache/usergrid/persistence/schema/PropertyInfo.java index c5d2d9c..14d5e30 100644 --- a/stack/core/src/main/java/org/apache/usergrid/persistence/schema/PropertyInfo.java +++ b/stack/core/src/main/java/org/apache/usergrid/persistence/schema/PropertyInfo.java @@ -142,9 +142,6 @@ public class PropertyInfo { public void setAliasProperty( boolean aliasProperty ) { this.aliasProperty = aliasProperty; -if ( aliasProperty ) { -mutable = false; -} }
[3/3] usergrid git commit: Updates website content to reference community maintained buttons
Updates website content to reference community maintained buttons Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/893a04dd Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/893a04dd Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/893a04dd Branch: refs/heads/master Commit: 893a04ddc99d80b27d527e791697ba8c4dcfe042 Parents: a769f30 Author: Todd Nine Authored: Wed Oct 18 10:09:30 2017 -0600 Committer: Todd Nine Committed: Wed Oct 18 10:20:57 2017 -0600 -- content/index.html | 4 +- content/releases/index.html| 1 + docs/README.md | 2 +- website/content/index.html | 4 +- website/content/static/github-btn.html | 2 - website/tmp/checksums | 3 - website/tmp/compiled_content | 14130 -- website/tmp/dependencies |10 - 8 files changed, 6 insertions(+), 14150 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/content/index.html -- diff --git a/content/index.html b/content/index.html index 0394438..83803f0 100644 --- a/content/index.html +++ b/content/index.html @@ -78,8 +78,8 @@ - - +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=watch&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=fork&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/content/releases/index.html -- diff --git a/content/releases/index.html b/content/releases/index.html index beb5bca..2c71570 100644 --- a/content/releases/index.html +++ b/content/releases/index.html @@ -98,6 +98,7 @@ Project releases are approved by vote of the Apache Usergrid Project Management Committee (PMC). Support for a release is provided by project volunteers on the project http://usergrid.apache.org/community/#mailing-lists";>mailing lists. Bugs found in a release may be discussed on the list and reported through the https://issues.apache.org/jira/browse/USERGRID";>issue tracker. The user mailing list and issue tracker are the only support options hosted by the Apache Usergrid project. + Note: When downloading from a mirror, please be sure to verify that checksums and signatures are correct. To do so, use the checksum and signature files from the main Apache site at https://www.apache.org/dist/usergrid/usergrid-2/v2.1.0/";>https://dist.apache.org/repos/dist/release/usergrid/usergrid-2/v2.1.0/. Find here the KEYS file, which contains all OpenPGP keys we use to sign releases here: https://www.apache.org/dist/usergrid/KEYS";>https://www.apache.org/dist/usergrid/KEYS http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/docs/README.md -- diff --git a/docs/README.md b/docs/README.md index 2f7888c..27a8baf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,8 +6,8 @@ Usergrid documentation is written in [Markdown](https://help.github.com/articles Sphinx requires Python and pip. Once you have Python, you can install sphinx and pip like so: - $ sudo easy_install sphinx $ sudo easy_install pip + $ sudo pip install sphinx==1.3.2 ## How to build the Usergrid documentation using Sphinx http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/website/content/index.html -- diff --git a/website/content/index.html b/website/content/index.html index 7dbabff..a80b1c2 100644 --- a/website/content/index.html +++ b/website/content/index.html @@ -14,8 +14,8 @@ title: the BaaS not made for Hipsters - - +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=watch&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=fork&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> http://git-wip-us.apach
[35/51] [abbrv] usergrid git commit: Add ability to walk through a collection and delete all the entities, optionally up to a certain timestamp. Modeled after reindex services.
Add ability to walk through a collection and delete all the entities, optionally up to a certain timestamp. Modeled after reindex services. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/11823f29 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/11823f29 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/11823f29 Branch: refs/heads/asf-site Commit: 11823f294dfae762754ef1c4da8a5ee573107968 Parents: 3f7afcd Author: Mike Dunker Authored: Mon Aug 28 14:46:17 2017 -0700 Committer: Mike Dunker Committed: Mon Aug 28 14:46:17 2017 -0700 -- .../usergrid/corepersistence/CoreModule.java| 1 + .../asyncevents/AsyncEventService.java | 3 +- .../asyncevents/AsyncEventServiceImpl.java | 67 +++-- .../asyncevents/EventBuilder.java | 13 +- .../asyncevents/EventBuilderImpl.java | 45 ++- .../asyncevents/model/EntityDeleteEvent.java| 27 +- .../index/CollectionDeleteAction.java | 43 +++ .../index/CollectionDeleteRequestBuilder.java | 92 ++ .../CollectionDeleteRequestBuilderImpl.java | 146 + .../index/CollectionDeleteService.java | 108 +++ .../index/CollectionDeleteServiceImpl.java | 299 +++ .../index/IndexProcessorFig.java| 9 + .../index/ReIndexServiceImpl.java | 2 +- .../persistence/CollectionDeleteTest.java | 266 + .../resources/usergrid-custom-test.properties | 2 + .../rest/applications/CollectionResource.java | 130 +++- 16 files changed, 1217 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/11823f29/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java index ec6b775..a0748e6 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java @@ -140,6 +140,7 @@ public class CoreModule extends AbstractModule { bind( ReIndexService.class ).to( ReIndexServiceImpl.class ); +bind( CollectionDeleteService.class ).to( CollectionDeleteServiceImpl.class ); bind( ExportService.class ).to( ExportServiceImpl.class ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/11823f29/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventService.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventService.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventService.java index 9e346cf..04eaf4c 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventService.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventService.java @@ -20,6 +20,7 @@ package org.apache.usergrid.corepersistence.asyncevents; +import org.apache.usergrid.corepersistence.index.CollectionDeleteAction; import org.apache.usergrid.corepersistence.index.ReIndexAction; import org.apache.usergrid.persistence.core.scope.ApplicationScope; import org.apache.usergrid.persistence.graph.Edge; @@ -33,7 +34,7 @@ import java.util.UUID; /** * Low level queue service for events in the entity. These events are fire and forget, and will always be asynchronous */ -public interface AsyncEventService extends ReIndexAction { +public interface AsyncEventService extends ReIndexAction, CollectionDeleteAction { /** http://git-wip-us.apache.org/repos/asf/usergrid/blob/11823f29/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java index 428772f..3d06cae 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java @@ -75,9 +75,6 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.apache.commons.lang.StringUtils.indexOf; -import static org.apache.commons.lang.StringUtils.isNot
[30/51] [abbrv] usergrid git commit: test changes and additional logging
test changes and additional logging Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/39ec4f2b Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/39ec4f2b Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/39ec4f2b Branch: refs/heads/asf-site Commit: 39ec4f2bb895e180f493349fb14e62ac9178e5ee Parents: 400365c Author: Mike Dunker Authored: Fri Aug 18 09:46:50 2017 -0700 Committer: Mike Dunker Committed: Fri Aug 18 09:46:50 2017 -0700 -- .../corepersistence/CpEntityManagerFactory.java | 2 +- .../asyncevents/AsyncEventServiceImpl.java | 2 ++ .../apache/usergrid/persistence/RebuildIndexTest.java | 12 ++-- .../queues/impl/QueueSerializationImpl.java | 2 +- .../apache/usergrid/services/ActivitiesServiceIT.java | 9 ++--- .../apache/usergrid/services/ServiceInvocationIT.java | 3 +++ 6 files changed, 19 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/39ec4f2b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java index cec7258..bad5b2c 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java @@ -487,7 +487,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application // evict app Id from cache applicationIdCache.evictAppId(appName); -logger.info("Initialized application {}", appName); +logger.info("Initialized application {}, uuid {}", appName, appInfo.getUuid().toString()); return appInfo; } http://git-wip-us.apache.org/repos/asf/usergrid/blob/39ec4f2b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java index 530cf7d..9501ad3 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java @@ -881,6 +881,8 @@ public class AsyncEventServiceImpl implements AsyncEventService { final int utilityCount = indexProcessorFig.getWorkerCountUtility(); final int indexDeadCount = indexProcessorFig.getWorkerCountDeadLetter(); final int utilityDeadCount = indexProcessorFig.getWorkerCountUtilityDeadLetter(); +logger.info("Starting queue workers for indexing: index={} indexDLQ={} utility={} utilityDLQ={}", indexCount, indexDeadCount, +utilityCount, utilityDeadCount); for (int i = 0; i < indexCount; i++) { startWorker(QUEUE_NAME); http://git-wip-us.apache.org/repos/asf/usergrid/blob/39ec4f2b/stack/core/src/test/java/org/apache/usergrid/persistence/RebuildIndexTest.java -- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/RebuildIndexTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/RebuildIndexTest.java index a7759de..d2bff37 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/RebuildIndexTest.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/RebuildIndexTest.java @@ -77,7 +77,7 @@ public class RebuildIndexTest extends AbstractCoreIT { @Test( timeout = 12 ) public void rebuildOneCollectionIndex() throws Exception { -logger.info( "Started rebuildIndex()" ); +logger.info( "Started rebuildOneCollectionIndex()" ); String rand = RandomStringUtils.randomAlphanumeric( 5 ); final UUID appId = setup.createApplication( "org_" + rand, "app_" + rand ); @@ -172,7 +172,7 @@ public class RebuildIndexTest extends AbstractCoreIT { } -@Test( timeout = 12 ) +@Test( timeout = 24 ) public void rebuildIndex() throws Exception { logger.info( "Started rebuildIndex()" ); @@ -234,7 +234,7 @@ public class RebuildIndexTest extends AbstractCoreIT { } logger.info( "Created {} entities", ENTITIES_TO_INDEX ); -app.waitForQueueDrainAndRefreshIndex(15000); +app.waitForQueueDrainAndRefreshIndex(
[11/51] [abbrv] usergrid git commit: Finish convert token service persistence to Datastax. Add tests, and rename the package for TokenServiceImpl to impl from cassandra.
Finish convert token service persistence to Datastax. Add tests, and rename the package for TokenServiceImpl to impl from cassandra. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/146e47d6 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/146e47d6 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/146e47d6 Branch: refs/heads/asf-site Commit: 146e47d668788d72c4fc54a61b7155f508b6 Parents: 179f12d Author: Michael Russo Authored: Sat Jun 17 23:47:47 2017 -0700 Committer: Michael Russo Committed: Sat Jun 17 23:47:47 2017 -0700 -- .../src/test/resources/usergrid-test.properties | 2 - stack/core/pom.xml | 6 + .../usergrid/corepersistence/CoreModule.java| 2 + .../usergrid/corepersistence/CpSetup.java | 11 - .../persistence/cassandra/CassandraService.java | 3 - .../map/impl/MapSerializationImpl.java | 35 +- .../persistence/token/TokenSerialization.java | 50 ++ .../persistence/token/guice/TokenModule.java| 10 +- .../token/impl/TokenSerialization.java | 50 -- .../token/impl/TokenSerializationImpl.java | 482 +-- .../persistence/token/TestTokenModule.java | 38 + .../token/TokenSerializationTest.java | 202 + .../persistence/token/TokenTestModule.java | 40 - .../resources/usergrid-standalone.properties| 2 - .../rest/management/ManagementResource.java | 4 +- .../rest/management/users/UserResource.java | 2 +- .../rest/management/users/UsersResource.java| 3 +- .../rest/management/ManagementResourceIT.java | 8 +- .../security/sso/SSOProviderFactory.java| 2 +- .../tokens/cassandra/TokenServiceImpl.java | 848 --- .../security/tokens/impl/TokenServiceImpl.java | 731 .../resources/usergrid-services-context.xml | 3 +- .../security/tokens/TokenServiceIT.java | 2 +- .../test/resources/testApplicationContext.xml | 2 +- 24 files changed, 1253 insertions(+), 1285 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/146e47d6/stack/config/src/test/resources/usergrid-test.properties -- diff --git a/stack/config/src/test/resources/usergrid-test.properties b/stack/config/src/test/resources/usergrid-test.properties index 143d60a..5def24e 100644 --- a/stack/config/src/test/resources/usergrid-test.properties +++ b/stack/config/src/test/resources/usergrid-test.properties @@ -104,8 +104,6 @@ collection.uniquevalues.authoritative.region=us-east usergrid.counter.batch.interval=10 #usergrid.auth.token_secret_salt=super secret token value -#usergrid.auth.token_expires_from_last_use=false -#usergrid.auth.token_refresh_reuses_id=false # max time to persist tokens for (milliseconds) #usergrid.auth.token.persist.expires=0 http://git-wip-us.apache.org/repos/asf/usergrid/blob/146e47d6/stack/core/pom.xml -- diff --git a/stack/core/pom.xml b/stack/core/pom.xml index 09047bb..658320e 100644 --- a/stack/core/pom.xml +++ b/stack/core/pom.xml @@ -428,6 +428,12 @@ org.apache.usergrid +token +${project.version} + + + +org.apache.usergrid actorsystem ${project.version} http://git-wip-us.apache.org/repos/asf/usergrid/blob/146e47d6/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java index af297f2..ec6b775 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java @@ -44,6 +44,7 @@ import org.apache.usergrid.persistence.core.scope.ApplicationScope; import org.apache.usergrid.persistence.graph.guice.GraphModule; import org.apache.usergrid.persistence.graph.serialization.impl.migration.GraphNode; import org.apache.usergrid.persistence.index.guice.IndexModule; +import org.apache.usergrid.persistence.token.guice.TokenModule; import org.safehaus.guicyfig.GuicyFigModule; import java.util.Properties; @@ -67,6 +68,7 @@ public class CoreModule extends AbstractModule { install( new CommonModule()); install( new LockModule()); install( new CacheModule()); +install( new TokenModule()); install( new CollectionModule() { /** * configure our migration data provider for all entities in
[25/51] [abbrv] usergrid git commit: add password complexity check before submitting during reset password flow
add password complexity check before submitting during reset password flow Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/70de6fde Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/70de6fde Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/70de6fde Branch: refs/heads/asf-site Commit: 70de6fde4438bd4ba750806e5b4a23cd9aa07d9b Parents: 459163b Author: Mike Dunker Authored: Thu Aug 17 11:02:36 2017 -0700 Committer: Mike Dunker Committed: Thu Aug 17 11:02:36 2017 -0700 -- .../usergrid/rest/applications/users/UserResource.java| 9 + .../usergrid/rest/management/users/UserResource.java | 9 + .../org/apache/usergrid/management/ManagementService.java | 10 +- .../management/cassandra/ManagementServiceImpl.java | 10 ++ 4 files changed, 33 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/70de6fde/stack/rest/src/main/java/org/apache/usergrid/rest/applications/users/UserResource.java -- diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/users/UserResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/users/UserResource.java index 5435f7e..3e4542d 100644 --- a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/users/UserResource.java +++ b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/users/UserResource.java @@ -17,6 +17,7 @@ package org.apache.usergrid.rest.applications.users; +import java.util.Collection; import java.util.Map; import java.util.UUID; @@ -465,6 +466,14 @@ public class UserResource extends ServiceResource { if ( ( password1 != null ) || ( password2 != null ) ) { if ( management.checkPasswordResetTokenForAppUser( getApplicationId(), getUserUuid(), token ) ) { if ( ( password1 != null ) && password1.equals( password2 ) ) { +// validate password +Collection violations = management.passwordPolicyCheck(password1, false); +if (violations.size() > 0) { +// password not valid +errorMsg = management.getPasswordDescription(false); +return handleViewable("resetpw_set_form", this, getOrganizationName()); +} + management.setAppUserPassword( getApplicationId(), getUser().getUuid(), password1 ); management.revokeAccessTokenForAppUser( token ); return handleViewable( "resetpw_set_success", this, getOrganizationName() ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/70de6fde/stack/rest/src/main/java/org/apache/usergrid/rest/management/users/UserResource.java -- diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/management/users/UserResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/management/users/UserResource.java index b747aa4..1f80bc1 100644 --- a/stack/rest/src/main/java/org/apache/usergrid/rest/management/users/UserResource.java +++ b/stack/rest/src/main/java/org/apache/usergrid/rest/management/users/UserResource.java @@ -43,6 +43,7 @@ import javax.ws.rs.*; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import java.util.Collection; import java.util.Map; import java.util.UUID; @@ -297,6 +298,14 @@ public class UserResource extends AbstractContextResource { if ( ( password1 != null ) || ( password2 != null ) ) { if ( management.checkPasswordResetTokenForAdminUser( user.getUuid(), tokenInfo ) ) { if ( ( password1 != null ) && password1.equals( password2 ) ) { +// validate password +Collection violations = management.passwordPolicyCheck(password1, true); +if (violations.size() > 0) { +// password not valid +errorMsg = management.getPasswordDescription(true); +return handleViewable( "resetpw_set_form", this, organizationId ); +} + management.setAdminUserPassword( user.getUuid(), password1 ); management.revokeAccessTokenForAdminUser( user.getUuid(), token ); loginEndpoint = properties.getProperty("usergrid.viewable.loginEndpoint"); http://git-wip-us.apache.org/repos/asf/usergrid/blob/70de6fde/stack/services/src/main/java/org/apache/usergrid/management/Manageme
[40/51] [abbrv] usergrid git commit: Bypass check of app APM setting if APM not enabled
Bypass check of app APM setting if APM not enabled Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/9e16e2f0 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/9e16e2f0 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/9e16e2f0 Branch: refs/heads/asf-site Commit: 9e16e2f006676d9e16997d378224e06a8683c744 Parents: 4170295 Author: Mike Dunker Authored: Thu Sep 14 15:07:30 2017 -0700 Committer: Mike Dunker Committed: Thu Sep 14 15:07:30 2017 -0700 -- .../apache/usergrid/rest/applications/ApplicationResource.java | 4 .../java/org/apache/usergrid/management/ManagementService.java | 2 ++ .../usergrid/management/cassandra/ManagementServiceImpl.java| 5 + 3 files changed, 11 insertions(+) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/9e16e2f0/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ApplicationResource.java -- diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ApplicationResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ApplicationResource.java index 7479a90..a6eefb1 100644 --- a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ApplicationResource.java +++ b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/ApplicationResource.java @@ -621,6 +621,10 @@ public class ApplicationResource extends CollectionResource { public Object getAPMConfig( @Context UriInfo ui, @QueryParam("callback") @DefaultValue("callback") String callback ) throws Exception { +if (!management.isAPMEnabled()) { +// no need to check app for setting +throw new EntityNotFoundException("apigeeMobileConfig not enabled."); +} EntityManager em = emf.getEntityManager( applicationId ); Object value = em.getProperty( new SimpleEntityRef( Application.ENTITY_TYPE, applicationId ), APIGEE_MOBILE_APM_CONFIG_JSON_KEY ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/9e16e2f0/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java -- diff --git a/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java b/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java index 8b840d6..3d0c9fb 100644 --- a/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java +++ b/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java @@ -343,6 +343,8 @@ public interface ManagementService { Object registerAppWithAPM( OrganizationInfo orgInfo, ApplicationInfo appInfo ) throws Exception; + boolean isAPMEnabled() throws Exception; + /** For testing purposes only */ Properties getProperties(); http://git-wip-us.apache.org/repos/asf/usergrid/blob/9e16e2f0/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java -- diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java index 89375fd..2302d8d 100644 --- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java +++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java @@ -3404,6 +3404,11 @@ public class ManagementServiceImpl implements ManagementService { } @Override +public boolean isAPMEnabled() throws Exception { +return false; +} + +@Override public Observable deleteAllEntities(final UUID applicationId,final int limit){ if(applicationId.equals(CpNamingUtils.MANAGEMENT_APPLICATION_ID)){ throw new IllegalArgumentException("Can't delete from management app");
[03/51] [abbrv] usergrid git commit: Switch DISTRIBUTED database queueing to default not cache in memory as the in memory impl causes duplicate messgae processing quite often at the moment.
Switch DISTRIBUTED database queueing to default not cache in memory as the in memory impl causes duplicate messgae processing quite often at the moment. - includes making all the tests work without in-memory queue fronting the database queue which really means adding some more delay in tests - the tests now are actually faster now because the original refreshIndex() created and queried random entities which took longer in most cases - uncommented the checkReceipts function in Notification tests as these are now passing, with an added fix for duplicate receipt creation - some logging updates in the distributed database queueing impl (Qakka) - increased the default take to 500 from the queue when DISTRIBUTED database queueing is configured ( which is the default now ) - Notifications Queue Listener thread names have a random identifier in included - reduced the DISTRIBUTED database queueing default long poll to 1 second from 5 seconds Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/d3e988bc Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/d3e988bc Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/d3e988bc Branch: refs/heads/asf-site Commit: d3e988bcbb7eb417c84cfda7396ec3506521aa37 Parents: 8b63aae Author: Michael Russo Authored: Sun Apr 2 16:14:05 2017 -0700 Committer: Michael Russo Committed: Sun Apr 2 16:14:05 2017 -0700 -- .../corepersistence/CpEntityManager.java| 44 +- .../asyncevents/AsyncIndexProvider.java | 5 ++ .../java/org/apache/usergrid/Application.java | 4 +- .../org/apache/usergrid/CoreApplication.java| 22 ++--- .../org/apache/usergrid/CoreITSetupImpl.java| 20 - .../org/apache/usergrid/TestEntityIndex.java| 1 + .../corepersistence/AggregationServiceTest.java | 15 ++-- .../corepersistence/StaleIndexCleanupTest.java | 17 ++-- .../persistence/ApplicationServiceIT.java | 6 +- .../usergrid/persistence/CollectionIT.java | 74 .../usergrid/persistence/CountingMutatorIT.java | 4 +- .../persistence/EntityConnectionsIT.java| 16 ++-- .../usergrid/persistence/EntityManagerIT.java | 20 ++--- .../org/apache/usergrid/persistence/GeoIT.java | 32 +++ .../persistence/GeoQueryBooleanTest.java| 4 +- .../apache/usergrid/persistence/IndexIT.java| 18 ++-- .../usergrid/persistence/PathQueryIT.java | 7 +- .../usergrid/persistence/PermissionsIT.java | 6 +- .../usergrid/persistence/RebuildIndexTest.java | 26 +++--- .../cassandra/EntityManagerFactoryImplIT.java | 13 +-- .../persistence/query/ConnectionHelper.java | 2 +- .../query/IntersectionTransitivePagingIT.java | 2 +- .../query/IntersectionUnionPagingIT.java| 2 +- .../persistence/query/IteratingQueryIT.java | 32 +++ .../persistence/query/NotSubPropertyIT.java | 2 +- .../persistence/query/ParenthesisProblemIT.java | 2 +- .../resources/usergrid-custom-test.properties | 3 + .../usergrid/persistence/qakka/QakkaFig.java| 4 +- .../qakka/core/impl/InMemoryQueue.java | 4 +- .../core/impl/QueueMessageManagerImpl.java | 9 +- .../distributed/actors/QueueActorHelper.java| 15 +++- .../distributed/actors/QueueActorRouter.java| 2 +- .../distributed/actors/ShardAllocator.java | 4 +- .../impl/DistributedQueueServiceImpl.java | 26 -- .../distributed/actors/ShardAllocatorTest.java | 3 + .../queue/src/test/resources/qakka.properties | 5 +- .../usergrid/rest/CollectionMetadataIT.java | 4 +- .../apache/usergrid/rest/NotificationsIT.java | 14 ++- .../apache/usergrid/rest/PartialUpdateTest.java | 6 +- .../apache/usergrid/rest/SystemResourceIT.java | 3 +- .../rest/applications/ApplicationCreateIT.java | 2 +- .../rest/applications/ApplicationDeleteIT.java | 6 +- .../applications/ApplicationResourceIT.java | 12 +-- .../applications/assets/AssetResourceIT.java| 26 +++--- .../applications/assets/AwsAssetResourceIT.java | 22 ++--- .../collection/BrowserCompatibilityTest.java| 2 +- .../collection/CollectionsResourceIT.java | 70 +++ .../collection/DuplicateNameIT.java | 2 +- .../activities/ActivityResourceIT.java | 8 +- .../collection/activities/PutTest.java | 6 +- .../collection/devices/DevicesResourceIT.java | 12 +-- .../collection/groups/GroupResourceIT.java | 39 + .../collection/paging/PagingResourceIT.java | 10 +-- .../users/ConnectionResourceTest.java | 22 ++--- .../collection/users/OwnershipResourceIT.java | 24 +++--- .../collection/users/PermissionsResourceIT.java | 58 ++--- .../collection/users/RetrieveUsersTest.java | 8 +- .../collection/users/UserResourceIT.java| 89 ++-- .../applications/events/EventsResourc
[18/51] [abbrv] usergrid git commit: Fix precondition
Fix precondition Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/a6fee789 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/a6fee789 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/a6fee789 Branch: refs/heads/asf-site Commit: a6fee789df698b349d6809af1b3faafc8f8b5472 Parents: 375814e Author: Mike Dunker Authored: Mon Jun 19 15:11:13 2017 -0700 Committer: Mike Dunker Committed: Mon Jun 19 15:11:13 2017 -0700 -- .../usergrid/persistence/token/impl/TokenSerializationImpl.java| 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/a6fee789/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java -- diff --git a/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java b/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java index 7825da0..b99d372 100644 --- a/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java +++ b/stack/corepersistence/token/src/main/java/org/apache/usergrid/persistence/token/impl/TokenSerializationImpl.java @@ -193,7 +193,7 @@ public class TokenSerializationImpl implements TokenSerialization { Preconditions.checkNotNull(tokenUUID, "token UUID is required"); Preconditions.checkArgument(accessedTime > -1 , "accessedTime is required to be positive"); -Preconditions.checkArgument(inactiveTime > -1 , "inactiveTime is required to be positive"); +Preconditions.checkArgument(inactiveTime == Long.MIN_VALUE || inactiveTime > -1 , "inactiveTime is required to be positive"); Preconditions.checkArgument(ttl > -1 , "ttl is required to be positive"); logger.trace("updateTokenAccessTime, token UUID: {}, accessedTime: {}, inactiveTime: {}, ttl: {}",
[34/51] [abbrv] usergrid git commit: 1. Add missing start for delete queue workers. 2. Add dropping of application local keyspace for testing. 3. Testing changes.
1. Add missing start for delete queue workers. 2. Add dropping of application local keyspace for testing. 3. Testing changes. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/3f7afcd8 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/3f7afcd8 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/3f7afcd8 Branch: refs/heads/asf-site Commit: 3f7afcd8836ed9b589b69523d8bcc507a739d912 Parents: c201f1f Author: Mike Dunker Authored: Mon Aug 21 17:01:48 2017 -0700 Committer: Mike Dunker Committed: Mon Aug 21 17:01:48 2017 -0700 -- .../corepersistence/CpEntityManager.java| 3 +-- .../asyncevents/AsyncEventServiceImpl.java | 4 +++ .../index/CollectionSettingsImpl.java | 1 - .../usergrid/persistence/EntityManager.java | 2 +- .../persistence/entities/Application.java | 26 .../usergrid/persistence/CoreSchemaManager.java | 16 .../usergrid/persistence/RebuildIndexTest.java | 24 +- .../resources/usergrid-custom-test.properties | 2 +- .../resources/usergrid-custom-test.properties | 2 +- .../AbstractServiceNotificationIT.java | 4 +-- .../gcm/NotificationsServiceIT.java | 2 +- .../resources/usergrid-custom-test.properties | 2 +- 12 files changed, 67 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/3f7afcd8/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java index cdb4fc7..68c4ef0 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java @@ -2471,10 +2471,9 @@ public class CpEntityManager implements EntityManager { final Entity entity; -//this is the fall back, why isn't this writt if ( entityType == null ) { return null; -//throw new EntityNotFoundException( String.format( "Counld not find type for uuid {}", uuid ) ); +//throw new EntityNotFoundException( String.format( "Could not find type for uuid {}", uuid ) ); } entity = get( new SimpleEntityRef( entityType, uuid ) ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/3f7afcd8/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java index 79a80c0..428772f 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java @@ -875,6 +875,10 @@ public class AsyncEventServiceImpl implements AsyncEventService { startWorker(AsyncEventQueueType.UTILITY); } +for (int i = 0; i < deleteCount; i++) { +startWorker(AsyncEventQueueType.DELETE); +} + if( indexQueue instanceof SNSQueueManagerImpl) { logger.info("Queue manager implementation supports dead letters, start dead letter queue workers."); for (int i = 0; i < indexDeadCount; i++) { http://git-wip-us.apache.org/repos/asf/usergrid/blob/3f7afcd8/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/CollectionSettingsImpl.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/CollectionSettingsImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/CollectionSettingsImpl.java index 921777a..76f0b4b 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/CollectionSettingsImpl.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/index/CollectionSettingsImpl.java @@ -20,7 +20,6 @@ package org.apache.usergrid.corepersistence.index; import com.google.common.base.Optional; import com.google.inject.Inject; -import com.google.inject.Singleton; import org.apache.usergrid.persistence.map.MapManager; import org.apache.usergrid.utils.JsonUtils; import org.slf4j.Logger; http://git-wip-us.apache.org/repos/asf/usergrid/blob/3f7afcd8/stack/core/src/main/java/org/apache/usergrid/persistence/EntityManager
[47/51] [abbrv] usergrid git commit: Merge branch 'fixOrphanedEdges'
Merge branch 'fixOrphanedEdges' Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/b93f8d44 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/b93f8d44 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/b93f8d44 Branch: refs/heads/asf-site Commit: b93f8d4418e354711406ac8a888a91a467babdd8 Parents: 4a65910 1a02bb3 Author: Mike Dunker Authored: Fri Oct 13 13:37:02 2017 -0700 Committer: Mike Dunker Committed: Fri Oct 13 13:37:02 2017 -0700 -- .../usergrid/corepersistence/CoreModule.java| 3 + .../read/traverse/EntityLoadVerifyFilter.java | 70 +--- .../pipeline/read/traverse/ReadRepairFig.java | 38 +++ .../impl/SearchRequestBuilderStrategy.java | 3 +- 4 files changed, 104 insertions(+), 10 deletions(-) --
[46/51] [abbrv] usergrid git commit: changes to orphaned edge code from code review
changes to orphaned edge code from code review Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/1a02bb36 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/1a02bb36 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/1a02bb36 Branch: refs/heads/asf-site Commit: 1a02bb368c76d1c6075372d4c58eab2dbc6c0764 Parents: f4842b0 Author: Mike Dunker Authored: Fri Oct 13 11:13:14 2017 -0700 Committer: Mike Dunker Committed: Fri Oct 13 11:13:14 2017 -0700 -- .../read/traverse/EntityLoadVerifyFilter.java | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/1a02bb36/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java index 7cc9735..cc82bd8 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java @@ -178,21 +178,19 @@ public class EntityLoadVerifyFilter extends AbstractFilter, Fil if (timestampDiff > allowedDiff) { // edges must be orphans, delete edges for (MarkedEdge edge: edgeList) { -MarkedEdge markedEdge = graphManager.markEdge(edge).toBlocking().lastOrDefault(null); -if (markedEdge != null) { - graphManager.deleteEdge(markedEdge).toBlocking().lastOrDefault(null); -edgesDeleted += 1; -} + graphManager.markEdge(edge).toBlocking().lastOrDefault(null); +edgesDeleted++; } + graphManager.deleteEdge(firstEdge).toBlocking().lastOrDefault(null); } } if (edgesDeleted > 0) { -logger.warn("Read graph edge and received candidate with entityId {}, yet was not found in cassandra." -+ " Deleted {} edges.", candidateId, edgesDeleted); +logger.warn("Read graph edge and received candidate with entityId {} (application {}), yet was not found in cassandra." ++ " Deleted at least {} edges.", candidateId, applicationScope.getApplication().getUuid().toString(), edgesDeleted); } else { -logger.warn("Read graph edge and received candidate with entityId {}, yet was not found in cassandra." -+ " Ignoring since this could be a region sync issue", candidateId); +logger.warn("Read graph edge and received candidate with entityId {} (application {}), yet was not found in cassandra." ++ " Ignoring since this could be a region sync issue", candidateId, applicationScope.getApplication().getUuid().toString()); }
[15/51] [abbrv] usergrid git commit: 1. Remove messages from dead letter queue if the message map entry was never received after a configurable timeout (15 minutes currently). 2. Log messages as they
1. Remove messages from dead letter queue if the message map entry was never received after a configurable timeout (15 minutes currently). 2. Log messages as they are moved from the dead letter queue back to the originating queue. Also log messages that are in dead letter queue and can't be moved to originating queue for some reason. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c748242f Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c748242f Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c748242f Branch: refs/heads/asf-site Commit: c748242fa6a9bc79ebb60b4071cc532ab798fb3c Parents: 5935460 Author: Mike Dunker Authored: Mon Jun 19 12:18:34 2017 -0700 Committer: Mike Dunker Committed: Mon Jun 19 12:18:34 2017 -0700 -- .../asyncevents/AsyncEventServiceImpl.java | 37 +--- .../persistence/queue/LegacyQueueFig.java | 3 ++ 2 files changed, 35 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/c748242f/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java index 7c33969..530cf7d 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventServiceImpl.java @@ -724,10 +724,13 @@ public class AsyncEventServiceImpl implements AsyncEventService { indexOperationMessage = ObjectJsonSerializer.INSTANCE.fromString(highConsistency, IndexOperationMessage.class); + } else if (System.currentTimeMillis() > elasticsearchIndexEvent.getCreationTime() + queueFig.getMapMessageTimeout()) { +// if esMapPersistence message hasn't been received yet, log and return (will be acked) +logger.error("ES map message never received, removing message from queue. indexBatchId={}", messageId); +return; } else { - - throw new IndexDocNotFoundException(elasticsearchIndexEvent.getIndexBatchId()); - +logger.warn("ES map message not received yet. indexBatchId={} elapsedTimeMsec={}", messageId, System.currentTimeMillis() - elasticsearchIndexEvent.getCreationTime()); +throw new IndexDocNotFoundException(elasticsearchIndexEvent.getIndexBatchId()); } } else { @@ -1105,14 +1108,38 @@ public class AsyncEventServiceImpl implements AsyncEventService { try { // put the dead letter messages back in the appropriate queue LegacyQueueManager returnQueue = null; + String queueType; if (isUtilityDeadQueue) { - logger.warn("Utility dead queue message count: {}", messages.size()); returnQueue = utilityQueue; + queueType = "utility"; } else { - logger.warn("Index dead queue message count: {}", messages.size()); returnQueue = indexQueue; + queueType = "index"; } List successMessages = returnQueue.sendQueueMessages(messages); + for (LegacyQueueMessage msg : successMessages) { + logger.warn("Returning message to {} queue: type:{}, messageId:{} body: {}", queueType, msg.getType(), msg.getMessageId(), msg.getStringBody()); + } + int unsuccessfulMessagesSize = messages.size() - successMessages.size(); + if (unsuccessfulMessagesSize > 0) { + // some messages couldn't be sent to originating queue, log +
[50/51] [abbrv] usergrid git commit: Updates website content to reference community maintained buttons
http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/website/tmp/compiled_content -- diff --git a/website/tmp/compiled_content b/website/tmp/compiled_content deleted file mode 100644 index 91c5445..000 --- a/website/tmp/compiled_content +++ /dev/null @@ -1,14130 +0,0 @@ -{: data{�I"/bootstrap/bootstrap/:ET{:default{: lastI"��/*! - * Bootstrap v3.0.0 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - *//*! normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decorati on:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}input,button,select ,textarea{font-family:inherit;font-size:inherit;line-height:inherit}button,input,select[multiple],textarea{background-image:none}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16.098px;font-weight:200;line-height:1.4}@media(min-w idth:768px){.lead{font-size:21px}}small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-warning{color:#c09853}.text-danger{color:#b94a48}.text-success{color:#468847}.text-info{color:#3a87ad}.text-left{text-align:left}.text-right{text-align:right}.text-center{t
[38/51] [abbrv] usergrid git commit: Change collection clear from PUT to POST.
Change collection clear from PUT to POST. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c8605211 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c8605211 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c8605211 Branch: refs/heads/asf-site Commit: c8605211020c53639b5db24075577c272b9d6895 Parents: 3d3ba49 Author: Mike Dunker Authored: Thu Aug 31 17:45:38 2017 -0700 Committer: Mike Dunker Committed: Thu Aug 31 17:45:38 2017 -0700 -- .../org/apache/usergrid/rest/applications/CollectionResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/c8605211/stack/rest/src/main/java/org/apache/usergrid/rest/applications/CollectionResource.java -- diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/CollectionResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/CollectionResource.java index c9174c1..9c09806 100644 --- a/stack/rest/src/main/java/org/apache/usergrid/rest/applications/CollectionResource.java +++ b/stack/rest/src/main/java/org/apache/usergrid/rest/applications/CollectionResource.java @@ -196,7 +196,7 @@ public class CollectionResource extends ServiceResource { } -@PUT +@POST @Path("{itemName}/_clear") @Produces({MediaType.APPLICATION_JSON, "application/javascript"}) @RequireApplicationAccess
[28/51] [abbrv] usergrid git commit: add a little more wait time
add a little more wait time Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/25f1b0e5 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/25f1b0e5 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/25f1b0e5 Branch: refs/heads/asf-site Commit: 25f1b0e5a86f51d0da465d78cb0c5fbd1a006a7d Parents: d06dbc9 Author: Mike Dunker Authored: Wed Aug 16 22:30:34 2017 -0700 Committer: Mike Dunker Committed: Thu Aug 17 11:59:53 2017 -0700 -- .../apache/usergrid/rest/applications/queries/QueryTestBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/25f1b0e5/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/QueryTestBase.java -- diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/QueryTestBase.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/QueryTestBase.java index 0adafef..1eec9ae 100644 --- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/QueryTestBase.java +++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/QueryTestBase.java @@ -65,7 +65,7 @@ public class QueryTestBase extends AbstractRestIT { logger.info(entities[i].entrySet().toString()); } //refresh the index so that they are immediately searchable -this.waitForQueueDrainAndRefreshIndex(); +this.waitForQueueDrainAndRefreshIndex(1000); return entities; }
[23/51] [abbrv] usergrid git commit: fix html encode in jsp
fix html encode in jsp Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/be2f69c3 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/be2f69c3 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/be2f69c3 Branch: refs/heads/asf-site Commit: be2f69c37cab7214382d99e36e27347fc9f3b09b Parents: 068263e Author: Mike Dunker Authored: Fri Jul 28 14:11:31 2017 -0700 Committer: Mike Dunker Committed: Thu Aug 17 09:47:00 2017 -0700 -- .../org/apache/usergrid/rest/TestResource/error.jsp | 4 ++-- .../org/apache/usergrid/rest/TestResource/test.jsp | 5 +++-- .../ApplicationResource/authorize_form.jsp | 15 --- .../rest/applications/ApplicationResource/error.jsp | 4 ++-- .../applications/users/UserResource/activate.jsp | 4 ++-- .../rest/applications/users/UserResource/confirm.jsp | 4 ++-- .../rest/applications/users/UserResource/error.jsp | 4 ++-- .../users/UserResource/resetpw_email_form.jsp| 11 ++- .../users/UserResource/resetpw_email_success.jsp | 4 ++-- .../users/UserResource/resetpw_set_form.jsp | 9 + .../users/UserResource/resetpw_set_success.jsp | 4 ++-- .../rest/applications/users/UsersResource/error.jsp | 4 ++-- .../users/UsersResource/resetpw_email_form.jsp | 9 + .../users/UsersResource/resetpw_email_success.jsp| 4 ++-- .../management/ManagementResource/authorize_form.jsp | 15 --- .../rest/management/ManagementResource/error.jsp | 4 ++-- .../organizations/OrganizationResource/activate.jsp | 4 ++-- .../organizations/OrganizationResource/confirm.jsp | 4 ++-- .../organizations/OrganizationResource/error.jsp | 4 ++-- .../rest/management/users/UserResource/activate.jsp | 4 ++-- .../rest/management/users/UserResource/confirm.jsp | 4 ++-- .../rest/management/users/UserResource/error.jsp | 4 ++-- .../users/UserResource/resetpw_email_form.jsp| 9 + .../users/UserResource/resetpw_email_success.jsp | 4 ++-- .../users/UserResource/resetpw_set_form.jsp | 8 .../users/UserResource/resetpw_set_success.jsp | 4 ++-- .../rest/management/users/UsersResource/error.jsp| 4 ++-- .../users/UsersResource/resetpw_email_form.jsp | 6 +++--- .../users/UsersResource/resetpw_email_success.jsp| 4 ++-- 29 files changed, 87 insertions(+), 80 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/be2f69c3/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/TestResource/error.jsp -- diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/TestResource/error.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/TestResource/error.jsp index be184b1..d02ad40 100644 --- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/TestResource/error.jsp +++ b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/TestResource/error.jsp @@ -27,7 +27,7 @@ limitations under the License. - An error occurred . + An error occurred . - \ No newline at end of file + http://git-wip-us.apache.org/repos/asf/usergrid/blob/be2f69c3/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/TestResource/test.jsp -- diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/TestResource/test.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/TestResource/test.jsp index 83a6ad1..68c12f2 100644 --- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/TestResource/test.jsp +++ b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/TestResource/test.jsp @@ -1,5 +1,6 @@ <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn"%>
[41/51] [abbrv] usergrid git commit: add missing fn reference in jsps
add missing fn reference in jsps Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/7f40d685 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/7f40d685 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/7f40d685 Branch: refs/heads/asf-site Commit: 7f40d685401397b44e2026ac6bd3af446c02ddbd Parents: 9e16e2f Author: Mike Dunker Authored: Thu Sep 21 14:29:05 2017 -0700 Committer: Mike Dunker Committed: Thu Sep 21 14:29:05 2017 -0700 -- .../rest/management/users/UserResource/resetpw_set_form.jsp | 1 + .../rest/management/users/UsersResource/resetpw_email_form.jsp | 1 + 2 files changed, 2 insertions(+) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/7f40d685/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/management/users/UserResource/resetpw_set_form.jsp -- diff --git a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/management/users/UserResource/resetpw_set_form.jsp b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/management/users/UserResource/resetpw_set_form.jsp index 6334466..c0203ce 100644 --- a/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/management/users/UserResource/resetpw_set_form.jsp +++ b/stack/rest/src/main/webapp/WEB-INF/jsp/org/apache/usergrid/rest/management/users/UserResource/resetpw_set_form.jsp @@ -4,6 +4,7 @@ <%@ page import="net.tanesha.recaptcha.ReCaptchaFactory"%> <%@ page import="org.apache.usergrid.rest.AbstractContextResource"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn"%>
[10/51] [abbrv] usergrid git commit: Finish convert token service persistence to Datastax. Add tests, and rename the package for TokenServiceImpl to impl from cassandra.
http://git-wip-us.apache.org/repos/asf/usergrid/blob/146e47d6/stack/services/src/main/java/org/apache/usergrid/security/tokens/cassandra/TokenServiceImpl.java -- diff --git a/stack/services/src/main/java/org/apache/usergrid/security/tokens/cassandra/TokenServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/security/tokens/cassandra/TokenServiceImpl.java deleted file mode 100644 index 6ea6de0..000 --- a/stack/services/src/main/java/org/apache/usergrid/security/tokens/cassandra/TokenServiceImpl.java +++ /dev/null @@ -1,848 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.usergrid.security.tokens.cassandra; - - -import com.google.inject.Injector; -import me.prettyprint.hector.api.Keyspace; -import me.prettyprint.hector.api.beans.HColumn; -import me.prettyprint.hector.api.mutation.Mutator; -import org.apache.usergrid.corepersistence.CpEntityManagerFactory; -import org.apache.usergrid.corepersistence.util.CpNamingUtils; -import org.apache.usergrid.management.ApplicationCreator; -import org.apache.usergrid.management.ManagementService; -import org.apache.usergrid.management.UserInfo; -import org.apache.usergrid.persistence.EntityManagerFactory; -import org.apache.usergrid.persistence.cassandra.CassandraService; -import org.apache.usergrid.persistence.core.metrics.MetricsFactory; -import org.apache.usergrid.persistence.entities.Application; -import org.apache.usergrid.security.AuthPrincipalInfo; -import org.apache.usergrid.security.AuthPrincipalType; -import org.apache.usergrid.security.sso.SSOProviderFactory; -import org.apache.usergrid.security.tokens.TokenCategory; -import org.apache.usergrid.security.tokens.TokenInfo; -import org.apache.usergrid.security.tokens.TokenService; -import org.apache.usergrid.security.tokens.exceptions.BadTokenException; -import org.apache.usergrid.security.tokens.exceptions.ExpiredTokenException; -import org.apache.usergrid.security.tokens.exceptions.InvalidTokenException; -import org.apache.usergrid.security.sso.ExternalSSOProvider; -import org.apache.usergrid.utils.ConversionUtils; -import org.apache.usergrid.utils.JsonUtils; -import org.apache.usergrid.utils.UUIDUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.util.Assert; - -import javax.ws.rs.client.Client; -import java.nio.ByteBuffer; -import java.util.*; - -import static java.lang.System.currentTimeMillis; -import static me.prettyprint.hector.api.factory.HFactory.createColumn; -import static me.prettyprint.hector.api.factory.HFactory.createMutator; -import static org.apache.commons.codec.binary.Base64.decodeBase64; -import static org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString; -import static org.apache.commons.codec.digest.DigestUtils.sha; -import static org.apache.usergrid.persistence.cassandra.CassandraPersistenceUtils.getColumnMap; -import static org.apache.usergrid.persistence.cassandra.CassandraService.PRINCIPAL_TOKEN_CF; -import static org.apache.usergrid.persistence.cassandra.CassandraService.TOKENS_CF; -import static org.apache.usergrid.persistence.cassandra.Serializers.*; -import static org.apache.usergrid.security.AuthPrincipalType.ADMIN_USER; -import static org.apache.usergrid.security.tokens.TokenCategory.*; -import static org.apache.usergrid.utils.ConversionUtils.*; -import static org.apache.usergrid.utils.MapUtils.hasKeys; -import static org.apache.usergrid.utils.MapUtils.hashMap; -import static org.apache.usergrid.utils.UUIDUtils.getTimestampInMillis; - - -public class TokenServiceImpl implements TokenService { - -private static final Logger logger = LoggerFactory.getLogger( TokenServiceImpl.class ); - -public static final String PROPERTIES_AUTH_TOKEN_SECRET_SALT = "usergrid.auth.token_secret_salt"; -public static final String PROPERTIES_AUTH_TOKEN_EXPIRES_FROM_LAST_USE = -"usergrid.auth.token_expires_from_last_use"; -public static final String PROPERTIES_AUTH_TOKEN_REFRESH_REUSES_ID = "usergrid.auth.token_refresh_reu
[39/51] [abbrv] usergrid git commit: Handle IndexMissingException when fetching the index size for an application.
Handle IndexMissingException when fetching the index size for an application. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/41702956 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/41702956 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/41702956 Branch: refs/heads/asf-site Commit: 41702956d5aedac5a8e8d44f8f3df7af5ec365b9 Parents: c860521 Author: Michael Russo Authored: Tue Sep 12 18:42:43 2017 -0700 Committer: Michael Russo Committed: Tue Sep 12 18:42:43 2017 -0700 -- .../index/impl/EsEntityIndexImpl.java | 29 ++-- 1 file changed, 20 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/41702956/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java -- diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java index f4fae2b..3d2f576 100644 --- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java +++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java @@ -70,6 +70,7 @@ import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.query.*; import org.elasticsearch.index.query.QueryBuilder; import org.elasticsearch.indices.IndexAlreadyExistsException; +import org.elasticsearch.indices.IndexMissingException; import org.elasticsearch.search.SearchHit; import org.elasticsearch.search.SearchHits; import org.elasticsearch.search.aggregations.metrics.sum.Sum; @@ -804,15 +805,25 @@ public class EsEntityIndexImpl implements EntityIndex,VersionedData { } private long getIndexSize(){ -final IndicesStatsResponse statsResponse = esProvider.getClient() -.admin() -.indices() -.prepareStats(indexLocationStrategy.getIndexInitialName()) -.all() -.execute() -.actionGet(); -final CommonStats indexStats = statsResponse.getIndex(indexLocationStrategy.getIndexInitialName()).getTotal(); -return indexStats.getStore().getSizeInBytes(); +long indexSize = 0L; +final String indexName = indexLocationStrategy.getIndexInitialName(); +try { +final IndicesStatsResponse statsResponse = esProvider.getClient() +.admin() +.indices() +.prepareStats(indexName) +.all() +.execute() +.actionGet(); +final CommonStats indexStats = statsResponse.getIndex(indexName).getTotal(); +indexSize = indexStats.getStore().getSizeInBytes(); +} catch (IndexMissingException e) { +// if for some reason the index size does not exist, +// log an error and we can assume size is 0 as it doesn't exist +logger.error("Unable to get size for index {} due to IndexMissingException for app {}", +indexName, indexLocationStrategy.getApplicationScope().getApplication().getUuid()); +} +return indexSize; } @Override
[1/3] usergrid git commit: Updates website content to reference community maintained buttons [Forced Update!]
Repository: usergrid Updated Branches: refs/heads/master e2333add6 -> 893a04ddc (forced update) http://git-wip-us.apache.org/repos/asf/usergrid/blob/893a04dd/website/tmp/dependencies -- diff --git a/website/tmp/dependencies b/website/tmp/dependencies deleted file mode 100644 index 8ddff40..000 --- a/website/tmp/dependencies +++ /dev/null @@ -1,10 +0,0 @@ -{: data{: -edges[[iQiF[iQiN[iUi[iVi[iViF[iViN[iWi[iWiF[iWiN: vertices[X0[: itemI"/bootstrap/bootstrap/:ET[;I"/community/; T[;I"/css/bootflat-extensions/; T[;I"/css/bootflat-square/; T[;I"/css/bootflat/;T[;I"/css/font-awesome/; T[;I"/css/usergrid-site/; T[;I"/favicon/; T[;I"#/font/fontawesome-webfont-eot/; T[;I"#/font/fontawesome-webfont-svg/; T[;I"#/font/fontawesome-webfont-ttf/; T[;I"$/font/fontawesome-webfont-woff/; T[;I"/font/FontAwesome/; T[;I"/img/alberto/; T[;I"/img/alex/; T[;I""/img/apache_usergrid_favicon/; T[;I"%/img/apache_usergrid_logo_white/; T[;I"+/img/apache_usergrid_logo_white_small/; T[;I"/img/check_flat/default/; T[;I"/img/dave/;T[;I" /img/ed/; T[;I"/img/egg-logo/;T[;I"/img/github/; T[;I"/img/grey/;T[;I"/img/intellij/;T[;I"/img/jeff/; T[;I"/img/michael_r/; T[;I"/img/miked/; T[;I"/img/nate/; T[;I"/img/rod/; T[;I"/img/scott/; T[;I"/img/shawn/; T[;I"/img/stliu/; T[;I"/img/strong/; T[;I"/img/structure101/;T[;I"/img/sungju/; T[;I"/img/tim/; T[;I"/img/todd/;T[;I"/img/usergrid-logo/; T[;I"/img/usergrid/;T[;I"/img/usergrid_160/; T[;I"/img/usergrid_200/;T[;I"/img/usergrid_300/; T[;I"#/img/usergrid_300_transparent/;T[;I"/img/usergrid_400/; T[;I"/img/usergrid_800/;T[;I"/img/usergrid_card/; T[;I"/img/usergrid_logo/; T[;I"/img/usergrid_logo_205_50/; T[;I"/img/usergrid_logo_260_50/;T[;I"/img/usergrid_logo_720/; T[;I"/img/usergrid_logo_720p/; T[;I" /img/usergrid_logo_900_200/; T[;I"/img/usergrid_logo_white/; T[;I"/img/usergrid_profile_128/; T[;I"/img/usergrid_profile_256/; T[;I"%/img/usergrid_profile_256_white/; T[;I"'/img/usergrid_profile_512_margins/; T[;I"$/img/usergrid_profile_64_white/; T[;I"&/img/usergrid_profile_background/; T[;I"!/img/usergrid_screencast_bg/; T[;I"/img/usergrid_small_100/; T[;I"/img/userg rid_wiki/;T[;I"/img/yourkit/; T[;I"/; T[;I"/js/bootstrap/;T[;I"/js/head/; T[;I"/js/html5shiv/;T[;I"/js/jquery-1/; T[;I"/js/jquery/; T[;I"/js/respond/; T[;I"/js/usergrid-site/;T[;I"/releases/; T[;I"/static/github-btn/; T[:layouto:Nanoc::Identifier: -@type:legacy:@stringI"/community/; T[; -o;;; ;I"/default/;T[; -o;;; ;I"/docs/; T[; -o;;; ;I" /footer/; T[; -o;;; ;I" /header/; T[; -@�[; -@�[; -@�:versioni \ No newline at end of file
[36/51] [abbrv] usergrid git commit: Merge branch 'collectionClearJob'
Merge branch 'collectionClearJob' Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/8e9eff8d Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/8e9eff8d Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/8e9eff8d Branch: refs/heads/asf-site Commit: 8e9eff8d9340fc85b7d4b544fa542e388974525a Parents: 36e28a8 11823f2 Author: Mike Dunker Authored: Mon Aug 28 16:23:01 2017 -0700 Committer: Mike Dunker Committed: Mon Aug 28 16:23:01 2017 -0700 -- .../main/resources/usergrid-default.properties | 3 +- .../usergrid/corepersistence/CoreModule.java| 1 + .../corepersistence/CpEntityManager.java| 3 +- .../corepersistence/CpEntityManagerFactory.java | 2 +- .../corepersistence/EntityManagerFig.java | 2 +- .../asyncevents/AsyncEventQueueType.java| 35 ++ .../asyncevents/AsyncEventService.java | 7 +- .../asyncevents/AsyncEventServiceImpl.java | 545 +-- .../asyncevents/EventBuilder.java | 26 +- .../asyncevents/EventBuilderImpl.java | 205 +-- .../asyncevents/model/EntityDeleteEvent.java| 27 +- .../index/CollectionDeleteAction.java | 43 ++ .../index/CollectionDeleteRequestBuilder.java | 92 .../CollectionDeleteRequestBuilderImpl.java | 146 + .../index/CollectionDeleteService.java | 108 .../index/CollectionDeleteServiceImpl.java | 299 ++ .../index/CollectionSettingsImpl.java | 1 - .../index/IndexProcessorFig.java| 27 + .../corepersistence/index/IndexService.java | 16 +- .../corepersistence/index/IndexServiceImpl.java | 56 +- .../corepersistence/index/ReIndexAction.java| 5 +- .../index/ReIndexServiceImpl.java | 5 +- .../read/traverse/AbstractReadGraphFilter.java | 42 +- .../AbstractReadReverseGraphFilter.java | 41 +- .../usergrid/persistence/EntityManager.java | 2 +- .../org/apache/usergrid/persistence/Query.java | 17 + .../persistence/entities/Application.java | 26 + .../rx/EdgesFromSourceObservableIT.java | 2 +- .../rx/EdgesToTargetObservableIT.java | 4 +- .../persistence/CollectionDeleteTest.java | 266 + .../usergrid/persistence/CoreSchemaManager.java | 16 +- .../usergrid/persistence/RebuildIndexTest.java | 36 +- .../core/src/test/resources/project.properties | 2 +- .../resources/usergrid-custom-test.properties | 3 +- .../actorsystem/ActorSystemManagerImpl.java | 3 +- .../src/test/resources/dynamic-test.properties | 1 + .../src/test/resources/usergrid-CHOP.properties | 1 + .../src/test/resources/usergrid-UNIT.properties | 1 + .../src/test/resources/usergrid.properties | 1 + .../persistence/graph/GraphManager.java | 2 +- .../graph/impl/GraphManagerImpl.java| 21 +- .../graph/impl/SimpleSearchByEdgeType.java | 9 + .../graph/impl/stage/NodeDeleteListener.java| 6 +- .../impl/stage/NodeDeleteListenerImpl.java | 64 +-- .../graph/serialization/EdgesObservable.java| 6 +- .../impl/EdgeMetadataSerializationV2Impl.java | 1 - .../serialization/impl/EdgesObservableImpl.java | 22 +- .../impl/TargetIdObservableImpl.java| 4 +- .../impl/migration/EdgeDataMigrationImpl.java | 2 +- .../graph/impl/NodeDeleteListenerTest.java | 8 +- .../src/test/resources/usergrid-AWS.properties | 1 + .../src/test/resources/usergrid-CHOP.properties | 1 + .../src/test/resources/usergrid-UNIT.properties | 1 + .../src/test/resources/usergrid.properties | 1 + .../usergrid/persistence/index/EntityIndex.java | 12 +- .../index/impl/EsEntityIndexImpl.java | 65 +-- .../persistence/index/query/Identifier.java | 3 +- .../src/test/resources/dynamic-test.properties | 1 + .../src/test/resources/usergrid-CHOP.properties | 1 + .../src/test/resources/usergrid-UNIT.properties | 1 + stack/corepersistence/queue/pom.xml | 18 +- .../queues/impl/QueueSerializationImpl.java | 2 +- .../persistence/queue/guice/QueueModule.java| 2 +- .../persistence/qakka/KeyspaceDropper.java | 6 +- .../qakka/core/QueueMessageManagerTest.java | 2 +- .../queue/src/test/resources/qakka.properties | 1 + stack/pom.xml | 8 +- .../resources/usergrid-custom-test.properties | 2 + stack/rest/pom.xml | 4 +- .../rest/applications/CollectionResource.java | 130 - .../rest/applications/users/UserResource.java | 9 + .../rest/management/users/UserResource.java | 16 + .../apache/usergrid/rest/TestResource/error.jsp | 4 +- .../apache/usergrid/rest/TestResource/test.jsp | 5 +- .../ApplicationResource/authorize_form.jsp | 15 +- .../applicat
[43/51] [abbrv] usergrid git commit: Allow submission to SNS/SQS via sync client
Allow submission to SNS/SQS via sync client Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/9a151089 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/9a151089 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/9a151089 Branch: refs/heads/asf-site Commit: 9a15108924b29997c9ca440b467ab8006a8f8acb Parents: 173be8a Author: Peter Johnson Authored: Wed Sep 27 08:19:20 2017 -0700 Committer: Peter Johnson Committed: Wed Sep 27 08:19:20 2017 -0700 -- .../corepersistence/CpEntityManager.java| 75 +++-- .../corepersistence/CpRelationManager.java | 52 - .../asyncevents/AsyncEventService.java | 6 +- .../asyncevents/AsyncEventServiceImpl.java | 44 +--- .../asyncevents/EventBuilderImpl.java | 2 + .../corepersistence/util/CpCollectionUtils.java | 104 + .../index/AsyncIndexServiceTest.java| 2 +- .../persistence/queue/LegacyQueueFig.java | 5 + .../persistence/queue/LegacyQueueManager.java | 11 +- .../persistence/queue/LocalQueueManager.java| 11 +- .../queue/impl/QakkaQueueManager.java | 12 +- .../queue/impl/SNSQueueManagerImpl.java | 112 +-- .../queue/LegacyQueueManagerTest.java | 2 +- .../impl/ApplicationQueueManagerImpl.java | 2 +- .../services/queues/ImportQueueManager.java | 8 +- 15 files changed, 341 insertions(+), 107 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/9a151089/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java index 68c4ef0..1dc4a89 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java @@ -34,6 +34,7 @@ import org.apache.usergrid.corepersistence.index.CollectionSettingsFactory; import org.apache.usergrid.corepersistence.index.CollectionSettingsScopeImpl; import org.apache.usergrid.corepersistence.service.CollectionService; import org.apache.usergrid.corepersistence.service.ConnectionService; +import org.apache.usergrid.corepersistence.util.CpCollectionUtils; import org.apache.usergrid.corepersistence.util.CpEntityMapUtils; import org.apache.usergrid.corepersistence.util.CpNamingUtils; import org.apache.usergrid.mq.QueueManager; @@ -161,7 +162,6 @@ public class CpEntityManager implements EntityManager { public QueueManagerFactory queueManagerFactory; - ///** Short-term cache to keep us from reloading same Entity during single request. */ //private LoadingCache entityCache; @@ -521,6 +521,10 @@ public class CpEntityManager implements EntityManager { cpEntity = CpEntityMapUtils.fromMap( cpEntity, entity.getProperties(), entity.getType(), true ); +String entityType = cpEntity.getId().getType(); +boolean skipIndexingForType = skipIndexingForType(entityType); +Boolean asyncIndex = asyncIndexingForType(entityType); + try { String region = lookupAuthoritativeRegionForType( entity.getType() ); @@ -546,38 +550,32 @@ public class CpEntityManager implements EntityManager { handleWriteUniqueVerifyException( entity, wuve ); } -if ( !skipIndexingForType( cpEntity.getId().getType() ) ) { +if (!skipIndexingForType) { +indexEntity(cpEntity, asyncIndex); +deIndexOldVersionsOfEntity(cpEntity); +} +} -// queue an event to update the new entity -indexService.queueEntityIndexUpdate( applicationScope, cpEntity, 0 ); +private void indexEntity(org.apache.usergrid.persistence.model.entity.Entity cpEntity, Boolean async) { +// queue an event to update the new entity +indexService.queueEntityIndexUpdate( applicationScope, cpEntity, 0 , async); +} -// queue up an event to clean-up older versions than this one from the index -if (entityManagerFig.getDeindexOnUpdate()) { -indexService.queueDeIndexOldVersion( applicationScope, cpEntity.getId(), cpEntity.getVersion()); -} +private void deIndexOldVersionsOfEntity(org.apache.usergrid.persistence.model.entity.Entity cpEntity) { +// queue up an event to clean-up older versions than this one from the index +if (entityManagerFig.getDeindexOnUpdate()) { +indexService.queueDeIndexOldVersion( applicationScope, cpEntity.getId(), cpEntity.get
[48/51] [abbrv] usergrid git commit: add extra logging for orphaned connection repair
add extra logging for orphaned connection repair Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/a769f304 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/a769f304 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/a769f304 Branch: refs/heads/asf-site Commit: a769f304aaef3356334e85e2d8e1b8ca1d5afc91 Parents: b93f8d4 Author: Mike Dunker Authored: Mon Oct 16 17:04:58 2017 -0700 Committer: Mike Dunker Committed: Mon Oct 16 17:04:58 2017 -0700 -- .../pipeline/read/traverse/EntityLoadVerifyFilter.java| 10 ++ 1 file changed, 10 insertions(+) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/a769f304/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java index cc82bd8..c6a3462 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/EntityLoadVerifyFilter.java @@ -167,6 +167,7 @@ public class EntityLoadVerifyFilter extends AbstractFilter, Fil int edgesDeleted = 0; List edgeList = graphManager.loadEdgeVersions(searchByEdge).toList().toBlocking().last(); +boolean timestampAllowsDelete = false; if (edgeList.size() > 0) { MarkedEdge firstEdge = edgeList.get(0); long currentTimestamp = CpNamingUtils.createGraphOperationTimestamp(); @@ -176,6 +177,7 @@ public class EntityLoadVerifyFilter extends AbstractFilter, Fil // timestamps are in 100 nanoseconds, convert from seconds long allowedDiff = orphanDelaySecs * 1000L * 1000L * 10L; if (timestampDiff > allowedDiff) { +timestampAllowsDelete = true; // edges must be orphans, delete edges for (MarkedEdge edge: edgeList) { graphManager.markEdge(edge).toBlocking().lastOrDefault(null); @@ -188,6 +190,14 @@ public class EntityLoadVerifyFilter extends AbstractFilter, Fil if (edgesDeleted > 0) { logger.warn("Read graph edge and received candidate with entityId {} (application {}), yet was not found in cassandra." + " Deleted at least {} edges.", candidateId, applicationScope.getApplication().getUuid().toString(), edgesDeleted); +} else if (edgeList.size() == 0) { +logger.warn("Read graph edge and received candidate with entityId {} (application {}), yet was not found in cassandra." ++ " No edges were deleted (loadEdgeVersions returned 0 edges)", +candidateId, applicationScope.getApplication().getUuid().toString()); +} else if (timestampAllowsDelete) { +logger.warn("Read graph edge and received candidate with entityId {} (application {}), yet was not found in cassandra." ++ " Timestamp is old enough to delete, but no edges were deleted (loadEdgeVersions returned {} edges)", +candidateId, applicationScope.getApplication().getUuid().toString(), edgeList.size()); } else { logger.warn("Read graph edge and received candidate with entityId {} (application {}), yet was not found in cassandra." + " Ignoring since this could be a region sync issue", candidateId, applicationScope.getApplication().getUuid().toString());
[44/51] [abbrv] usergrid git commit: code review changes
code review changes Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/4a659106 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/4a659106 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/4a659106 Branch: refs/heads/asf-site Commit: 4a659106eadefc83cce93f47d6b5090f65b8c1e3 Parents: 9a15108 Author: Peter Johnson Authored: Wed Sep 27 15:10:56 2017 -0700 Committer: Peter Johnson Committed: Wed Sep 27 15:10:56 2017 -0700 -- .../apache/usergrid/corepersistence/CpEntityManager.java | 4 ++-- .../corepersistence/asyncevents/EventBuilderImpl.java| 1 - .../persistence/queue/impl/SNSQueueManagerImpl.java | 11 +++ 3 files changed, 9 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/4a659106/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java index 1dc4a89..3f3794e 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManager.java @@ -2854,7 +2854,7 @@ public class CpEntityManager implements EntityManager { // add to and index in collection of the application if ( !is_application) { -updateIndexForEniity(eType, entity, timestamp); +updateIndexForEntity(eType, entity, timestamp); } //write to our types map @@ -2864,7 +2864,7 @@ public class CpEntityManager implements EntityManager { return entity; } -private void updateIndexForEniity(String eType, A entity, long timestamp) throws Exception { +private void updateIndexForEntity(String eType, A entity, long timestamp) throws Exception { String collectionName = Schema.defaultCollectionName( eType ); CpRelationManager cpr = ( CpRelationManager ) getRelationManager( getApplication() ); cpr.addToCollection( collectionName, entity ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/4a659106/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java index 203d32a..1eb5e03 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventBuilderImpl.java @@ -21,7 +21,6 @@ package org.apache.usergrid.corepersistence.asyncevents; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.UUID; http://git-wip-us.apache.org/repos/asf/usergrid/blob/4a659106/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java -- diff --git a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java index 775a64b..bc9be57 100644 --- a/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java +++ b/stack/corepersistence/queue/src/main/java/org/apache/usergrid/persistence/queue/impl/SNSQueueManagerImpl.java @@ -84,6 +84,8 @@ public class SNSQueueManagerImpl implements LegacyQueueManager { private static final int MIN_VISIBILITY_TIMEOUT = 1; //seconds private static final String DEAD_LETTER_QUEUE_SUFFIX = "_dead"; +private static final String FAILED_TO_SEND_MESSAGE = "FAILED INDEX REQUEST: Failed to send message to SNS Queue, sending asynchronously. Message:[{}] URL:[{}] Error:[{}]"; + static { /** @@ -573,7 +575,7 @@ public class SNSQueueManagerImpl implements LegacyQueueManager { } } catch (Exception e) { if (logger.isErrorEnabled()) { -logger.error("Failed to send this message {} to SNS queue at {}", stringBody, topicArn); +logger.error(FAILED_TO_SEND_MESSAGE, stringBody, topicArn, e); } sendMessageToAllRegionsAsync(body); } @@ -591,7 +593,7 @@ public class SNSQueueManagerImpl implements LegacyQueueManager { final String st
[22/51] [abbrv] usergrid git commit: Add new parameter that can be used in the JSP viewables.
Add new parameter that can be used in the JSP viewables. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/068263ed Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/068263ed Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/068263ed Branch: refs/heads/asf-site Commit: 068263ed437883edeba1d23a024f62bb6e7b0700 Parents: a6fee78 Author: Michael Russo Authored: Wed May 24 21:45:04 2017 -0700 Committer: Mike Dunker Committed: Thu Aug 17 09:41:40 2017 -0700 -- stack/config/src/main/resources/usergrid-default.properties | 1 + .../apache/usergrid/rest/management/users/UserResource.java | 7 +++ 2 files changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/068263ed/stack/config/src/main/resources/usergrid-default.properties -- diff --git a/stack/config/src/main/resources/usergrid-default.properties b/stack/config/src/main/resources/usergrid-default.properties index d505a96..77b047e 100644 --- a/stack/config/src/main/resources/usergrid-default.properties +++ b/stack/config/src/main/resources/usergrid-default.properties @@ -786,6 +786,7 @@ usergrid.api.url.base=http://localhost:8080/ROOT # instead, use character class ([.] instead of backslash-period) usergrid.org.config.property.regex=usergrid[.]view[.].* +usergrid.viewable.loginEndpoint=http://localhost:8080 ### Usergrid Email Templates http://git-wip-us.apache.org/repos/asf/usergrid/blob/068263ed/stack/rest/src/main/java/org/apache/usergrid/rest/management/users/UserResource.java -- diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/management/users/UserResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/management/users/UserResource.java index 4cbe9b2..b747aa4 100644 --- a/stack/rest/src/main/java/org/apache/usergrid/rest/management/users/UserResource.java +++ b/stack/rest/src/main/java/org/apache/usergrid/rest/management/users/UserResource.java @@ -66,6 +66,9 @@ public class UserResource extends AbstractContextResource { String token = null; +String loginEndpoint; + + public UserResource() { } @@ -296,6 +299,7 @@ public class UserResource extends AbstractContextResource { if ( ( password1 != null ) && password1.equals( password2 ) ) { management.setAdminUserPassword( user.getUuid(), password1 ); management.revokeAccessTokenForAdminUser( user.getUuid(), token ); +loginEndpoint = properties.getProperty("usergrid.viewable.loginEndpoint"); return handleViewable( "resetpw_set_success", this, organizationId ); } else { @@ -342,6 +346,9 @@ public class UserResource extends AbstractContextResource { return errorMsg; } +public String getLoginEndpoint() { +return loginEndpoint; +} public String getToken() { return token;
[32/51] [abbrv] usergrid git commit: Converts de-indexing of edges and entities to identify documents in the index to delete based on data in Cassandra vs. resource intensive queries to the index. Fix
http://git-wip-us.apache.org/repos/asf/usergrid/blob/c201f1f6/stack/websocket/pom.xml -- diff --git a/stack/websocket/pom.xml b/stack/websocket/pom.xml index af5ed56..72a5c9d 100644 --- a/stack/websocket/pom.xml +++ b/stack/websocket/pom.xml @@ -70,7 +70,7 @@ ${basedir}/src/test/conf always - -Xmx${ug.heapmax} -Xms${ug.heapmin} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec -javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar ${ug.argline} + -Xmx${ug.heapmax} -Xms${ug.heapmin} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec -javaagent:${settings.localRepository}/com/github/jbellis/jamm/0.3.0/jamm-0.3.0.jar ${ug.argline}
[2/3] usergrid git commit: Updates website content to reference community maintained buttons
http://git-wip-us.apache.org/repos/asf/usergrid/blob/e2333add/website/tmp/compiled_content -- diff --git a/website/tmp/compiled_content b/website/tmp/compiled_content deleted file mode 100644 index 91c5445..000 --- a/website/tmp/compiled_content +++ /dev/null @@ -1,14130 +0,0 @@ -{: data{�I"/bootstrap/bootstrap/:ET{:default{: lastI"��/*! - * Bootstrap v3.0.0 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - *//*! normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decorati on:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}input,button,select ,textarea{font-family:inherit;font-size:inherit;line-height:inherit}button,input,select[multiple],textarea{background-image:none}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16.098px;font-weight:200;line-height:1.4}@media(min-w idth:768px){.lead{font-size:21px}}small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-warning{color:#c09853}.text-danger{color:#b94a48}.text-success{color:#468847}.text-info{color:#3a87ad}.text-left{text-align:left}.text-right{text-align:right}.text-center{t
[1/3] usergrid git commit: Updates website content to reference community maintained buttons [Forced Update!]
Repository: usergrid Updated Branches: refs/heads/master bb2f8db41 -> e2333add6 (forced update) http://git-wip-us.apache.org/repos/asf/usergrid/blob/e2333add/website/tmp/dependencies -- diff --git a/website/tmp/dependencies b/website/tmp/dependencies deleted file mode 100644 index 8ddff40..000 --- a/website/tmp/dependencies +++ /dev/null @@ -1,10 +0,0 @@ -{: data{: -edges[[iQiF[iQiN[iUi[iVi[iViF[iViN[iWi[iWiF[iWiN: vertices[X0[: itemI"/bootstrap/bootstrap/:ET[;I"/community/; T[;I"/css/bootflat-extensions/; T[;I"/css/bootflat-square/; T[;I"/css/bootflat/;T[;I"/css/font-awesome/; T[;I"/css/usergrid-site/; T[;I"/favicon/; T[;I"#/font/fontawesome-webfont-eot/; T[;I"#/font/fontawesome-webfont-svg/; T[;I"#/font/fontawesome-webfont-ttf/; T[;I"$/font/fontawesome-webfont-woff/; T[;I"/font/FontAwesome/; T[;I"/img/alberto/; T[;I"/img/alex/; T[;I""/img/apache_usergrid_favicon/; T[;I"%/img/apache_usergrid_logo_white/; T[;I"+/img/apache_usergrid_logo_white_small/; T[;I"/img/check_flat/default/; T[;I"/img/dave/;T[;I" /img/ed/; T[;I"/img/egg-logo/;T[;I"/img/github/; T[;I"/img/grey/;T[;I"/img/intellij/;T[;I"/img/jeff/; T[;I"/img/michael_r/; T[;I"/img/miked/; T[;I"/img/nate/; T[;I"/img/rod/; T[;I"/img/scott/; T[;I"/img/shawn/; T[;I"/img/stliu/; T[;I"/img/strong/; T[;I"/img/structure101/;T[;I"/img/sungju/; T[;I"/img/tim/; T[;I"/img/todd/;T[;I"/img/usergrid-logo/; T[;I"/img/usergrid/;T[;I"/img/usergrid_160/; T[;I"/img/usergrid_200/;T[;I"/img/usergrid_300/; T[;I"#/img/usergrid_300_transparent/;T[;I"/img/usergrid_400/; T[;I"/img/usergrid_800/;T[;I"/img/usergrid_card/; T[;I"/img/usergrid_logo/; T[;I"/img/usergrid_logo_205_50/; T[;I"/img/usergrid_logo_260_50/;T[;I"/img/usergrid_logo_720/; T[;I"/img/usergrid_logo_720p/; T[;I" /img/usergrid_logo_900_200/; T[;I"/img/usergrid_logo_white/; T[;I"/img/usergrid_profile_128/; T[;I"/img/usergrid_profile_256/; T[;I"%/img/usergrid_profile_256_white/; T[;I"'/img/usergrid_profile_512_margins/; T[;I"$/img/usergrid_profile_64_white/; T[;I"&/img/usergrid_profile_background/; T[;I"!/img/usergrid_screencast_bg/; T[;I"/img/usergrid_small_100/; T[;I"/img/userg rid_wiki/;T[;I"/img/yourkit/; T[;I"/; T[;I"/js/bootstrap/;T[;I"/js/head/; T[;I"/js/html5shiv/;T[;I"/js/jquery-1/; T[;I"/js/jquery/; T[;I"/js/respond/; T[;I"/js/usergrid-site/;T[;I"/releases/; T[;I"/static/github-btn/; T[:layouto:Nanoc::Identifier: -@type:legacy:@stringI"/community/; T[; -o;;; ;I"/default/;T[; -o;;; ;I"/docs/; T[; -o;;; ;I" /footer/; T[; -o;;; ;I" /header/; T[; -@�[; -@�[; -@�:versioni \ No newline at end of file
[3/3] usergrid git commit: Updates website content to reference community maintained buttons
Updates website content to reference community maintained buttons Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/e2333add Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/e2333add Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/e2333add Branch: refs/heads/master Commit: e2333add6593e975dfc7df97fe4151d4bd9d00c2 Parents: a769f30 Author: Todd Nine Authored: Wed Oct 18 10:09:30 2017 -0600 Committer: Todd Nine Committed: Wed Oct 18 10:19:58 2017 -0600 -- content/index.html | 4 +- content/releases/index.html| 1 + docs/README.md | 2 +- website/content/index.html | 4 +- website/content/static/github-btn.html | 2 - website/tmp/checksums | 3 - website/tmp/compiled_content | 14130 -- website/tmp/dependencies |10 - 8 files changed, 6 insertions(+), 14150 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/e2333add/content/index.html -- diff --git a/content/index.html b/content/index.html index 0394438..d14cc9b 100644 --- a/content/index.html +++ b/content/index.html @@ -78,8 +78,8 @@ - - +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=watch&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> +https://ghbtns.com/github-btn.html??user=apache&repo=usergrid&type=fork&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> http://git-wip-us.apache.org/repos/asf/usergrid/blob/e2333add/content/releases/index.html -- diff --git a/content/releases/index.html b/content/releases/index.html index beb5bca..2c71570 100644 --- a/content/releases/index.html +++ b/content/releases/index.html @@ -98,6 +98,7 @@ Project releases are approved by vote of the Apache Usergrid Project Management Committee (PMC). Support for a release is provided by project volunteers on the project http://usergrid.apache.org/community/#mailing-lists";>mailing lists. Bugs found in a release may be discussed on the list and reported through the https://issues.apache.org/jira/browse/USERGRID";>issue tracker. The user mailing list and issue tracker are the only support options hosted by the Apache Usergrid project. + Note: When downloading from a mirror, please be sure to verify that checksums and signatures are correct. To do so, use the checksum and signature files from the main Apache site at https://www.apache.org/dist/usergrid/usergrid-2/v2.1.0/";>https://dist.apache.org/repos/dist/release/usergrid/usergrid-2/v2.1.0/. Find here the KEYS file, which contains all OpenPGP keys we use to sign releases here: https://www.apache.org/dist/usergrid/KEYS";>https://www.apache.org/dist/usergrid/KEYS http://git-wip-us.apache.org/repos/asf/usergrid/blob/e2333add/docs/README.md -- diff --git a/docs/README.md b/docs/README.md index 2f7888c..27a8baf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,8 +6,8 @@ Usergrid documentation is written in [Markdown](https://help.github.com/articles Sphinx requires Python and pip. Once you have Python, you can install sphinx and pip like so: - $ sudo easy_install sphinx $ sudo easy_install pip + $ sudo pip install sphinx==1.3.2 ## How to build the Usergrid documentation using Sphinx http://git-wip-us.apache.org/repos/asf/usergrid/blob/e2333add/website/content/index.html -- diff --git a/website/content/index.html b/website/content/index.html index 7dbabff..a80b1c2 100644 --- a/website/content/index.html +++ b/website/content/index.html @@ -14,8 +14,8 @@ title: the BaaS not made for Hipsters - - +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=watch&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=fork&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> http://git-wip-us.apac
[usergrid] Git Push Summary
Repository: usergrid Updated Branches: refs/heads/website-button-update [deleted] bb2f8db41
[3/3] usergrid git commit: Updates website content to reference community maintained buttons
Updates website content to reference community maintained buttons Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/bb2f8db4 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/bb2f8db4 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/bb2f8db4 Branch: refs/heads/master Commit: bb2f8db4129fd5505f0aeb0b173b957cf5d9e1c2 Parents: a769f30 Author: Todd Nine Authored: Wed Oct 18 10:09:30 2017 -0600 Committer: Todd Nine Committed: Wed Oct 18 10:09:30 2017 -0600 -- content/index.html | 4 +- content/releases/index.html| 1 + docs/README.md | 2 +- website/content/index.html | 4 +- website/content/static/github-btn.html | 2 - website/tmp/checksums | 3 - website/tmp/compiled_content | 14130 -- website/tmp/dependencies |10 - 8 files changed, 6 insertions(+), 14150 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/content/index.html -- diff --git a/content/index.html b/content/index.html index 0394438..d14cc9b 100644 --- a/content/index.html +++ b/content/index.html @@ -78,8 +78,8 @@ - - +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=watch&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> +https://ghbtns.com/github-btn.html??user=apache&repo=usergrid&type=fork&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/content/releases/index.html -- diff --git a/content/releases/index.html b/content/releases/index.html index beb5bca..2c71570 100644 --- a/content/releases/index.html +++ b/content/releases/index.html @@ -98,6 +98,7 @@ Project releases are approved by vote of the Apache Usergrid Project Management Committee (PMC). Support for a release is provided by project volunteers on the project http://usergrid.apache.org/community/#mailing-lists";>mailing lists. Bugs found in a release may be discussed on the list and reported through the https://issues.apache.org/jira/browse/USERGRID";>issue tracker. The user mailing list and issue tracker are the only support options hosted by the Apache Usergrid project. + Note: When downloading from a mirror, please be sure to verify that checksums and signatures are correct. To do so, use the checksum and signature files from the main Apache site at https://www.apache.org/dist/usergrid/usergrid-2/v2.1.0/";>https://dist.apache.org/repos/dist/release/usergrid/usergrid-2/v2.1.0/. Find here the KEYS file, which contains all OpenPGP keys we use to sign releases here: https://www.apache.org/dist/usergrid/KEYS";>https://www.apache.org/dist/usergrid/KEYS http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/docs/README.md -- diff --git a/docs/README.md b/docs/README.md index 2f7888c..27a8baf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,8 +6,8 @@ Usergrid documentation is written in [Markdown](https://help.github.com/articles Sphinx requires Python and pip. Once you have Python, you can install sphinx and pip like so: - $ sudo easy_install sphinx $ sudo easy_install pip + $ sudo pip install sphinx==1.3.2 ## How to build the Usergrid documentation using Sphinx http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/website/content/index.html -- diff --git a/website/content/index.html b/website/content/index.html index 7dbabff..15c0202 100644 --- a/website/content/index.html +++ b/website/content/index.html @@ -14,8 +14,8 @@ title: the BaaS not made for Hipsters - - +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=watch&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> +https://ghbtns.com/github-btn.html??user=apache&repo=usergrid&type=fork&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> http://git-wip-us.apa
[1/3] usergrid git commit: Updates website content to reference community maintained buttons
Repository: usergrid Updated Branches: refs/heads/master a769f304a -> bb2f8db41 http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/website/tmp/dependencies -- diff --git a/website/tmp/dependencies b/website/tmp/dependencies deleted file mode 100644 index 8ddff40..000 --- a/website/tmp/dependencies +++ /dev/null @@ -1,10 +0,0 @@ -{: data{: -edges[[iQiF[iQiN[iUi[iVi[iViF[iViN[iWi[iWiF[iWiN: vertices[X0[: itemI"/bootstrap/bootstrap/:ET[;I"/community/; T[;I"/css/bootflat-extensions/; T[;I"/css/bootflat-square/; T[;I"/css/bootflat/;T[;I"/css/font-awesome/; T[;I"/css/usergrid-site/; T[;I"/favicon/; T[;I"#/font/fontawesome-webfont-eot/; T[;I"#/font/fontawesome-webfont-svg/; T[;I"#/font/fontawesome-webfont-ttf/; T[;I"$/font/fontawesome-webfont-woff/; T[;I"/font/FontAwesome/; T[;I"/img/alberto/; T[;I"/img/alex/; T[;I""/img/apache_usergrid_favicon/; T[;I"%/img/apache_usergrid_logo_white/; T[;I"+/img/apache_usergrid_logo_white_small/; T[;I"/img/check_flat/default/; T[;I"/img/dave/;T[;I" /img/ed/; T[;I"/img/egg-logo/;T[;I"/img/github/; T[;I"/img/grey/;T[;I"/img/intellij/;T[;I"/img/jeff/; T[;I"/img/michael_r/; T[;I"/img/miked/; T[;I"/img/nate/; T[;I"/img/rod/; T[;I"/img/scott/; T[;I"/img/shawn/; T[;I"/img/stliu/; T[;I"/img/strong/; T[;I"/img/structure101/;T[;I"/img/sungju/; T[;I"/img/tim/; T[;I"/img/todd/;T[;I"/img/usergrid-logo/; T[;I"/img/usergrid/;T[;I"/img/usergrid_160/; T[;I"/img/usergrid_200/;T[;I"/img/usergrid_300/; T[;I"#/img/usergrid_300_transparent/;T[;I"/img/usergrid_400/; T[;I"/img/usergrid_800/;T[;I"/img/usergrid_card/; T[;I"/img/usergrid_logo/; T[;I"/img/usergrid_logo_205_50/; T[;I"/img/usergrid_logo_260_50/;T[;I"/img/usergrid_logo_720/; T[;I"/img/usergrid_logo_720p/; T[;I" /img/usergrid_logo_900_200/; T[;I"/img/usergrid_logo_white/; T[;I"/img/usergrid_profile_128/; T[;I"/img/usergrid_profile_256/; T[;I"%/img/usergrid_profile_256_white/; T[;I"'/img/usergrid_profile_512_margins/; T[;I"$/img/usergrid_profile_64_white/; T[;I"&/img/usergrid_profile_background/; T[;I"!/img/usergrid_screencast_bg/; T[;I"/img/usergrid_small_100/; T[;I"/img/userg rid_wiki/;T[;I"/img/yourkit/; T[;I"/; T[;I"/js/bootstrap/;T[;I"/js/head/; T[;I"/js/html5shiv/;T[;I"/js/jquery-1/; T[;I"/js/jquery/; T[;I"/js/respond/; T[;I"/js/usergrid-site/;T[;I"/releases/; T[;I"/static/github-btn/; T[:layouto:Nanoc::Identifier: -@type:legacy:@stringI"/community/; T[; -o;;; ;I"/default/;T[; -o;;; ;I"/docs/; T[; -o;;; ;I" /footer/; T[; -o;;; ;I" /header/; T[; -@�[; -@�[; -@�:versioni \ No newline at end of file
[2/3] usergrid git commit: Updates website content to reference community maintained buttons
http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/website/tmp/compiled_content -- diff --git a/website/tmp/compiled_content b/website/tmp/compiled_content deleted file mode 100644 index 91c5445..000 --- a/website/tmp/compiled_content +++ /dev/null @@ -1,14130 +0,0 @@ -{: data{�I"/bootstrap/bootstrap/:ET{:default{: lastI"��/*! - * Bootstrap v3.0.0 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - *//*! normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decorati on:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}input,button,select ,textarea{font-family:inherit;font-size:inherit;line-height:inherit}button,input,select[multiple],textarea{background-image:none}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16.098px;font-weight:200;line-height:1.4}@media(min-w idth:768px){.lead{font-size:21px}}small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-warning{color:#c09853}.text-danger{color:#b94a48}.text-success{color:#468847}.text-info{color:#3a87ad}.text-left{text-align:left}.text-right{text-align:right}.text-center{t
[3/3] usergrid git commit: Updates website content to reference community maintained buttons
Updates website content to reference community maintained buttons Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/bb2f8db4 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/bb2f8db4 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/bb2f8db4 Branch: refs/heads/website-button-update Commit: bb2f8db4129fd5505f0aeb0b173b957cf5d9e1c2 Parents: a769f30 Author: Todd Nine Authored: Wed Oct 18 10:09:30 2017 -0600 Committer: Todd Nine Committed: Wed Oct 18 10:09:30 2017 -0600 -- content/index.html | 4 +- content/releases/index.html| 1 + docs/README.md | 2 +- website/content/index.html | 4 +- website/content/static/github-btn.html | 2 - website/tmp/checksums | 3 - website/tmp/compiled_content | 14130 -- website/tmp/dependencies |10 - 8 files changed, 6 insertions(+), 14150 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/content/index.html -- diff --git a/content/index.html b/content/index.html index 0394438..d14cc9b 100644 --- a/content/index.html +++ b/content/index.html @@ -78,8 +78,8 @@ - - +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=watch&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> +https://ghbtns.com/github-btn.html??user=apache&repo=usergrid&type=fork&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/content/releases/index.html -- diff --git a/content/releases/index.html b/content/releases/index.html index beb5bca..2c71570 100644 --- a/content/releases/index.html +++ b/content/releases/index.html @@ -98,6 +98,7 @@ Project releases are approved by vote of the Apache Usergrid Project Management Committee (PMC). Support for a release is provided by project volunteers on the project http://usergrid.apache.org/community/#mailing-lists";>mailing lists. Bugs found in a release may be discussed on the list and reported through the https://issues.apache.org/jira/browse/USERGRID";>issue tracker. The user mailing list and issue tracker are the only support options hosted by the Apache Usergrid project. + Note: When downloading from a mirror, please be sure to verify that checksums and signatures are correct. To do so, use the checksum and signature files from the main Apache site at https://www.apache.org/dist/usergrid/usergrid-2/v2.1.0/";>https://dist.apache.org/repos/dist/release/usergrid/usergrid-2/v2.1.0/. Find here the KEYS file, which contains all OpenPGP keys we use to sign releases here: https://www.apache.org/dist/usergrid/KEYS";>https://www.apache.org/dist/usergrid/KEYS http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/docs/README.md -- diff --git a/docs/README.md b/docs/README.md index 2f7888c..27a8baf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,8 +6,8 @@ Usergrid documentation is written in [Markdown](https://help.github.com/articles Sphinx requires Python and pip. Once you have Python, you can install sphinx and pip like so: - $ sudo easy_install sphinx $ sudo easy_install pip + $ sudo pip install sphinx==1.3.2 ## How to build the Usergrid documentation using Sphinx http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/website/content/index.html -- diff --git a/website/content/index.html b/website/content/index.html index 7dbabff..15c0202 100644 --- a/website/content/index.html +++ b/website/content/index.html @@ -14,8 +14,8 @@ title: the BaaS not made for Hipsters - - +https://ghbtns.com/github-btn.html?user=apache&repo=usergrid&type=watch&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> +https://ghbtns.com/github-btn.html??user=apache&repo=usergrid&type=fork&size=large"; allowtransparency="true" frameborder="0" scrolling="0" width="85" height="30"> http:/
[2/3] usergrid git commit: Updates website content to reference community maintained buttons
http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/website/tmp/compiled_content -- diff --git a/website/tmp/compiled_content b/website/tmp/compiled_content deleted file mode 100644 index 91c5445..000 --- a/website/tmp/compiled_content +++ /dev/null @@ -1,14130 +0,0 @@ -{: data{�I"/bootstrap/bootstrap/:ET{:default{: lastI"��/*! - * Bootstrap v3.0.0 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - *//*! normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decorati on:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*,*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}input,button,select ,textarea{font-family:inherit;font-size:inherit;line-height:inherit}button,input,select[multiple],textarea{background-image:none}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;height:auto;max-width:100%;padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16.098px;font-weight:200;line-height:1.4}@media(min-w idth:768px){.lead{font-size:21px}}small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-warning{color:#c09853}.text-danger{color:#b94a48}.text-success{color:#468847}.text-info{color:#3a87ad}.text-left{text-align:left}.text-right{text-align:right}.text-center{t
[1/3] usergrid git commit: Updates website content to reference community maintained buttons
Repository: usergrid Updated Branches: refs/heads/website-button-update [created] bb2f8db41 http://git-wip-us.apache.org/repos/asf/usergrid/blob/bb2f8db4/website/tmp/dependencies -- diff --git a/website/tmp/dependencies b/website/tmp/dependencies deleted file mode 100644 index 8ddff40..000 --- a/website/tmp/dependencies +++ /dev/null @@ -1,10 +0,0 @@ -{: data{: -edges[[iQiF[iQiN[iUi[iVi[iViF[iViN[iWi[iWiF[iWiN: vertices[X0[: itemI"/bootstrap/bootstrap/:ET[;I"/community/; T[;I"/css/bootflat-extensions/; T[;I"/css/bootflat-square/; T[;I"/css/bootflat/;T[;I"/css/font-awesome/; T[;I"/css/usergrid-site/; T[;I"/favicon/; T[;I"#/font/fontawesome-webfont-eot/; T[;I"#/font/fontawesome-webfont-svg/; T[;I"#/font/fontawesome-webfont-ttf/; T[;I"$/font/fontawesome-webfont-woff/; T[;I"/font/FontAwesome/; T[;I"/img/alberto/; T[;I"/img/alex/; T[;I""/img/apache_usergrid_favicon/; T[;I"%/img/apache_usergrid_logo_white/; T[;I"+/img/apache_usergrid_logo_white_small/; T[;I"/img/check_flat/default/; T[;I"/img/dave/;T[;I" /img/ed/; T[;I"/img/egg-logo/;T[;I"/img/github/; T[;I"/img/grey/;T[;I"/img/intellij/;T[;I"/img/jeff/; T[;I"/img/michael_r/; T[;I"/img/miked/; T[;I"/img/nate/; T[;I"/img/rod/; T[;I"/img/scott/; T[;I"/img/shawn/; T[;I"/img/stliu/; T[;I"/img/strong/; T[;I"/img/structure101/;T[;I"/img/sungju/; T[;I"/img/tim/; T[;I"/img/todd/;T[;I"/img/usergrid-logo/; T[;I"/img/usergrid/;T[;I"/img/usergrid_160/; T[;I"/img/usergrid_200/;T[;I"/img/usergrid_300/; T[;I"#/img/usergrid_300_transparent/;T[;I"/img/usergrid_400/; T[;I"/img/usergrid_800/;T[;I"/img/usergrid_card/; T[;I"/img/usergrid_logo/; T[;I"/img/usergrid_logo_205_50/; T[;I"/img/usergrid_logo_260_50/;T[;I"/img/usergrid_logo_720/; T[;I"/img/usergrid_logo_720p/; T[;I" /img/usergrid_logo_900_200/; T[;I"/img/usergrid_logo_white/; T[;I"/img/usergrid_profile_128/; T[;I"/img/usergrid_profile_256/; T[;I"%/img/usergrid_profile_256_white/; T[;I"'/img/usergrid_profile_512_margins/; T[;I"$/img/usergrid_profile_64_white/; T[;I"&/img/usergrid_profile_background/; T[;I"!/img/usergrid_screencast_bg/; T[;I"/img/usergrid_small_100/; T[;I"/img/userg rid_wiki/;T[;I"/img/yourkit/; T[;I"/; T[;I"/js/bootstrap/;T[;I"/js/head/; T[;I"/js/html5shiv/;T[;I"/js/jquery-1/; T[;I"/js/jquery/; T[;I"/js/respond/; T[;I"/js/usergrid-site/;T[;I"/releases/; T[;I"/static/github-btn/; T[:layouto:Nanoc::Identifier: -@type:legacy:@stringI"/community/; T[; -o;;; ;I"/default/;T[; -o;;; ;I"/docs/; T[; -o;;; ;I" /footer/; T[; -o;;; ;I" /header/; T[; -@�[; -@�[; -@�:versioni \ No newline at end of file
usergrid git commit: Fixes incorrect default property
Repository: usergrid Updated Branches: refs/heads/release 8ba0ef01a -> 784fe51ca Fixes incorrect default property Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/784fe51c Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/784fe51c Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/784fe51c Branch: refs/heads/release Commit: 784fe51ca9593f813294865e198d1fd07b796aee Parents: 8ba0ef0 Author: Todd Nine Authored: Tue Nov 17 11:27:27 2015 -0700 Committer: Todd Nine Committed: Tue Nov 17 11:27:27 2015 -0700 -- .../main/java/org/apache/usergrid/persistence/graph/GraphFig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/784fe51c/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 b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/GraphFig.java index ecb5b19..5968097 100644 --- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/GraphFig.java +++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/GraphFig.java @@ -118,7 +118,7 @@ public interface GraphFig extends GuicyFig { @Key(SHARD_CACHE_TIMEOUT) long getShardCacheTimeout(); -@Default("6") +@Default("9") @Key(SHARD_MIN_DELTA) long getShardMinDelta();
usergrid git commit: Fixes the 2.5 checks in the test
Repository: usergrid Updated Branches: refs/heads/release a33f616be -> 8ba0ef01a Fixes the 2.5 checks in the test Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/8ba0ef01 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/8ba0ef01 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/8ba0ef01 Branch: refs/heads/release Commit: 8ba0ef01a90ac1352ea56203f07c042d73e24306 Parents: a33f616 Author: Todd Nine Authored: Tue Nov 17 11:19:06 2015 -0700 Committer: Todd Nine Committed: Tue Nov 17 11:19:06 2015 -0700 -- .../serialization/impl/shard/NodeShardAllocationTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/8ba0ef01/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/NodeShardAllocationTest.java -- diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/NodeShardAllocationTest.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/NodeShardAllocationTest.java index bc364cc..6671dec 100644 --- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/NodeShardAllocationTest.java +++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/NodeShardAllocationTest.java @@ -84,7 +84,7 @@ public class NodeShardAllocationTest { final long timeout = 3; when( graphFig.getShardCacheTimeout() ).thenReturn( timeout ); -when( graphFig.getShardMinDelta() ).thenReturn( timeout * 2 ); +when( graphFig.getShardMinDelta() ).thenReturn( ( long ) (timeout * 2.5) ); } @@ -111,7 +111,7 @@ public class NodeShardAllocationTest { when( timeService.getCurrentTime() ).thenReturn( timeservicetime ); -final long expected = timeservicetime - 2 * graphFig.getShardCacheTimeout(); +final long expected = ( long ) (timeservicetime - 2.5 * graphFig.getShardCacheTimeout()); final long returned = approximation.getMinTime(); @@ -722,7 +722,7 @@ public class NodeShardAllocationTest { //now test something that passes. -final long minDelta = cacheTimeout * 2; +final long minDelta = ( long ) (cacheTimeout * 2.5); when( graphFig.getShardMinDelta() ).thenReturn( minDelta );
usergrid git commit: Adds more logging
Repository: usergrid Updated Branches: refs/heads/release 06c9c1012 -> a33f616be Adds more logging Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/a33f616b Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/a33f616b Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/a33f616b Branch: refs/heads/release Commit: a33f616beed86f475999a5904520776494891968 Parents: 06c9c10 Author: Todd Nine Authored: Tue Nov 17 11:17:07 2015 -0700 Committer: Todd Nine Committed: Tue Nov 17 11:17:07 2015 -0700 -- .../impl/shard/impl/NodeShardAllocationImpl.java| 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/a33f616b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java -- diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java index 0cc12b6..d52f807 100644 --- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java +++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java @@ -138,11 +138,13 @@ public class NodeShardAllocationImpl implements NodeShardAllocation { * Nothing to do, it's been created very recently, we don't create a new one */ if ( shardEntryGroup.isCompactionPending() ) { +LOG.trace( "Shard entry group {} is compacting, not auditing", shardEntryGroup ); return false; } //we can't allocate, we have more than 1 write shard currently. We need to compact first if ( shardEntryGroup.entrySize() != 1 ) { +LOG.trace( "Shard entry group {} does not have 1 entry, not allocating", shardEntryGroup ); return false; } @@ -151,9 +153,12 @@ public class NodeShardAllocationImpl implements NodeShardAllocation { * Check the min shard in our system */ final Shard shard = shardEntryGroup.getMinShard(); +final long minTime = getMinTime(); -if ( shard.getCreatedTime() >= getMinTime() ) { + +if ( shard.getCreatedTime() >= minTime ) { +LOG.trace( "Shard entry group {} and shard {} is before the minimum created time of {}. Not allocating.does not have 1 entry, not allocating", shardEntryGroup, shard, minTime ); return false; } @@ -253,7 +258,7 @@ public class NodeShardAllocationImpl implements NodeShardAllocation { @Override public long getMinTime() { -final long minimumAllowed = 2 * graphFig.getShardCacheTimeout(); +final long minimumAllowed = ( long ) (2.5 * graphFig.getShardCacheTimeout()); final long minDelta = graphFig.getShardMinDelta();
usergrid git commit: Fixes log statement
Repository: usergrid Updated Branches: refs/heads/release 4f00a437e -> 06c9c1012 Fixes log statement Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/06c9c101 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/06c9c101 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/06c9c101 Branch: refs/heads/release Commit: 06c9c101242c125e4832f89bf6e6884174cb782e Parents: 4f00a43 Author: Todd Nine Authored: Tue Nov 17 10:54:52 2015 -0700 Committer: Todd Nine Committed: Tue Nov 17 10:54:52 2015 -0700 -- .../serialization/impl/shard/impl/ShardGroupCompactionImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/06c9c101/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupCompactionImpl.java -- diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupCompactionImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupCompactionImpl.java index 21f2d72..7dd0521 100644 --- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupCompactionImpl.java +++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupCompactionImpl.java @@ -307,8 +307,9 @@ public class ShardGroupCompactionImpl implements ShardGroupCompaction { countAudits.getAndIncrement(); if(LOG.isDebugEnabled()) { -LOG.debug("Auditing shard group. count is {} ", countAudits.get()); +LOG.debug("Auditing shard group {}. count is {} ", group, countAudits.get()); } + /** * Try and submit. During back pressure, we may not be able to submit, that's ok. Better to drop than to * hose the system
usergrid git commit: Fixes logging statement
Repository: usergrid Updated Branches: refs/heads/release c44dfdabf -> 4f00a437e Fixes logging statement Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/4f00a437 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/4f00a437 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/4f00a437 Branch: refs/heads/release Commit: 4f00a437e556d8c352107a58767fb19590b62875 Parents: c44dfda Author: Todd Nine Authored: Tue Nov 17 10:06:54 2015 -0700 Committer: Todd Nine Committed: Tue Nov 17 10:06:54 2015 -0700 -- .../serialization/impl/shard/impl/NodeShardAllocationImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/4f00a437/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java -- diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java index 374d373..0cc12b6 100644 --- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java +++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/NodeShardAllocationImpl.java @@ -226,7 +226,7 @@ public class NodeShardAllocationImpl implements NodeShardAllocation { * Sanity check in case we audit before we have a full shard */ if ( marked == null ) { -LOG.trace( "Shard {} in shard group {} not full, not splitting", shardEntryGroup ); +LOG.trace( "Shard {} in shard group {} not full, not splitting", shard, shardEntryGroup ); return false; }
usergrid git commit: Added logging to deletion task.
Repository: usergrid Updated Branches: refs/heads/release ad12f3599 -> c44dfdabf Added logging to deletion task. Updated consistency test to have 2 read workers. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c44dfdab Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c44dfdab Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c44dfdab Branch: refs/heads/release Commit: c44dfdabfc23db4e0d2eed739d19f865c58288cd Parents: ad12f35 Author: Todd Nine Authored: Tue Nov 17 09:07:34 2015 -0700 Committer: Todd Nine Committed: Tue Nov 17 09:07:34 2015 -0700 -- .../impl/shard/impl/ShardGroupDeletionImpl.java | 9 +++-- .../graph/GraphManagerShardConsistencyIT.java | 40 +++- 2 files changed, 28 insertions(+), 21 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/c44dfdab/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java -- diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java index c460a5d..373d42b 100644 --- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java +++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java @@ -138,6 +138,7 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion { return DeleteResult.COMPACTION_PENDING; } +logger.trace( "Shard group {} has no compaction pending", shardEntryGroup ); final long currentTime = timeService.getCurrentTime(); @@ -146,6 +147,8 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion { return DeleteResult.TOO_NEW; } +logger.trace( "Shard group {} has passed the delta timeout at {}", shardEntryGroup, currentTime ); + /** * We have edges, and therefore cannot delete them */ @@ -156,6 +159,9 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion { } +logger.trace( "Shard group {} has no edges continuing to delete", shardEntryGroup, currentTime ); + + //now we can proceed based on the shard meta state and we don't have any edge DeleteResult result = DeleteResult.NO_OP; @@ -178,9 +184,6 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion { } -logger.info( "Deleting shard {} at time {} ", shard, timeService.getCurrentTime() ); - - final MutationBatch shardRemovalMutation = edgeShardSerialization.removeShardMeta( applicationScope, shard, directedEdgeMeta ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/c44dfdab/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java -- diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java index a9f9cb7..b903c6c 100644 --- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java +++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerShardConsistencyIT.java @@ -266,31 +266,35 @@ public class GraphManagerShardConsistencyIT { final Meter readMeter = registry.meter( "readThroughput" ); -/** - * Start reading continuously while we migrate data to ensure our view is always correct - */ -final ListenableFuture future = -executor.submit( new ReadWorker( gmf, generator, writeCount, readMeter ) ); - final List failures = new ArrayList<>(); +for(int i = 0; i < 2; i ++) { -//add the future -Futures.addCallback( future, new FutureCallback() { -@Override -public void onSuccess( @Nullable final Long result ) { -log.info( "Successfully ran the read, re-running" ); +/** + * Start reading continuously while we migrate data to ensure our view is always correct + */ +final ListenableFuture future = executor.submit( new ReadWo
usergrid git commit: Added additional logging statement
Repository: usergrid Updated Branches: refs/heads/release 3a6fd9444 -> ad12f3599 Added additional logging statement Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/ad12f359 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/ad12f359 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/ad12f359 Branch: refs/heads/release Commit: ad12f3599d2d66e799f6c3294f6e33d8e1c5b4d4 Parents: 3a6fd94 Author: Todd Nine Authored: Tue Nov 17 08:30:50 2015 -0700 Committer: Todd Nine Committed: Tue Nov 17 08:30:50 2015 -0700 -- .../serialization/impl/shard/impl/ShardGroupDeletionImpl.java | 3 +++ 1 file changed, 3 insertions(+) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/ad12f359/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java -- diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java index d289f30..c460a5d 100644 --- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java +++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java @@ -178,6 +178,9 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion { } +logger.info( "Deleting shard {} at time {} ", shard, timeService.getCurrentTime() ); + + final MutationBatch shardRemovalMutation = edgeShardSerialization.removeShardMeta( applicationScope, shard, directedEdgeMeta );
usergrid git commit: Added additional test for isNew in shardEntryGroup
Repository: usergrid Updated Branches: refs/heads/release 2b2793ffe -> 3a6fd9444 Added additional test for isNew in shardEntryGroup Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/3a6fd944 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/3a6fd944 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/3a6fd944 Branch: refs/heads/release Commit: 3a6fd9444f7687f495f2d13fea2b6bb8ccc5d0e5 Parents: 2b2793f Author: Todd Nine Authored: Mon Nov 16 19:08:04 2015 -0700 Committer: Todd Nine Committed: Mon Nov 16 19:08:04 2015 -0700 -- .../impl/shard/ShardEntryGroupTest.java | 31 1 file changed, 31 insertions(+) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/3a6fd944/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/ShardEntryGroupTest.java -- diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/ShardEntryGroupTest.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/ShardEntryGroupTest.java index 28d42d2..2f0dfaa 100644 --- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/ShardEntryGroupTest.java +++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/ShardEntryGroupTest.java @@ -434,6 +434,37 @@ public class ShardEntryGroupTest { } + + +@Test +public void testIsNew() { +//set with no shard + +final long delta = 1; + +//created at 1 +final Shard firstShard = new Shard( 1, 1, true ); + +final Shard secondShard = new Shard( 1, 10001, true ); + +final ShardEntryGroup shardGroup = new ShardEntryGroup( delta ); + +shardGroup.addShard( secondShard ); +shardGroup.addShard( firstShard ); + +final boolean resultCreateTime = shardGroup.isNew( secondShard.getCreatedTime() ); + +assertTrue( "This is a new shard", resultCreateTime ); + +final boolean resultEqualToDelta = shardGroup.isNew( secondShard.getCreatedTime() + delta ); + +assertTrue( "This is a new shard", resultEqualToDelta ); + + +final boolean greaterThan = shardGroup.isNew( secondShard.getCreatedTime() + delta + 1 ); + +assertFalse( "This is not a new shard", greaterThan ); +} }
usergrid git commit: Added test to prove shard ordering.
Repository: usergrid Updated Branches: refs/heads/release afffdf278 -> 2b2793ffe Added test to prove shard ordering. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/2b2793ff Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/2b2793ff Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/2b2793ff Branch: refs/heads/release Commit: 2b2793ffeddb0836ced383b13c25d8f86432b632 Parents: afffdf2 Author: Todd Nine Authored: Mon Nov 16 19:00:20 2015 -0700 Committer: Todd Nine Committed: Mon Nov 16 19:00:20 2015 -0700 -- .../serialization/impl/shard/ShardTest.java | 65 1 file changed, 65 insertions(+) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/2b2793ff/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/ShardTest.java -- diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/ShardTest.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/ShardTest.java new file mode 100644 index 000..478873f --- /dev/null +++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/ShardTest.java @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.usergrid.persistence.graph.serialization.impl.shard; + + +import org.junit.Test; + +import static org.junit.Assert.assertTrue; + + +public class ShardTest { + +@Test +public void testShardIndexOrder() { +final Shard first = new Shard( 1, 1, false ); + + +final Shard second = new Shard( 2, 1, false ); + +assertTrue( first.compareTo( second ) < 0 ); + +assertTrue( second.compareTo( first ) > 0 ); +} + + +@Test +public void testShardTimestapOrder() { +final Shard first = new Shard( 1, 1, false ); + + +final Shard second = new Shard( 1, 2, false ); + +assertTrue( first.compareTo( second ) < 0 ); + +assertTrue( second.compareTo( first ) > 0 ); +} + + +@Test +public void testShardCompactedOrder() { +final Shard first = new Shard( 1, 1, false ); + + +final Shard second = new Shard( 1, 1, true ); + +assertTrue( first.compareTo( second ) < 0 ); + +assertTrue( second.compareTo( first ) > 0 ); +} +}
[2/2] usergrid git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/usergrid
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/usergrid Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/044b1496 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/044b1496 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/044b1496 Branch: refs/heads/master Commit: 044b14963bd00ba02c63447b9658978b98bba1f6 Parents: 91a4911 27de65c Author: Todd Nine Authored: Fri Nov 13 14:11:25 2015 -0700 Committer: Todd Nine Committed: Fri Nov 13 14:11:25 2015 -0700 -- docs/data-queries/operators-and-types.md | 25 - docs/push.tgz| Bin 1651449 -> 0 bytes 2 files changed, 20 insertions(+), 5 deletions(-) --
[1/2] usergrid git commit: Removed unused file and unused variable
Repository: usergrid Updated Branches: refs/heads/master 27de65cec -> 044b14963 Removed unused file and unused variable Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/91a49115 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/91a49115 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/91a49115 Branch: refs/heads/master Commit: 91a49115501e09fbf84d7d529281c0097e980d52 Parents: c3c2818 Author: Todd Nine Authored: Fri Nov 13 14:10:54 2015 -0700 Committer: Todd Nine Committed: Fri Nov 13 14:10:54 2015 -0700 -- .../pipeline/PipelineModule.java| 2 +- .../pipeline/PipelineOperations.java| 30 .../read/search/SearchCollectionFilter.java | 2 -- 3 files changed, 1 insertion(+), 33 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/91a49115/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/PipelineModule.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/PipelineModule.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/PipelineModule.java index 93df066..66265be 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/PipelineModule.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/PipelineModule.java @@ -37,7 +37,7 @@ public class PipelineModule extends AbstractModule { //Use Guice to create the builder since we don't really need to do anything //other than DI when creating the filters - install( new FactoryModuleBuilder().build( FilterFactory.class ) ); +install( new FactoryModuleBuilder().build( FilterFactory.class ) ); install( new FactoryModuleBuilder().build( PipelineBuilderFactory.class ) ); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/91a49115/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/PipelineOperations.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/PipelineOperations.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/PipelineOperations.java deleted file mode 100644 index 3929a97..000 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/PipelineOperations.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.apache.usergrid.corepersistence.pipeline; - - -public interface PipelineOperations { - -/** - * Add the pipeline operation to the set of operations - * @param po - */ -void add( PipelineOperation po ); -} http://git-wip-us.apache.org/repos/asf/usergrid/blob/91a49115/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/search/SearchCollectionFilter.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/search/SearchCollectionFilter.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/search/SearchCollectionFilter.java index f95cb88..4fc6179 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/search/SearchCollectionFilter.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/search/SearchCollectionFilter.java @@ -35,7 +35,6 @@ import static org.apache.usergrid.corepersistence.util.CpNamingUtils.createColle public class SearchCollectionFilter extends AbstractElasticSearchFilter { -private final IndexLocationStrategyFactory indexLocationStrategyFactory; private final String collectionName; private final String entityType; @@ -55,7 +54,6 @@ public class SearchCollectionFilter extends AbstractElasticSearchFilter {
[2/2] usergrid git commit: Merge branch 'refs/heads/2.1-release'
Merge branch 'refs/heads/2.1-release' Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c3c2818e Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c3c2818e Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c3c2818e Branch: refs/heads/master Commit: c3c2818e27cb4ebe19257e7539923eef709efd85 Parents: 14dd48d d4d3ed3 Author: Todd Nine Authored: Thu Nov 12 16:28:04 2015 -0700 Committer: Todd Nine Committed: Thu Nov 12 16:28:04 2015 -0700 -- .../corepersistence/migration/DeDupConnectionDataMigration.java | 2 +- .../persistence/collection/impl/EntityCollectionManagerImpl.java | 3 +-- .../persistence/collection/mvcc/stage/write/WriteCommit.java | 1 - .../persistence/collection/mvcc/stage/write/WriteStart.java | 2 -- .../serialization/impl/shard/impl/NodeShardAllocationImpl.java| 1 - .../impl/shard/impl/ShardedEdgeSerializationImpl.java | 3 +-- .../usergrid/persistence/graph/impl/NodeDeleteListenerTest.java | 1 - .../index/migration/EsIndexMappingMigrationPlugin.java| 2 +- 8 files changed, 4 insertions(+), 11 deletions(-) --
[1/2] usergrid git commit: Addresses incorrect usages of .subscribe() and removed obsolete TODOs
Repository: usergrid Updated Branches: refs/heads/master 14dd48d39 -> c3c2818e2 Addresses incorrect usages of .subscribe() and removed obsolete TODOs Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/d4d3ed3e Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/d4d3ed3e Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/d4d3ed3e Branch: refs/heads/master Commit: d4d3ed3ed7e1e1da501b7b886f890c0b5cedffdf Parents: 6f61b05 Author: Todd Nine Authored: Thu Nov 12 16:27:27 2015 -0700 Committer: Todd Nine Committed: Thu Nov 12 16:27:27 2015 -0700 -- .../corepersistence/migration/DeDupConnectionDataMigration.java | 2 +- .../persistence/collection/impl/EntityCollectionManagerImpl.java | 3 +-- .../persistence/collection/mvcc/stage/write/WriteCommit.java | 1 - .../persistence/collection/mvcc/stage/write/WriteStart.java | 2 -- .../serialization/impl/shard/impl/NodeShardAllocationImpl.java| 1 - .../impl/shard/impl/ShardedEdgeSerializationImpl.java | 3 +-- .../usergrid/persistence/graph/impl/NodeDeleteListenerTest.java | 1 - .../index/migration/EsIndexMappingMigrationPlugin.java| 2 +- 8 files changed, 4 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java index 77deac8..fc0f8c3 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java @@ -72,7 +72,7 @@ public class DeDupConnectionDataMigration implements DataMigration { } ).doOnNext( total -> { logger.info( "Completed de-duping {} edges", total ); observer.complete(); -} ).subscribe(); //want this to run through all records +} ).toBlocking().lastOrDefault( null ); //want this to run through all records return migrationVersion; http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java -- diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java index 8079ad9..ce30568 100644 --- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java +++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java @@ -84,8 +84,7 @@ import rx.functions.Action0; /** - * Simple implementation. Should perform writes, delete and load. TODO: maybe refactor the stage operations into - * their own classes for clarity and organization? + * Simple implementation. Should perform writes, delete and load. */ public class EntityCollectionManagerImpl implements EntityCollectionManager { http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java -- diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java index fe3f9a9..21570ec 100644 --- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java +++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java @@ -126,7 +126,6 @@ public class WriteCommit implements Func1, Collect } try { -// TODO: Async execution logMutation.execute(); } catch ( ConnectionException e ) { http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/Wri
[2/3] usergrid git commit: Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release
Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/6f61b05d Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/6f61b05d Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/6f61b05d Branch: refs/heads/2.1-release Commit: 6f61b05dd0531b54637be7e9c407f3058aa98006 Parents: a693643 63f49ba Author: Todd Nine Authored: Thu Nov 12 14:21:54 2015 -0700 Committer: Todd Nine Committed: Thu Nov 12 14:21:54 2015 -0700 -- --
[1/3] usergrid git commit: Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release
Repository: usergrid Updated Branches: refs/heads/2.1-release 63f49bac5 -> d4d3ed3ed Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/a6936431 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/a6936431 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/a6936431 Branch: refs/heads/2.1-release Commit: a6936431c98e05ec670aa9e4fdfacc63dae6544c Parents: f840623 b895643 Author: Todd Nine Authored: Thu Nov 12 14:17:06 2015 -0700 Committer: Todd Nine Committed: Thu Nov 12 14:17:06 2015 -0700 -- .../asyncevents/AmazonAsyncEventService.java| 38 +--- .../index/impl/DeIndexOperation.java| 4 +-- .../persistence/index/impl/IndexingUtils.java | 21 +++ .../index/impl/IndexingUtilsTest.java | 36 +++ 4 files changed, 92 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/a6936431/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java --
[3/3] usergrid git commit: Addresses incorrect usages of .subscribe() and removed obsolete TODOs
Addresses incorrect usages of .subscribe() and removed obsolete TODOs Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/d4d3ed3e Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/d4d3ed3e Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/d4d3ed3e Branch: refs/heads/2.1-release Commit: d4d3ed3ed7e1e1da501b7b886f890c0b5cedffdf Parents: 6f61b05 Author: Todd Nine Authored: Thu Nov 12 16:27:27 2015 -0700 Committer: Todd Nine Committed: Thu Nov 12 16:27:27 2015 -0700 -- .../corepersistence/migration/DeDupConnectionDataMigration.java | 2 +- .../persistence/collection/impl/EntityCollectionManagerImpl.java | 3 +-- .../persistence/collection/mvcc/stage/write/WriteCommit.java | 1 - .../persistence/collection/mvcc/stage/write/WriteStart.java | 2 -- .../serialization/impl/shard/impl/NodeShardAllocationImpl.java| 1 - .../impl/shard/impl/ShardedEdgeSerializationImpl.java | 3 +-- .../usergrid/persistence/graph/impl/NodeDeleteListenerTest.java | 1 - .../index/migration/EsIndexMappingMigrationPlugin.java| 2 +- 8 files changed, 4 insertions(+), 11 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java index 77deac8..fc0f8c3 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/migration/DeDupConnectionDataMigration.java @@ -72,7 +72,7 @@ public class DeDupConnectionDataMigration implements DataMigration { } ).doOnNext( total -> { logger.info( "Completed de-duping {} edges", total ); observer.complete(); -} ).subscribe(); //want this to run through all records +} ).toBlocking().lastOrDefault( null ); //want this to run through all records return migrationVersion; http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java -- diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java index 8079ad9..ce30568 100644 --- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java +++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java @@ -84,8 +84,7 @@ import rx.functions.Action0; /** - * Simple implementation. Should perform writes, delete and load. TODO: maybe refactor the stage operations into - * their own classes for clarity and organization? + * Simple implementation. Should perform writes, delete and load. */ public class EntityCollectionManagerImpl implements EntityCollectionManager { http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java -- diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java index fe3f9a9..21570ec 100644 --- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java +++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteCommit.java @@ -126,7 +126,6 @@ public class WriteCommit implements Func1, Collect } try { -// TODO: Async execution logMutation.execute(); } catch ( ConnectionException e ) { http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java --
[07/15] usergrid git commit: Address fixes found during review
Address fixes found during review Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/f840623d Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/f840623d Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/f840623d Branch: refs/heads/master Commit: f840623df82131429cfd564e0ad4fdeac356a93d Parents: 7725d90 Author: Todd Nine Authored: Thu Nov 12 11:59:53 2015 -0700 Committer: Todd Nine Committed: Thu Nov 12 11:59:53 2015 -0700 -- .../usergrid/corepersistence/CoreModule.java| 6 +++--- .../service/ServiceSchedulerFig.java| 22 ++-- .../usergrid/services/AbstractService.java | 2 +- 3 files changed, 24 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/f840623d/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java index 650bb4d..5d2d8dc 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java @@ -240,10 +240,10 @@ public class CoreModule extends AbstractModule { @Inject @ResponseImportTasks @Singleton -public RxTaskScheduler getImportRepairScheduler( final AsyncEventsSchedulerFig asyncEventsSchedulerFig ) { +public RxTaskScheduler getImportRepairScheduler( final ServiceSchedulerFig serviceSchedulerFig ) { -final String poolName = asyncEventsSchedulerFig.getImportSchedulerName(); -final int threadCount = asyncEventsSchedulerFig.getMaxImportThreads(); +final String poolName = serviceSchedulerFig.getRepairPoolName(); +final int threadCount = serviceSchedulerFig.getImportThreadPoolSize(); final ThreadPoolExecutor executor = TaskExecutorFactory http://git-wip-us.apache.org/repos/asf/usergrid/blob/f840623d/stack/core/src/main/java/org/apache/usergrid/corepersistence/service/ServiceSchedulerFig.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/service/ServiceSchedulerFig.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/service/ServiceSchedulerFig.java index ddaa01c..e585ee3 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/service/ServiceSchedulerFig.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/service/ServiceSchedulerFig.java @@ -37,10 +37,28 @@ public interface ServiceSchedulerFig extends GuicyFig { String SERVICE_IMPORT_THREADS = "service.import.threads"; +String SERVICE_IMPORT_POOL_NAME = "service.import.name"; -@Default("20") +String SERVICE_IMPORT_CONCURRENCY = "service.import.concurrency"; + + + + +@Default( "Usergrid-Import-Pool" ) +@Key( SERVICE_IMPORT_POOL_NAME ) +String getRepairPoolName(); + + + +@Default("100") @Key( SERVICE_IMPORT_THREADS) -int getImportThreads(); +int getImportThreadPoolSize(); + + + +@Default("20") +@Key( SERVICE_IMPORT_CONCURRENCY) +int getImportConcurrency(); http://git-wip-us.apache.org/repos/asf/usergrid/blob/f840623d/stack/services/src/main/java/org/apache/usergrid/services/AbstractService.java -- diff --git a/stack/services/src/main/java/org/apache/usergrid/services/AbstractService.java b/stack/services/src/main/java/org/apache/usergrid/services/AbstractService.java index 85c973e..3887f92 100644 --- a/stack/services/src/main/java/org/apache/usergrid/services/AbstractService.java +++ b/stack/services/src/main/java/org/apache/usergrid/services/AbstractService.java @@ -488,7 +488,7 @@ public abstract class AbstractService implements Service { throw new RuntimeException(e); } }).subscribeOn(rxScheduler); -}, rxSchedulerFig.getImportThreads()); +}, rxSchedulerFig.getImportConcurrency()); ObservableTimer.time(tuplesObservable, entitiesParallelGetTimer).toBlocking().lastOrDefault(null); }
[15/15] usergrid git commit: Merge branch 'refs/heads/2.1-release'
Merge branch 'refs/heads/2.1-release' Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/14dd48d3 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/14dd48d3 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/14dd48d3 Branch: refs/heads/master Commit: 14dd48d39d37abf97092264003942dcb73b3ccdf Parents: 67ab244 6f61b05 Author: Todd Nine Authored: Thu Nov 12 15:14:44 2015 -0700 Committer: Todd Nine Committed: Thu Nov 12 15:14:44 2015 -0700 -- .../usergrid/corepersistence/CoreModule.java| 132 ++- .../asyncevents/AmazonAsyncEventService.java| 39 +- .../asyncevents/AsyncEventsSchedulerFig.java| 94 + .../asyncevents/AsyncIndexProvider.java | 2 +- .../asyncevents/EventExecutionScheduler.java| 37 ++ .../traverse/ReadGraphCollectionFilter.java | 3 +- .../traverse/ReadGraphConnectionFilter.java | 3 +- .../corepersistence/rx/impl/AsyncRepair.java| 38 ++ .../rx/impl/ResponseImportTasks.java| 38 ++ .../service/ServiceSchedulerFig.java| 66 ++ .../collection/guice/CollectionModule.java | 32 + .../guice/CollectionTaskExecutor.java | 35 - .../EntityCollectionManagerFactoryImpl.java | 5 +- .../impl/EntityCollectionManagerImpl.java | 17 ++- .../mvcc/stage/delete/UniqueCleanup.java| 12 +- .../mvcc/stage/write/WriteCommit.java | 10 +- .../scheduler/CollectionExecutorScheduler.java | 52 .../scheduler/CollectionSchedulerFig.java | 53 .../collection/EntityCollectionManagerIT.java | 68 ++ .../mvcc/stage/delete/MarkCommitTest.java | 2 +- .../mvcc/stage/write/WriteCommitTest.java | 2 +- .../core/executor/TaskExecutorFactory.java | 108 +++ .../persistence/core/guice/CommonModule.java| 25 ++-- .../persistence/core/rx/RxSchedulerFig.java | 71 -- .../core/rx/RxTaskSchedulerImpl.java| 81 +--- .../index/impl/DeIndexOperation.java| 4 +- .../persistence/index/impl/IndexingUtils.java | 21 +++ .../index/impl/IndexingUtilsTest.java | 36 + .../usergrid/services/AbstractService.java | 13 +- 29 files changed, 815 insertions(+), 284 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/14dd48d3/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java -- diff --cc stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java index ae69b6f,5d2d8dc..aacf6e9 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java @@@ -16,7 -16,8 +16,9 @@@ package org.apache.usergrid.corepersistence; +import org.apache.usergrid.persistence.cache.guice.CacheModule; + import java.util.concurrent.ThreadPoolExecutor; + import org.safehaus.guicyfig.GuicyFigModule; import org.apache.usergrid.corepersistence.asyncevents.AsyncEventService; http://git-wip-us.apache.org/repos/asf/usergrid/blob/14dd48d3/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/14dd48d3/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncIndexProvider.java -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/14dd48d3/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java -- diff --cc stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java index 90840af,179b3c4..adaed0f --- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java +++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java @@@ -223,44 -221,46 +223,61 @@@ public class IndexingUtils } -/** - * Parse the document id into a candidate result - */ -public static CandidateResult parseIndexDocId( final String documentId ) { +public static CandidateResult parseIndexDocId( final SearchHit hit ) { +return parseIndexDocId(hit.getId()); +} + +public static CandidateResult parseIndexDocId( final SearchHit hit, boolean isGeo ) { +final String documentId = hit.getId(); +final double distance = isGeo ?
[14/15] usergrid git commit: Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release
Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/6f61b05d Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/6f61b05d Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/6f61b05d Branch: refs/heads/master Commit: 6f61b05dd0531b54637be7e9c407f3058aa98006 Parents: a693643 63f49ba Author: Todd Nine Authored: Thu Nov 12 14:21:54 2015 -0700 Committer: Todd Nine Committed: Thu Nov 12 14:21:54 2015 -0700 -- --
[02/15] usergrid git commit: Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release
Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/68d38f49 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/68d38f49 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/68d38f49 Branch: refs/heads/master Commit: 68d38f496e8aeb6481cd6ea620c313fe46c40127 Parents: 419c013 c3a5bc4 Author: Todd Nine Authored: Fri Nov 6 20:30:30 2015 -0700 Committer: Todd Nine Committed: Fri Nov 6 20:30:30 2015 -0700 -- .../java/org/apache/usergrid/corepersistence/index/RxTest.java | 5 +++-- .../org/apache/usergrid/services/AbstractCollectionService.java | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) --
[04/15] usergrid git commit: Refactored schedulers to have separate schedulers for different tasks
Refactored schedulers to have separate schedulers for different tasks Also fixes a bug with unique values. Values are now validated on read to ensure that unique value is still valid. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/0e1f0e64 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/0e1f0e64 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/0e1f0e64 Branch: refs/heads/master Commit: 0e1f0e64176ce13b579762c42d8358eaa7543f20 Parents: 7da99c7 Author: Todd Nine Authored: Wed Nov 11 16:55:00 2015 -0700 Committer: Todd Nine Committed: Thu Nov 12 11:27:16 2015 -0700 -- .../usergrid/corepersistence/CoreModule.java| 130 ++- .../asyncevents/AmazonAsyncEventService.java| 1 + .../asyncevents/AsyncEventsSchedulerFig.java| 94 ++ .../asyncevents/AsyncIndexProvider.java | 2 +- .../asyncevents/EventExecutionScheduler.java| 37 ++ .../traverse/ReadGraphCollectionFilter.java | 3 +- .../traverse/ReadGraphConnectionFilter.java | 3 +- .../corepersistence/rx/impl/AsyncRepair.java| 38 ++ .../corepersistence/rx/impl/ImportRepair.java | 38 ++ .../service/ServiceSchedulerFig.java| 48 +++ .../collection/guice/CollectionModule.java | 30 + .../guice/CollectionTaskExecutor.java | 35 - .../EntityCollectionManagerFactoryImpl.java | 5 +- .../impl/EntityCollectionManagerImpl.java | 16 ++- .../mvcc/stage/write/WriteCommit.java | 4 +- .../scheduler/CollectionExecutorScheduler.java | 52 .../scheduler/CollectionSchedulerFig.java | 53 .../collection/EntityCollectionManagerIT.java | 53 +--- .../core/executor/TaskExecutorFactory.java | 101 ++ .../persistence/core/guice/CommonModule.java| 25 ++-- .../persistence/core/rx/RxSchedulerFig.java | 71 -- .../core/rx/RxTaskSchedulerImpl.java| 81 +--- .../usergrid/services/AbstractService.java | 12 +- 23 files changed, 639 insertions(+), 293 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java index 959edec..09db151 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java @@ -16,12 +16,16 @@ package org.apache.usergrid.corepersistence; +import java.util.concurrent.ThreadPoolExecutor; + import org.safehaus.guicyfig.GuicyFigModule; import org.apache.usergrid.corepersistence.asyncevents.AsyncEventService; +import org.apache.usergrid.corepersistence.asyncevents.AsyncEventsSchedulerFig; import org.apache.usergrid.corepersistence.asyncevents.AsyncIndexProvider; import org.apache.usergrid.corepersistence.asyncevents.EventBuilder; import org.apache.usergrid.corepersistence.asyncevents.EventBuilderImpl; +import org.apache.usergrid.corepersistence.asyncevents.EventExecutionScheduler; import org.apache.usergrid.corepersistence.index.ApplicationIndexBucketLocator; import org.apache.usergrid.corepersistence.index.CoreIndexFig; import org.apache.usergrid.corepersistence.index.IndexLocationStrategyFactory; @@ -42,6 +46,8 @@ import org.apache.usergrid.corepersistence.rx.impl.AllEntitiesInSystemImpl; import org.apache.usergrid.corepersistence.rx.impl.AllEntityIdsObservable; import org.apache.usergrid.corepersistence.rx.impl.AllEntityIdsObservableImpl; import org.apache.usergrid.corepersistence.rx.impl.AllNodesInGraphImpl; +import org.apache.usergrid.corepersistence.rx.impl.AsyncRepair; +import org.apache.usergrid.corepersistence.rx.impl.ImportRepair; import org.apache.usergrid.corepersistence.service.AggregationService; import org.apache.usergrid.corepersistence.service.AggregationServiceFactory; import org.apache.usergrid.corepersistence.service.AggregationServiceImpl; @@ -51,20 +57,26 @@ import org.apache.usergrid.corepersistence.service.CollectionService; import org.apache.usergrid.corepersistence.service.CollectionServiceImpl; import org.apache.usergrid.corepersistence.service.ConnectionService; import org.apache.usergrid.corepersistence.service.ConnectionServiceImpl; +import org.apache.usergrid.corepersistence.service.ServiceSchedulerFig; import org.apache.usergrid.corepersistence.service.StatusService; import org.apache.usergrid.corepersistence.service.StatusServiceImpl; import org.apache.usergrid.persistence.collection.g
[13/15] usergrid git commit: Merge commit 'refs/pull/433/head' of github.com:apache/usergrid into 2.1-release
Merge commit 'refs/pull/433/head' of github.com:apache/usergrid into 2.1-release Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/63f49bac Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/63f49bac Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/63f49bac Branch: refs/heads/master Commit: 63f49bac58395b8fc9b36fedd59dae297e63459f Parents: b895643 f840623 Author: Michael Russo Authored: Thu Nov 12 13:19:54 2015 -0800 Committer: Michael Russo Committed: Thu Nov 12 13:19:54 2015 -0800 -- .../usergrid/corepersistence/CoreModule.java| 134 ++- .../asyncevents/AmazonAsyncEventService.java| 1 + .../asyncevents/AsyncEventsSchedulerFig.java| 94 + .../asyncevents/AsyncIndexProvider.java | 2 +- .../asyncevents/EventExecutionScheduler.java| 37 + .../traverse/ReadGraphCollectionFilter.java | 3 +- .../traverse/ReadGraphConnectionFilter.java | 3 +- .../corepersistence/rx/impl/AsyncRepair.java| 38 ++ .../rx/impl/ResponseImportTasks.java| 38 ++ .../service/ServiceSchedulerFig.java| 66 + .../collection/guice/CollectionModule.java | 32 + .../guice/CollectionTaskExecutor.java | 35 - .../EntityCollectionManagerFactoryImpl.java | 5 +- .../impl/EntityCollectionManagerImpl.java | 17 ++- .../mvcc/stage/delete/UniqueCleanup.java| 12 +- .../mvcc/stage/write/WriteCommit.java | 10 +- .../scheduler/CollectionExecutorScheduler.java | 52 +++ .../scheduler/CollectionSchedulerFig.java | 53 .../collection/EntityCollectionManagerIT.java | 68 ++ .../mvcc/stage/delete/MarkCommitTest.java | 2 +- .../mvcc/stage/write/WriteCommitTest.java | 2 +- .../core/executor/TaskExecutorFactory.java | 108 +++ .../persistence/core/guice/CommonModule.java| 25 ++-- .../persistence/core/rx/RxSchedulerFig.java | 71 -- .../core/rx/RxTaskSchedulerImpl.java| 81 +-- .../usergrid/services/AbstractService.java | 13 +- 26 files changed, 724 insertions(+), 278 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/63f49bac/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java --
[08/15] usergrid git commit: fix alias issues
fix alias issues Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/30053318 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/30053318 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/30053318 Branch: refs/heads/master Commit: 30053318fd848cf777d76af77c90edc474a579ee Parents: fec6520 Author: Shawn Feldman Authored: Thu Nov 12 12:10:07 2015 -0700 Committer: Shawn Feldman Committed: Thu Nov 12 12:10:07 2015 -0700 -- .../asyncevents/AmazonAsyncEventService.java | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/30053318/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java index 7c2..a4b7ef7 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java @@ -551,7 +551,7 @@ public class AmazonAsyncEventService implements AsyncEventService { indexOperationMessage = ObjectJsonSerializer.INSTANCE.fromString( message, IndexOperationMessage.class ); } -checkInitialize(indexOperationMessage); +initializeEntityIndexes(indexOperationMessage); //NOTE that we intentionally do NOT delete from the map. We can't know when all regions have consumed the message //so we'll let compaction on column expiration handle deletion @@ -567,13 +567,20 @@ public class AmazonAsyncEventService implements AsyncEventService { } -private void checkInitialize(final IndexOperationMessage indexOperationMessage) { +/** + * this method will call initialize for each message, since we are caching the entity indexes, + * we don't worry about aggregating by app id + * @param indexOperationMessage + */ +private void initializeEntityIndexes(final IndexOperationMessage indexOperationMessage) { +//loop through all adds indexOperationMessage.getIndexRequests().stream().forEach(req -> { UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId); entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope)); }); +//loop through all deletes indexOperationMessage.getDeIndexRequests().stream().forEach(req -> { UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId);
[01/15] usergrid git commit: Address cleanup not running on write for unique values. Cleanup now happens on write.
Repository: usergrid Updated Branches: refs/heads/master 67ab24430 -> 14dd48d39 Address cleanup not running on write for unique values. Cleanup now happens on write. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/419c0131 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/419c0131 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/419c0131 Branch: refs/heads/master Commit: 419c0131ff299a25c2d5c2af1186f1f11c998925 Parents: 39ccdb1 Author: Todd Nine Authored: Fri Nov 6 20:30:19 2015 -0700 Committer: Todd Nine Committed: Fri Nov 6 20:30:19 2015 -0700 -- .../impl/EntityCollectionManagerImpl.java | 4 +- .../mvcc/stage/delete/UniqueCleanup.java| 12 - .../mvcc/stage/write/WriteCommit.java | 6 +-- .../collection/EntityCollectionManagerIT.java | 55 .../mvcc/stage/delete/MarkCommitTest.java | 2 +- .../mvcc/stage/write/WriteCommitTest.java | 2 +- 6 files changed, 74 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/419c0131/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java -- diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java index ff3bd7b..cb1515c 100644 --- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java +++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerImpl.java @@ -188,7 +188,9 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager { Observable> observable = stageRunner( writeData, writeStart ); -final Observable write = observable.map( writeCommit ); +final Observable write = observable.map( writeCommit ).compose( uniqueCleanup ) + //now extract the ioEvent we need to return + .map( ioEvent -> ioEvent.getEvent().getEntity().get() ); return ObservableTimer.time( write, writeTimer ); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/419c0131/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/UniqueCleanup.java -- diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/UniqueCleanup.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/UniqueCleanup.java index 3f66536..8aa5cfc 100644 --- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/UniqueCleanup.java +++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/UniqueCleanup.java @@ -89,6 +89,9 @@ public class UniqueCleanup final Id entityId = mvccEntityCollectionIoEvent.getEvent().getId(); final ApplicationScope applicationScope = mvccEntityCollectionIoEvent.getEntityCollection(); final UUID entityVersion = mvccEntityCollectionIoEvent.getEvent().getVersion(); +//if it's been deleted, we need to remove everything up to an inclusive of this version. +//if it has not, we want to delete everything < this version +final boolean isDeleted = !mvccEntityCollectionIoEvent.getEvent().getEntity().isPresent(); //TODO Refactor this logic into a a class that can be invoked from anywhere @@ -108,7 +111,14 @@ public class UniqueCleanup logger.debug( "Cleaning up version:{} in UniqueCleanup", entityVersion ); final UUID uniqueValueVersion = uniqueValue.getEntityVersion(); //TODO: should this be equals? That way we clean up the one marked as well -return UUIDComparator.staticCompare( uniqueValueVersion, entityVersion ) > 0; + + +if(isDeleted){ +return UUIDComparator.staticCompare( uniqueValueVersion, entityVersion ) > 0; +} + +return UUIDComparator.staticCompare( uni
[11/15] usergrid git commit: Call foreach on the set directly and only call createEntityIndex on a unique set of appIds.
Call foreach on the set directly and only call createEntityIndex on a unique set of appIds. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/b8956439 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/b8956439 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/b8956439 Branch: refs/heads/master Commit: b89564398e1094203d224a1586103fe9298d12d9 Parents: f13e45b Author: Michael Russo Authored: Thu Nov 12 11:39:17 2015 -0800 Committer: Michael Russo Committed: Thu Nov 12 11:39:17 2015 -0800 -- .../asyncevents/AmazonAsyncEventService.java| 34 +++- 1 file changed, 18 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/b8956439/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java index b5e77c1..e3b60a6 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java @@ -570,26 +570,28 @@ public class AmazonAsyncEventService implements AsyncEventService { * @param indexOperationMessage */ private void initializeEntityIndexes(final IndexOperationMessage indexOperationMessage) { -final Map apps = new HashMap<>(indexOperationMessage.getIndexRequests().size()+indexOperationMessage.getDeIndexRequests().size()); -//loop through all adds -for(IndexOperation req : indexOperationMessage.getIndexRequests()) { -final UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); -if(!apps.containsKey(appId)) { -ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId); - entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope)); -apps.put(appId,true); -} -}; -//loop through all deletes -for(DeIndexOperation req : indexOperationMessage.getDeIndexRequests()) { -final UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); -if(!apps.containsKey(appId)) { +// create a set so we can have a unique list of appIds for which we call createEntityIndex +Set appIds = new HashSet<>(); + +// loop through all indexRequests and add the appIds to the set +indexOperationMessage.getIndexRequests().forEach(req -> { +UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); +appIds.add(appId); +}); + +// loop through all deindexRequests and add the appIds to the set +indexOperationMessage.getDeIndexRequests().forEach(req -> { +UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); +appIds.add(appId); +}); + +// for each of the appIds in the unique set, call create entity index to ensure the aliases are created +appIds.forEach(appId -> { ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId); entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope)); -apps.put(appId,true); } -}; +); }
[12/15] usergrid git commit: Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release
Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/a6936431 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/a6936431 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/a6936431 Branch: refs/heads/master Commit: a6936431c98e05ec670aa9e4fdfacc63dae6544c Parents: f840623 b895643 Author: Todd Nine Authored: Thu Nov 12 14:17:06 2015 -0700 Committer: Todd Nine Committed: Thu Nov 12 14:17:06 2015 -0700 -- .../asyncevents/AmazonAsyncEventService.java| 38 +--- .../index/impl/DeIndexOperation.java| 4 +-- .../persistence/index/impl/IndexingUtils.java | 21 +++ .../index/impl/IndexingUtilsTest.java | 36 +++ 4 files changed, 92 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/a6936431/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java --
[06/15] usergrid git commit: Addresses issues found in the review.
Addresses issues found in the review. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/7725d90e Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/7725d90e Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/7725d90e Branch: refs/heads/master Commit: 7725d90ec504f2002712636cfcad6a395de21226 Parents: 0e1f0e6 Author: Todd Nine Authored: Thu Nov 12 11:54:12 2015 -0700 Committer: Todd Nine Committed: Thu Nov 12 11:54:12 2015 -0700 -- .../usergrid/corepersistence/CoreModule.java| 12 --- .../corepersistence/rx/impl/ImportRepair.java | 38 .../rx/impl/ResponseImportTasks.java| 38 .../collection/guice/CollectionModule.java | 4 ++- .../impl/EntityCollectionManagerImpl.java | 3 ++ .../core/executor/TaskExecutorFactory.java | 9 - .../usergrid/services/AbstractService.java | 5 ++- 7 files changed, 62 insertions(+), 47 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/7725d90e/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java index 09db151..650bb4d 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java @@ -47,7 +47,7 @@ import org.apache.usergrid.corepersistence.rx.impl.AllEntityIdsObservable; import org.apache.usergrid.corepersistence.rx.impl.AllEntityIdsObservableImpl; import org.apache.usergrid.corepersistence.rx.impl.AllNodesInGraphImpl; import org.apache.usergrid.corepersistence.rx.impl.AsyncRepair; -import org.apache.usergrid.corepersistence.rx.impl.ImportRepair; +import org.apache.usergrid.corepersistence.rx.impl.ResponseImportTasks; import org.apache.usergrid.corepersistence.service.AggregationService; import org.apache.usergrid.corepersistence.service.AggregationServiceFactory; import org.apache.usergrid.corepersistence.service.AggregationServiceImpl; @@ -77,6 +77,7 @@ import org.apache.usergrid.persistence.index.guice.IndexModule; import com.google.inject.AbstractModule; import com.google.inject.Inject; import com.google.inject.Provides; +import com.google.inject.Singleton; import com.google.inject.TypeLiteral; import com.google.inject.assistedinject.FactoryModuleBuilder; import com.google.inject.multibindings.Multibinder; @@ -200,6 +201,7 @@ public class CoreModule extends AbstractModule { @Provides @Inject @EventExecutionScheduler +@Singleton public RxTaskScheduler getSqsTaskScheduler( final AsyncEventsSchedulerFig asyncEventsSchedulerFig ) { final String poolName = asyncEventsSchedulerFig.getIoSchedulerName(); @@ -218,6 +220,7 @@ public class CoreModule extends AbstractModule { @Provides @Inject @AsyncRepair +@Singleton public RxTaskScheduler getAsyncRepairScheduler( final AsyncEventsSchedulerFig asyncEventsSchedulerFig ) { final String poolName = asyncEventsSchedulerFig.getRepairPoolName(); @@ -225,7 +228,7 @@ public class CoreModule extends AbstractModule { final ThreadPoolExecutor executor = TaskExecutorFactory -.createTaskExecutor( poolName, threadCount, 1, TaskExecutorFactory.RejectionAction.DROP ); +.createTaskExecutor( poolName, threadCount, 0, TaskExecutorFactory.RejectionAction.DROP ); final RxTaskScheduler taskScheduler = new RxTaskSchedulerImpl( executor ); @@ -235,7 +238,8 @@ public class CoreModule extends AbstractModule { @Provides @Inject -@ImportRepair +@ResponseImportTasks +@Singleton public RxTaskScheduler getImportRepairScheduler( final AsyncEventsSchedulerFig asyncEventsSchedulerFig ) { final String poolName = asyncEventsSchedulerFig.getImportSchedulerName(); @@ -243,7 +247,7 @@ public class CoreModule extends AbstractModule { final ThreadPoolExecutor executor = TaskExecutorFactory -.createTaskExecutor( poolName, threadCount, 1, TaskExecutorFactory.RejectionAction.CALLERRUNS ); +.createTaskExecutor( poolName, threadCount, 0, TaskExecutorFactory.RejectionAction.CALLERRUNS ); final RxTaskScheduler taskScheduler = new RxTaskSchedulerImpl( executor ); http://git-wip-us.apache.org/repos/asf/usergrid/blob/7725d90e/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/ImportRepair.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepe
[03/15] usergrid git commit: Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release
Merge branch '2.1-release' of https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/7da99c7f Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/7da99c7f Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/7da99c7f Branch: refs/heads/master Commit: 7da99c7fb69369bfd62cb0fe27f2eac74161f127 Parents: 68d38f4 204bf04 Author: Todd Nine Authored: Wed Nov 11 14:57:00 2015 -0700 Committer: Todd Nine Committed: Wed Nov 11 14:57:00 2015 -0700 -- .../shard/impl/NodeShardAllocationImpl.java | 2 +- .../persistence/queue/DefaultQueueManager.java | 58 + .../java-wns/1.2-USERGRID/_remote.repositories | 7 + ...a-wns-1.2-USERGRID-jar-with-dependencies.jar | Bin 0 -> 1836665 bytes .../java-wns-1.2-USERGRID-javadoc.jar | Bin 0 -> 234289 bytes .../java-wns-1.2-USERGRID-sources.jar | Bin 0 -> 21654 bytes .../1.2-USERGRID/java-wns-1.2-USERGRID.jar | Bin 0 -> 33164 bytes .../1.2-USERGRID/java-wns-1.2-USERGRID.pom | 128 +++ stack/pom.xml | 14 +- stack/rest/pom.xml | 10 ++ stack/services/pom.xml | 10 +- .../services/notifications/wns/WNSAdapter.java | 5 +- .../notifications/wns/WNSAdapterTest.java | 49 +++ 13 files changed, 244 insertions(+), 39 deletions(-) --
[05/15] usergrid git commit: fix alias issues
fix alias issues Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/fec6520e Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/fec6520e Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/fec6520e Branch: refs/heads/master Commit: fec6520eb47fa6fe7bc1d8d7fad6a729874f3475 Parents: 204bf04 Author: Shawn Feldman Authored: Thu Nov 12 11:07:29 2015 -0700 Committer: Shawn Feldman Committed: Thu Nov 12 11:47:08 2015 -0700 -- .../asyncevents/AmazonAsyncEventService.java| 15 .../index/impl/DeIndexOperation.java| 4 +-- .../persistence/index/impl/IndexingUtils.java | 21 .../index/impl/IndexingUtilsTest.java | 36 4 files changed, 74 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/fec6520e/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java index 16e119c..7c2 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java @@ -30,6 +30,7 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; import java.util.stream.Stream; +import org.apache.usergrid.persistence.index.impl.IndexingUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -550,6 +551,7 @@ public class AmazonAsyncEventService implements AsyncEventService { indexOperationMessage = ObjectJsonSerializer.INSTANCE.fromString( message, IndexOperationMessage.class ); } +checkInitialize(indexOperationMessage); //NOTE that we intentionally do NOT delete from the map. We can't know when all regions have consumed the message //so we'll let compaction on column expiration handle deletion @@ -565,6 +567,19 @@ public class AmazonAsyncEventService implements AsyncEventService { } +private void checkInitialize(final IndexOperationMessage indexOperationMessage) { +indexOperationMessage.getIndexRequests().stream().forEach(req -> { +UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); +ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId); + entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope)); +}); + +indexOperationMessage.getDeIndexRequests().stream().forEach(req -> { +UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); +ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId); + entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope)); +}); +} @Override http://git-wip-us.apache.org/repos/asf/usergrid/blob/fec6520e/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/DeIndexOperation.java -- diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/DeIndexOperation.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/DeIndexOperation.java index dbecf8a..aefceda 100644 --- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/DeIndexOperation.java +++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/DeIndexOperation.java @@ -44,10 +44,10 @@ import static org.apache.usergrid.persistence.index.impl.IndexingUtils.createInd public class DeIndexOperation implements BatchOperation { @JsonProperty -private String[] indexes; +public String[] indexes; @JsonProperty -private String documentId; +public String documentId; public DeIndexOperation() { http://git-wip-us.apache.org/repos/asf/usergrid/blob/fec6520e/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java -- diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexingUtils.java index 18cb9
[09/15] usergrid git commit: fix alias issues
fix alias issues Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c068ab0d Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c068ab0d Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c068ab0d Branch: refs/heads/master Commit: c068ab0d471bf8bf86dff2a9d3d30ae1baa0f24d Parents: 3005331 Author: Shawn Feldman Authored: Thu Nov 12 12:34:46 2015 -0700 Committer: Shawn Feldman Committed: Thu Nov 12 12:34:46 2015 -0700 -- .../asyncevents/AmazonAsyncEventService.java | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/c068ab0d/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java index a4b7ef7..e99c052 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java @@ -22,9 +22,7 @@ package org.apache.usergrid.corepersistence.asyncevents; import java.io.IOException; import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; -import java.util.UUID; +import java.util.*; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; @@ -573,18 +571,25 @@ public class AmazonAsyncEventService implements AsyncEventService { * @param indexOperationMessage */ private void initializeEntityIndexes(final IndexOperationMessage indexOperationMessage) { +Map apps = new HashMap<>(indexOperationMessage.getIndexRequests().size()+indexOperationMessage.getDeIndexRequests().size()); //loop through all adds indexOperationMessage.getIndexRequests().stream().forEach(req -> { UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); -ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId); - entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope)); +if(!apps.containsKey(appId)) { +ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId); + entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope)); +apps.put(appId,true); +} }); //loop through all deletes indexOperationMessage.getDeIndexRequests().stream().forEach(req -> { UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); -ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId); - entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope)); +if(!apps.containsKey(appId)) { +ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId); + entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope)); +apps.put(appId,true); +} }); }
[10/15] usergrid git commit: fix alias issues
fix alias issues Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/f13e45b1 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/f13e45b1 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/f13e45b1 Branch: refs/heads/master Commit: f13e45b16561494d460a0f9c8592e319308be049 Parents: c068ab0 Author: Shawn Feldman Authored: Thu Nov 12 12:36:52 2015 -0700 Committer: Shawn Feldman Committed: Thu Nov 12 12:36:52 2015 -0700 -- .../asyncevents/AmazonAsyncEventService.java | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/f13e45b1/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java index e99c052..b5e77c1 100644 --- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java +++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java @@ -28,7 +28,8 @@ import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Collectors; import java.util.stream.Stream; -import org.apache.usergrid.persistence.index.impl.IndexingUtils; +import org.apache.usergrid.persistence.index.impl.*; +import org.elasticsearch.action.index.IndexRequest; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -56,8 +57,6 @@ import org.apache.usergrid.persistence.graph.Edge; import org.apache.usergrid.persistence.index.EntityIndex; import org.apache.usergrid.persistence.index.EntityIndexFactory; import org.apache.usergrid.persistence.index.IndexLocationStrategy; -import org.apache.usergrid.persistence.index.impl.IndexOperationMessage; -import org.apache.usergrid.persistence.index.impl.IndexProducer; import org.apache.usergrid.persistence.map.MapManager; import org.apache.usergrid.persistence.map.MapManagerFactory; import org.apache.usergrid.persistence.map.MapScope; @@ -571,26 +570,26 @@ public class AmazonAsyncEventService implements AsyncEventService { * @param indexOperationMessage */ private void initializeEntityIndexes(final IndexOperationMessage indexOperationMessage) { -Map apps = new HashMap<>(indexOperationMessage.getIndexRequests().size()+indexOperationMessage.getDeIndexRequests().size()); +final Map apps = new HashMap<>(indexOperationMessage.getIndexRequests().size()+indexOperationMessage.getDeIndexRequests().size()); //loop through all adds -indexOperationMessage.getIndexRequests().stream().forEach(req -> { -UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); +for(IndexOperation req : indexOperationMessage.getIndexRequests()) { +final UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); if(!apps.containsKey(appId)) { ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId); entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope)); apps.put(appId,true); } -}); +}; //loop through all deletes -indexOperationMessage.getDeIndexRequests().stream().forEach(req -> { -UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); +for(DeIndexOperation req : indexOperationMessage.getDeIndexRequests()) { +final UUID appId = IndexingUtils.getApplicationIdFromIndexDocId(req.documentId); if(!apps.containsKey(appId)) { ApplicationScope appScope = CpNamingUtils.getApplicationScope(appId); entityIndexFactory.createEntityIndex(indexLocationStrategyFactory.getIndexLocationStrategy(appScope)); apps.put(appId,true); } -}); +}; }
[1/3] usergrid git commit: Fix in UnionScanColumn comparator fixes order or operations error https://issues.apache.org/jira/browse/USERGRID-1099
Repository: usergrid Updated Branches: refs/heads/1.x 7cb7b3fdf -> bd4fd2643 Fix in UnionScanColumn comparator fixes order or operations error https://issues.apache.org/jira/browse/USERGRID-1099 Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c776a2fb Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c776a2fb Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c776a2fb Branch: refs/heads/1.x Commit: c776a2fb34d76f5cd779009a200ab8cf1e288b5d Parents: 0706444 Author: Dave Johnson Authored: Thu Nov 5 13:58:07 2015 -0500 Committer: Dave Johnson Committed: Thu Nov 5 13:58:07 2015 -0500 -- .../query/ir/result/AbstractScanColumn.java | 2 +- .../query/ir/result/UnionIterator.java | 6 +- .../persistence/ParenthesisProblemIT.java | 79 3 files changed, 83 insertions(+), 4 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/c776a2fb/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/AbstractScanColumn.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/AbstractScanColumn.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/AbstractScanColumn.java index cabb710..f99103c 100644 --- a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/AbstractScanColumn.java +++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/AbstractScanColumn.java @@ -69,7 +69,7 @@ public abstract class AbstractScanColumn implements ScanColumn { ScanColumn that = ( ScanColumn ) o; -return uuid.equals( that.getUUID() ); +return getUUID().equals( that.getUUID() ); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/c776a2fb/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UnionIterator.java -- diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UnionIterator.java b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UnionIterator.java index 526fced..3f786f8 100644 --- a/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UnionIterator.java +++ b/stack/core/src/main/java/org/apache/usergrid/persistence/query/ir/result/UnionIterator.java @@ -264,13 +264,13 @@ public class UnionIterator extends MultiIterator { if ( this == o ) { return true; } -if ( !( o instanceof UnionScanColumn ) ) { +if ( !( o instanceof ScanColumn ) ) { return false; } -final UnionScanColumn that = ( UnionScanColumn ) o; +final ScanColumn that = ( ScanColumn ) o; -return delegate.getUUID().equals( that.delegate.getUUID() ); +return getUUID().equals( that.getUUID() ); } http://git-wip-us.apache.org/repos/asf/usergrid/blob/c776a2fb/stack/core/src/test/java/org/apache/usergrid/persistence/ParenthesisProblemIT.java -- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/ParenthesisProblemIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/ParenthesisProblemIT.java new file mode 100644 index 000..ab52416 --- /dev/null +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/ParenthesisProblemIT.java @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.usergrid.persistence; + +import org.apache.commons.lang.RandomStringUtils; +import org.apache.usergrid.AbstractCoreIT; +import org.junit.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.HashMap; +import java.util.UUID; + +import static org.junit.Assert.assertEquals; + + +public class ParenthesisProblemIT extends AbstractCoreIT {
[2/3] usergrid git commit: Merge branch '1.x' into usergrid-1099
Merge branch '1.x' into usergrid-1099 Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/d37be706 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/d37be706 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/d37be706 Branch: refs/heads/1.x Commit: d37be7066db054688dc85c3a9b497d51acb07138 Parents: c776a2f 7cb7b3f Author: Dave Johnson Authored: Thu Nov 5 14:20:36 2015 -0500 Committer: Dave Johnson Committed: Thu Nov 5 14:20:36 2015 -0500 -- .../src/main/java/CpQueryFilter.tokens | 47 1 file changed, 47 deletions(-) --
[3/3] usergrid git commit: Comments only.
Comments only. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/bd4fd264 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/bd4fd264 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/bd4fd264 Branch: refs/heads/1.x Commit: bd4fd264378d9874422f1ace0b2ee3b0d57adfc2 Parents: d37be70 Author: Dave Johnson Authored: Fri Nov 6 15:22:57 2015 -0500 Committer: Dave Johnson Committed: Fri Nov 6 15:22:57 2015 -0500 -- .../org/apache/usergrid/persistence/ParenthesisProblemIT.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/bd4fd264/stack/core/src/test/java/org/apache/usergrid/persistence/ParenthesisProblemIT.java -- diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/ParenthesisProblemIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/ParenthesisProblemIT.java index ab52416..100fd0f 100644 --- a/stack/core/src/test/java/org/apache/usergrid/persistence/ParenthesisProblemIT.java +++ b/stack/core/src/test/java/org/apache/usergrid/persistence/ParenthesisProblemIT.java @@ -29,16 +29,17 @@ import java.util.UUID; import static org.junit.Assert.assertEquals; +// Created for https://issues.apache.org/jira/browse/USERGRID-1099 public class ParenthesisProblemIT extends AbstractCoreIT { private static final Logger logger = LoggerFactory.getLogger( ParenthesisProblemIT.class ); -@Test // this test passes +@Test public void parenthesisProblem1() throws Exception { // C = c and ( A > a or B = false ) parenthesisProblem(1, "color = 'tabby' and (age > 7 or large = true)"); } -@Test // this test fails +@Test public void parenthesisProblem2() throws Exception { // same as #1 except for order of things listed in 'and' operation // ( A > a or B = false ) and C = c
usergrid git commit: Shorts circuit delete until further testing
Repository: usergrid Updated Branches: refs/heads/2.1-release 6dfa2e290 -> 3f4d33aee Shorts circuit delete until further testing Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/3f4d33ae Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/3f4d33ae Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/3f4d33ae Branch: refs/heads/2.1-release Commit: 3f4d33aeed7a68778a5d64af8b875711a13b45b8 Parents: 6dfa2e2 Author: Todd Nine Authored: Fri Nov 6 10:40:18 2015 -0700 Committer: Todd Nine Committed: Fri Nov 6 10:40:18 2015 -0700 -- .../impl/shard/impl/ShardGroupDeletionImpl.java | 165 ++- .../shard/impl/ShardGroupDeletionImplTest.java | 2 + 2 files changed, 86 insertions(+), 81 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/3f4d33ae/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java -- diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java index ea10ed5..4d6be1b 100644 --- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java +++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImpl.java @@ -125,87 +125,90 @@ public class ShardGroupDeletionImpl implements ShardGroupDeletion { final ShardEntryGroup shardEntryGroup, final Iterator edgeIterator ) { -logger.trace( "Beginning audit of shard group {}", shardEntryGroup ); - -/** - * Compaction is pending, we cannot check it - */ -if ( shardEntryGroup.isCompactionPending() ) { -logger.trace( "Shard group {} is compacting, not auditing group", shardEntryGroup ); -return DeleteResult.COMPACTION_PENDING; -} - - -final long currentTime = timeService.getCurrentTime(); - -if ( shardEntryGroup.isNew( currentTime ) ) { -logger.trace( "Shard group {} contains a shard that is is too new, not auditing group", shardEntryGroup ); -return DeleteResult.TOO_NEW; -} - -/** - * We have edges, and therefore cannot delete them - */ -if ( edgeIterator.hasNext() ) { -logger.trace( "Shard group {} has edges, not deleting", shardEntryGroup ); - -return DeleteResult.CONTAINS_EDGES; -} - - -//now we can proceed based on the shard meta state and we don't have any edge - -DeleteResult result = DeleteResult.NO_OP; - -MutationBatch rollup = null; - -for ( final Shard shard : shardEntryGroup.getReadShards() ) { - -//skip the min shard -if(shard.isMinShard()){ -logger.trace( "Shard {} in group {} is the minimum, not deleting", shard, shardEntryGroup ); -continue; -} - -//The shard is not compacted, we cannot remove it. This should never happen, a bit of an "oh shit" scenario. -//the isCompactionPending should return false in this case -if(!shard.isCompacted()){ -logger.warn( "Shard {} in group {} is not compacted yet was checked. Short circuiting", shard, shardEntryGroup ); -return DeleteResult.NO_OP; -} - - -final MutationBatch shardRemovalMutation = -edgeShardSerialization.removeShardMeta( applicationScope, shard, directedEdgeMeta ); - -if ( rollup == null ) { -rollup = shardRemovalMutation; -} - -else { -rollup.mergeShallow( shardRemovalMutation ); -} - -result = DeleteResult.DELETED; - -logger.trace( "Removing shard {} in group {}", shard, shardEntryGroup ); -} - - - if( rollup != null) { - - try { - rollup.execute(); - } - catch ( ConnectionException e ) { - logger.error( "Unable to execute shard deletion", e ); - throw new RuntimeException( "Unable to execute shard deletion", e ); - } - } - -logger.trace( "Completed auditing shard group {}", shardEntryGroup ); - -return result; +//TEMPORARILY Removed until further testing +return Del
usergrid git commit: Removed unused file.
Repository: usergrid Updated Branches: refs/heads/1.x 0706444e7 -> 7cb7b3fdf Removed unused file. Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/7cb7b3fd Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/7cb7b3fd Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/7cb7b3fd Branch: refs/heads/1.x Commit: 7cb7b3fdfc7b3110277a36675cfa4a053ec93efe Parents: 0706444 Author: Todd Nine Authored: Wed Nov 4 11:27:26 2015 -0700 Committer: Todd Nine Committed: Wed Nov 4 11:27:26 2015 -0700 -- .../src/main/java/CpQueryFilter.tokens | 47 1 file changed, 47 deletions(-) -- http://git-wip-us.apache.org/repos/asf/usergrid/blob/7cb7b3fd/stack/corepersistence/queryindex/src/main/java/CpQueryFilter.tokens -- diff --git a/stack/corepersistence/queryindex/src/main/java/CpQueryFilter.tokens b/stack/corepersistence/queryindex/src/main/java/CpQueryFilter.tokens deleted file mode 100644 index 53a0817..000 --- a/stack/corepersistence/queryindex/src/main/java/CpQueryFilter.tokens +++ /dev/null @@ -1,47 +0,0 @@ -T__31=31 -T__32=32 -T__33=33 -T__34=34 -T__35=35 -T__36=36 -T__37=37 -T__38=38 -T__39=39 -T__40=40 -AND=4 -ASC=5 -BOOLEAN=6 -CONTAINS=7 -DESC=8 -EQ=9 -ESC_SEQ=10 -EXPONENT=11 -FALSE=12 -FLOAT=13 -GT=14 -GTE=15 -HEX_DIGIT=16 -ID=17 -LONG=18 -LT=19 -LTE=20 -NOT=21 -OCTAL_ESC=22 -OF=23 -OR=24 -STRING=25 -TRUE=26 -UNICODE_ESC=27 -UUID=28 -WITHIN=29 -WS=30 -'('=31 -')'=32 -'*'=33 -','=34 -':'=35 -'order by'=36 -'select'=37 -'where'=38 -'{'=39 -'}'=40