You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2015/11/18 17:27:22 UTC
[01/50] usergrid git commit: Bump portal version.
Repository: usergrid
Updated Branches:
refs/heads/USERGRID-872 d04f6e3b6 -> c8ff1022d
Bump portal version.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/40e002b9
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/40e002b9
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/40e002b9
Branch: refs/heads/USERGRID-872
Commit: 40e002b971d01fe13a96f0d27a4a1d3959bb65eb
Parents: f7785c2
Author: Michael Russo <mi...@gmail.com>
Authored: Tue Nov 10 12:01:49 2015 -0800
Committer: Michael Russo <mi...@gmail.com>
Committed: Tue Nov 10 12:01:49 2015 -0800
----------------------------------------------------------------------
portal/bower.json | 2 +-
portal/package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40e002b9/portal/bower.json
----------------------------------------------------------------------
diff --git a/portal/bower.json b/portal/bower.json
index 7ffb4ff..8179100 100644
--- a/portal/bower.json
+++ b/portal/bower.json
@@ -1,6 +1,6 @@
{
"name": "usergrid-portal",
- "version": "2.0.18",
+ "version": "2.0.19",
"ignore": [
".jshintrc",
"**/*.txt",
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40e002b9/portal/package.json
----------------------------------------------------------------------
diff --git a/portal/package.json b/portal/package.json
index e36a910..74a68ac 100644
--- a/portal/package.json
+++ b/portal/package.json
@@ -1,6 +1,6 @@
{
"name": "usergrid",
- "version": "2.0.18",
+ "version": "2.0.19",
"packageName": "appsvc-ui",
"description": "full usergrid portal",
"main": "./scripts/web-server.js",
[45/50] usergrid git commit: Adding more JIRA links;
all but 10 ignores are now linked to JIRA issues.
Posted by sn...@apache.org.
Adding more JIRA links; all but 10 ignores are now linked to JIRA issues.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/68be7d70
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/68be7d70
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/68be7d70
Branch: refs/heads/USERGRID-872
Commit: 68be7d7027c51940445a43bed5fcb3270ff75846
Parents: 22c29fb
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 10:13:38 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 10:13:38 2015 -0500
----------------------------------------------------------------------
.../usergrid/batch/job/SchedulerRuntime1IT.java | 3 ++-
.../usergrid/batch/job/SchedulerRuntime2IT.java | 3 ++-
.../usergrid/batch/job/SchedulerRuntime3IT.java | 3 ++-
.../usergrid/batch/job/SchedulerRuntime4IT.java | 3 ++-
.../usergrid/batch/job/SchedulerRuntime5IT.java | 3 ++-
.../usergrid/batch/job/SchedulerRuntime6IT.java | 3 ++-
.../usergrid/batch/job/SchedulerRuntime7IT.java | 3 ++-
.../usergrid/batch/job/SchedulerRuntime8IT.java | 3 ++-
.../batch/job/SchedulerRuntimeIntervalIT.java | 3 ++-
.../java/org/apache/usergrid/mq/MessagesIT.java | 8 ++++----
.../org/apache/usergrid/rest/IndexResourceIT.java | 4 +++-
.../usergrid/rest/management/AdminUsersIT.java | 18 ++++++++++--------
.../importer/ImportConnectionsTest.java | 2 +-
13 files changed, 36 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
index 380a683..a7f2741 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
@@ -34,7 +34,8 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes.
*/
-@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
+@Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1105. Spring problems." )
+// These tests no longer work with shared Spring context, need to be fixed
public class SchedulerRuntime1IT extends AbstractSchedulerRuntimeIT {
private static final Logger logger = LoggerFactory.getLogger(SchedulerRuntime1IT.class.getName());
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
index 2c2aa40..9f18dd0 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
@@ -34,7 +34,8 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
+@Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1105. Spring problems." )
+// These tests no longer work with shared Spring context, need to be fixed
public class SchedulerRuntime2IT extends AbstractSchedulerRuntimeIT {
private static final Logger logger = LoggerFactory.getLogger(SchedulerRuntime2IT.class.getName());
/** Test the scheduler ramps up correctly when there are more jobs to be read after a pause */
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
index 5fc6398..60b25ab 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
@@ -33,7 +33,8 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
+@Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1105. Spring problems." )
+// These tests no longer work with shared Spring context, need to be fixed
public class SchedulerRuntime3IT extends AbstractSchedulerRuntimeIT {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
index fbd49f2..97acaee 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
@@ -31,7 +31,8 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
+@Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1105. Spring problems." )
+// These tests no longer work with shared Spring context, need to be fixed
public class SchedulerRuntime4IT extends AbstractSchedulerRuntimeIT {
/**
* Test the scheduler ramps up correctly when there are more jobs to be read after a pause when the job specifies
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
index 1b5cbab..5973fe9 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
@@ -31,7 +31,8 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
+@Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1105. Spring problems." )
+// These tests no longer work with shared Spring context, need to be fixed
public class SchedulerRuntime5IT extends AbstractSchedulerRuntimeIT {
/**
* Test the scheduler ramps up correctly when there are more jobs to be read after a pause when the job specifies
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
index 5d2e00d..e8e4e54 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
@@ -35,7 +35,8 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
+@Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1105. Spring problems." )
+// These tests no longer work with shared Spring context, need to be fixed
public class SchedulerRuntime6IT extends AbstractSchedulerRuntimeIT {
/**
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
index 000996d..6d4b4a4 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
@@ -32,7 +32,8 @@ import static org.junit.Assert.assertTrue;
*/
//@org.junit.Ignore( "Todd you need to take a look at this since it's not clear to me what was intended in this test." )
-@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
+@Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1105. Spring problems." )
+// These tests no longer work with shared Spring context, need to be fixed
public class SchedulerRuntime7IT extends AbstractSchedulerRuntimeIT {
/** Test that we're only running once, even when a job exceeds the heartbeat time */
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
index 65b5e67..bd49781 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
@@ -35,7 +35,8 @@ import static org.junit.Assert.assertFalse;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
+@Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1105. Spring problems." )
+// These tests no longer work with shared Spring context, need to be fixed
public class SchedulerRuntime8IT extends AbstractSchedulerRuntimeIT {
/**
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntimeIntervalIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntimeIntervalIT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntimeIntervalIT.java
index 9504c9f..45d58a9 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntimeIntervalIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntimeIntervalIT.java
@@ -36,7 +36,8 @@ import static org.junit.Assert.assertTrue;
* Tests saturation at each point of the runtime as well
*/
-@Ignore("Ignored awaiting fix for USERGRID-267")
+@Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1105. Spring problems." )
+// These tests no longer work with shared Spring context, need to be fixed
public class SchedulerRuntimeIntervalIT extends AbstractSchedulerRuntimeIT {
private static final Logger logger =
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/core/src/test/java/org/apache/usergrid/mq/MessagesIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/mq/MessagesIT.java b/stack/core/src/test/java/org/apache/usergrid/mq/MessagesIT.java
index 70032f7..52ca4d8 100644
--- a/stack/core/src/test/java/org/apache/usergrid/mq/MessagesIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/mq/MessagesIT.java
@@ -48,7 +48,7 @@ public class MessagesIT extends AbstractCoreIT {
}
- @Ignore
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1116. ")
@Test
public void testMessages() throws Exception {
LOG.info( "MessagesIT.testMessages" );
@@ -118,7 +118,7 @@ public class MessagesIT extends AbstractCoreIT {
}
- @Ignore
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1116. ")
@Test
public void testSubscriberSearch() throws Exception {
QueueManager qm = app.getQm();
@@ -171,7 +171,7 @@ public class MessagesIT extends AbstractCoreIT {
}
- @Ignore
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1116. ")
@Test
public void testConsumer() throws Exception {
LOG.info( "Creating messages" );
@@ -214,7 +214,7 @@ public class MessagesIT extends AbstractCoreIT {
}
- @Ignore
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1116. ")
@Test
public void testTransactions() throws Exception {
QueueManager qm = app.getQm();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
index af91ad7..6a69190 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
@@ -20,6 +20,7 @@
package org.apache.usergrid.rest;
+import org.apache.usergrid.ExperimentalTest;
import org.apache.usergrid.rest.test.resource.AbstractRestIT;
import org.apache.usergrid.rest.test.resource.model.ApiResponse;
import org.apache.usergrid.rest.test.resource.model.QueryParameters;
@@ -27,6 +28,7 @@ import org.apache.usergrid.rest.test.resource.model.Token;
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import org.junit.Ignore;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -99,8 +101,8 @@ public class IndexResourceIT extends AbstractRestIT {
}
- @Ignore
@Test
+ @Category(ExperimentalTest.class)
public void TestAddIndex() throws Exception{
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
index fba0c43..09a76aa 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
@@ -187,7 +187,7 @@ public class AdminUsersIT extends AbstractRestIT {
* TODO:test for parallel test that changing the properties here won't affect other tests
* @throws Exception
*/
- @Ignore("breaks other tests")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1115. breaks other tests")
@Test
public void testUnconfirmedAdminLogin() throws Exception{
@@ -273,7 +273,7 @@ public class AdminUsersIT extends AbstractRestIT {
* Test that the system admin doesn't need a confirmation email
* @throws Exception
*/
- @Ignore("breaks other tests")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1115. breaks other tests")
@Test
public void testSystemAdminNeedsNoConfirmation() throws Exception{
//Save original properties to return them to normal at the end of the test
@@ -311,7 +311,8 @@ public class AdminUsersIT extends AbstractRestIT {
* Test that the test account doesn't need confirmation and is created automatically.
* @throws Exception
*/
- @Ignore("Test doesn't pass because the test account isn't getting correct instantiated")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1115. Test account problem")
+ // Test doesn't pass because the test account isn't getting correct instantiated
@Test
public void testTestUserNeedsNoConfirmation() throws Exception{
//Save original properties to return them to normal at the end of the test
@@ -347,8 +348,9 @@ public class AdminUsersIT extends AbstractRestIT {
* Update the current management user and make sure the change persists
* @throws Exception
*/
- @Ignore("Fails because we cannot GET a management user with a super user token - only with an Admin level token."
- + "But, we can PUT with a superuser token. This test will work once that issue has been resolved.")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1115.")
+ // Fails because we cannot GET a management user with a super user token - only with an Admin level token.
+ // But, we can PUT with a superuser token. This test will work once that issue has been resolved.
@Test
public void updateManagementUser() throws Exception {
@@ -398,7 +400,8 @@ public class AdminUsersIT extends AbstractRestIT {
assertFalse( inbox.isEmpty() );
}
- @Ignore("Build problems - Test is broken due to viewables not being properly returned in the embedded tomcat")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1115. Viewables issue.")
+ // Test is broken due to viewables not being properly returned in the embedded tomcat
@Test
public void checkFormPasswordReset() throws Exception {
@@ -435,7 +438,6 @@ public class AdminUsersIT extends AbstractRestIT {
assertTrue( html.contains( "invalid token" ) );
}
-// // TODO: will work once resetpw viewables work
// @Test
// public void passwordResetIncorrectUserName() throws Exception {
//
@@ -636,7 +638,7 @@ public class AdminUsersIT extends AbstractRestIT {
}
}
- @Ignore("breaks other tests")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1115. breaks other tests")
@Test
public void testProperties(){
ApiResponse originalTestPropertiesResponse = clientSetup.getRestClient().testPropertiesResource().get();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/68be7d70/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportConnectionsTest.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportConnectionsTest.java b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportConnectionsTest.java
index 8ca3caa..05948ff 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportConnectionsTest.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportConnectionsTest.java
@@ -58,7 +58,7 @@ public class ImportConnectionsTest {
@Test
- @Ignore("Because getTargetEntities() is broken")
+ @Ignore("Pending merge of export-feature branch. Because getTargetEntities() is broken")
public void testCreateAndCountConnectionsViaGet() throws Exception {
doTestCreateAndCountConnections(new ConnectionCounter() {
[16/50] usergrid git commit: Merge branch '2.1-release' of
https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release
Posted by sn...@apache.org.
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/USERGRID-872
Commit: a6936431c98e05ec670aa9e4fdfacc63dae6544c
Parents: f840623 b895643
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Nov 12 14:17:06 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
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
----------------------------------------------------------------------
[44/50] usergrid git commit: Add pending comment to import/export
tests that are awaiting merge of the export-feature branch.
Posted by sn...@apache.org.
Add pending comment to import/export tests that are awaiting merge of the export-feature branch.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/22c29fb7
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/22c29fb7
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/22c29fb7
Branch: refs/heads/USERGRID-872
Commit: 22c29fb7ca455c05739d1c2724e33dd0429bab1a
Parents: a9c1e84
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 09:32:08 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 09:32:08 2015 -0500
----------------------------------------------------------------------
.../usergrid/rest/management/ExportResourceIT.java | 2 +-
.../usergrid/rest/management/ImportResourceIT.java | 2 +-
.../usergrid/management/export/ExportServiceIT.java | 9 +++++----
.../usergrid/management/importer/ImportServiceIT.java | 12 ++++++------
4 files changed, 13 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/22c29fb7/stack/rest/src/test/java/org/apache/usergrid/rest/management/ExportResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ExportResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ExportResourceIT.java
index 79590b8..81ff2d3 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ExportResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ExportResourceIT.java
@@ -32,7 +32,7 @@ import java.util.UUID;
import static org.junit.Assert.*;
-@Ignore
+@Ignore("Pending merge of export-feature branch. ")
public class ExportResourceIT extends AbstractRestIT {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/22c29fb7/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
index ee6ed8e..60b872d 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
@@ -60,7 +60,7 @@ import java.util.Properties;
import static org.junit.Assert.*;
-@Ignore
+@Ignore("Pending merge of export-feature branch. ")
public class ImportResourceIT extends AbstractRestIT {
private static final Logger logger = LoggerFactory.getLogger(ImportResourceIT.class);
http://git-wip-us.apache.org/repos/asf/usergrid/blob/22c29fb7/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
index 4f78b92..c31f07c 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
@@ -150,7 +150,8 @@ public class ExportServiceIT {
//Tests to make sure we can call the job with mock data and it runs.
- @Ignore("Connections won't save when run with maven, but on local builds it will.")
+ // Connections won't save when run with maven, but on local builds it will.
+ @Ignore("Pending merge of export-feature branch")
public void testConnectionsOnCollectionExport() throws Exception {
File f = null;
@@ -746,7 +747,7 @@ public class ExportServiceIT {
@Test
- @Ignore // TODO: fix this test...
+ @Ignore("Pending merge of export-feature branch")
public void testIntegration100EntitiesOn() throws Exception {
logger.debug("testIntegration100EntitiesOn(): starting...");
@@ -834,8 +835,8 @@ public class ExportServiceIT {
}
}
- @Ignore("Why is this ignored?")
@Test
+ @Ignore("Pending merge of export-feature branch")
public void testIntegration100EntitiesForAllApps() throws Exception {
S3Export s3Export = new S3ExportImpl();
@@ -917,8 +918,8 @@ public class ExportServiceIT {
}
- @Ignore("Why is this ignored")
@Test
+ @Ignore("Pending merge of export-feature branch")
public void testIntegration100EntitiesOnOneOrg() throws Exception {
S3Export s3Export = new S3ExportImpl();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/22c29fb7/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
index d7d7028..7dc075c 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
@@ -138,7 +138,7 @@ public class ImportServiceIT {
// test case to check if application is imported correctly
@Test
- @Ignore("Import organization not supported")
+ @Ignore("Pending merge of export-feature branch. Import organization not supported")
public void testImportApplication() throws Exception {
EntityManager em = setup.getEmf().getEntityManager( applicationId );
@@ -260,7 +260,7 @@ public class ImportServiceIT {
// test case to check if all applications file for an organization are imported correctly
@Test
- @Ignore("Import organization not supported")
+ @Ignore("Pending merge of export-feature branch. Import organization not supported")
public void testImportOrganization() throws Exception {
// creates 5 entities in usertests collection
@@ -455,7 +455,7 @@ public class ImportServiceIT {
* Test to the doImport method with null organziation ID
*/
@Test
- @Ignore("Import organization not supported")
+ @Ignore("Pending merge of export-feature branch. Import organization not supported")
public void testDoImportWithNullOrganizationID() throws Exception {
// import
S3Import s3Import = new S3ImportImpl();
@@ -481,7 +481,7 @@ public class ImportServiceIT {
* Test to the doImport method with fake organization ID
*/
@Test
- @Ignore("Import organization not supported")
+ @Ignore("Pending merge of export-feature branch. Import organization not supported")
public void testDoImportWithFakeOrganizationID() throws Exception {
UUID fakeOrgId = UUID.fromString( "AAAAAAAA-FFFF-FFFF-FFFF-AAAAAAAAAAAA" );
@@ -511,7 +511,7 @@ public class ImportServiceIT {
* Test to the doImport method with fake application ID
*/
@Test
- @Ignore("Import application not supported")
+ @Ignore("Pending merge of export-feature branch. Import application not supported")
public void testDoImportWithFakeApplicationID() throws Exception {
UUID fakeappId = UUID.fromString( "AAAAAAAA-FFFF-FFFF-FFFF-AAAAAAAAAAAA" );
@@ -543,7 +543,7 @@ public class ImportServiceIT {
* Test to the doImport Collection method with fake application ID
*/
@Test
- @Ignore("Import application not supported")
+ @Ignore("Pending merge of export-feature branch. Import application not supported")
public void testDoImportCollectionWithFakeApplicationID() throws Exception {
UUID fakeappId = UUID.fromString( "AAAAAAAA-FFFF-FFFF-FFFF-AAAAAAAAAAAA" );
[48/50] usergrid git commit: Error checking in WriteStart,
fixing timing in UV serialization test and ignore test broken by
disabled delete.
Posted by sn...@apache.org.
Error checking in WriteStart, fixing timing in UV serialization test and ignore test broken by disabled delete.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c96e2944
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c96e2944
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c96e2944
Branch: refs/heads/USERGRID-872
Commit: c96e2944fa170cb4bc68c18943310a42de9fa352
Parents: 78f3da6
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 14:51:08 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 14:51:08 2015 -0500
----------------------------------------------------------------------
.../persistence/collection/mvcc/stage/write/WriteStart.java | 7 +++++--
.../impl/UniqueValueSerializationStrategyImplTest.java | 4 ++--
.../persistence/graph/impl/NodeDeleteListenerTest.java | 1 +
3 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/c96e2944/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java
index 7d73b7b..79b2d85 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java
@@ -26,6 +26,8 @@ import com.netflix.astyanax.connectionpool.exceptions.ConnectionException;
import rx.functions.Func1;
+import static org.apache.usergrid.persistence.core.util.ValidationUtils.verifyEntityWrite;
+
/**
* This is the first stage and should be invoked immediately when a write is started. It should
@@ -53,7 +55,9 @@ public class WriteStart implements Func1<CollectionIoEvent<Entity>, CollectionIo
@Override
public CollectionIoEvent<MvccEntity> call( final CollectionIoEvent<Entity> ioEvent ) {
- {
+
+ verifyEntityWrite( ioEvent.getEvent() );
+
final Entity entity = ioEvent.getEvent();
final ApplicationScope applicationScope = ioEvent.getEntityCollection();
@@ -84,6 +88,5 @@ public class WriteStart implements Func1<CollectionIoEvent<Entity>, CollectionIo
//create the mvcc entity for the next stage
return new CollectionIoEvent<>( applicationScope, nextStage );
- }
}
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/c96e2944/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
index 2fae482..fcf22cf 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/UniqueValueSerializationStrategyImplTest.java
@@ -127,7 +127,7 @@ public abstract class UniqueValueSerializationStrategyImplTest {
Id entityId = new SimpleId( UUIDGenerator.newTimeUUID(), "entity" );
UUID version = UUIDGenerator.newTimeUUID();
UniqueValue stored = new UniqueValueImpl( field, entityId, version );
- strategy.write( scope, stored, 2 ).execute();
+ strategy.write( scope, stored, 5 ).execute();
Thread.sleep( 1000 );
@@ -139,7 +139,7 @@ public abstract class UniqueValueSerializationStrategyImplTest {
Assert.assertNotNull( retrieved );
assertEquals( stored, retrieved );
- Thread.sleep( 1500 );
+ Thread.sleep( 5000 );
// wait another second, should be gone now
fields = strategy.load( scope, entityId.getType(), Collections.<Field>singleton( field ) );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/c96e2944/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
index f2d4d94..5a5df79 100644
--- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
+++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
@@ -319,6 +319,7 @@ public class NodeDeleteListenerTest {
* since it has no other targets
*/
@Test
+ @Ignore("Pending re-enable of delete functionality")
public void testMultiDelete() throws ConnectionException, InterruptedException {
GraphManager em = emf.createEdgeManager( scope );
[21/50] usergrid git commit: Merge branch 'refs/heads/2.1-release'
Posted by sn...@apache.org.
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/USERGRID-872
Commit: c3c2818e27cb4ebe19257e7539923eef709efd85
Parents: 14dd48d d4d3ed3
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Nov 12 16:28:04 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
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(-)
----------------------------------------------------------------------
[15/50] usergrid git commit: Call foreach on the set directly and
only call createEntityIndex on a unique set of appIds.
Posted by sn...@apache.org.
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/USERGRID-872
Commit: b89564398e1094203d224a1586103fe9298d12d9
Parents: f13e45b
Author: Michael Russo <mi...@gmail.com>
Authored: Thu Nov 12 11:39:17 2015 -0800
Committer: Michael Russo <mi...@gmail.com>
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<UUID,Boolean> 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<UUID> 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);
}
- };
+ );
}
[39/50] usergrid git commit: Use JUnut Categories to exclude too
heavy (aka stress) tests and experimental tests.
Posted by sn...@apache.org.
Use JUnut Categories to exclude too heavy (aka stress) tests and experimental tests.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/99b932ad
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/99b932ad
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/99b932ad
Branch: refs/heads/USERGRID-872
Commit: 99b932ada3809a33ad8a824b9177d427edb6feba
Parents: d1f1710
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 07:54:39 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 07:54:39 2015 -0500
----------------------------------------------------------------------
stack/build-tools/pom.xml | 11 +++++
stack/config/pom.xml | 10 +++++
.../clustering/hazelcast/HazelcastTest.java | 5 ++-
.../usergrid/corepersistence/index/RxTest.java | 6 ++-
.../persistence/PerformanceEntityReadTest.java | 4 +-
.../persistence/PerformanceEntityWriteTest.java | 4 +-
.../EntityCollectionManagerStressTest.java | 6 ++-
.../impl/SerializationComparison.java | 5 ++-
stack/corepersistence/common/pom.xml | 1 +
stack/corepersistence/graph/pom.xml | 1 +
.../persistence/graph/GraphManagerLoadTest.java | 7 ++--
.../graph/GraphManagerShardConsistencyIT.java | 4 +-
.../graph/GraphManagerStressTest.java | 44 +++++++++-----------
.../serialization/EdgeSerializationTest.java | 6 ++-
stack/corepersistence/map/pom.xml | 1 +
.../org/apache/usergrid/ExperimentalTest.java | 22 ++++++++++
.../java/org/apache/usergrid/StressTest.java | 22 ++++++++++
stack/corepersistence/pom.xml | 2 +
stack/corepersistence/queryindex/pom.xml | 5 +--
.../index/impl/IndexLoadTestsIT.java | 3 ++
stack/pom.xml | 12 ++----
stack/rest/pom.xml | 2 +
stack/services/pom.xml | 8 +---
.../providers/PingIdentityProviderIT.java | 4 +-
.../AbstractServiceNotificationIT.java | 1 +
.../apns/NotificationsServiceIT.java | 1 +
.../gcm/NotificationsServiceIT.java | 2 +
27 files changed, 139 insertions(+), 60 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/build-tools/pom.xml
----------------------------------------------------------------------
diff --git a/stack/build-tools/pom.xml b/stack/build-tools/pom.xml
index 149c1a7..2001396 100644
--- a/stack/build-tools/pom.xml
+++ b/stack/build-tools/pom.xml
@@ -38,4 +38,15 @@
o to adjust checkstyle settings or suppress reporting please us the
files contained under src/main/resources/usergrid
-->
+
+ <!-- the surefire excludedGroups configuration in parent requires this dependency here -->
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
</project>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/config/pom.xml
----------------------------------------------------------------------
diff --git a/stack/config/pom.xml b/stack/config/pom.xml
index 915d32a..4ee1a3b 100644
--- a/stack/config/pom.xml
+++ b/stack/config/pom.xml
@@ -42,4 +42,14 @@
</resource>
</resources>
</build>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
</project>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/core/src/test/java/org/apache/usergrid/clustering/hazelcast/HazelcastTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/clustering/hazelcast/HazelcastTest.java b/stack/core/src/test/java/org/apache/usergrid/clustering/hazelcast/HazelcastTest.java
index 8f6226b..63a181e 100644
--- a/stack/core/src/test/java/org/apache/usergrid/clustering/hazelcast/HazelcastTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/clustering/hazelcast/HazelcastTest.java
@@ -20,10 +20,13 @@ package org.apache.usergrid.clustering.hazelcast;
import java.util.Collection;
import java.util.Set;
+import org.apache.usergrid.ExperimentalTest;
+import org.apache.usergrid.StressTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
@@ -38,7 +41,7 @@ import com.hazelcast.core.Member;
import com.hazelcast.core.MessageListener;
-@Ignore("Experimental test")
+@Category(ExperimentalTest.class)
public class HazelcastTest implements InstanceListener, MessageListener<Object> {
private static final Logger logger = LoggerFactory.getLogger( HazelcastTest.class );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
index 1a94aac..6bb8947 100644
--- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
@@ -23,9 +23,11 @@ package org.apache.usergrid.corepersistence.index;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
+import org.apache.usergrid.ExperimentalTest;
import org.junit.Ignore;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import rx.Observable;
import rx.Subscription;
import rx.observables.ConnectableObservable;
@@ -41,7 +43,7 @@ import static org.junit.Assert.assertTrue;
public class RxTest {
@Test
- @Ignore("This fails intermittently. Possible race condition with Rx. Need to investigate more.")
+ @Category(ExperimentalTest.class )
public void testPublish() throws InterruptedException {
final int count = 10;
@@ -64,7 +66,7 @@ public class RxTest {
@Test
- @Ignore("Experimental - seems like it should work, yet blocks forever")
+ @Category(ExperimentalTest.class )
public void testConnectableObserver() throws InterruptedException {
final int count = 10;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityReadTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityReadTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityReadTest.java
index f7435ef..88144c8 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityReadTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityReadTest.java
@@ -24,11 +24,13 @@ import java.util.Map;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
+import org.apache.usergrid.StressTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,7 +46,7 @@ import com.codahale.metrics.Slf4jReporter;
//@RunWith(JukitoRunner.class)
//@UseModules({ GuiceModule.class })
-@Ignore("Kills embedded cassandra")
+@Category(StressTest.class)
public class PerformanceEntityReadTest extends AbstractCoreIT {
private static final Logger logger = LoggerFactory.getLogger(PerformanceEntityReadTest.class );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityWriteTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityWriteTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityWriteTest.java
index 341af90..3997615 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityWriteTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityWriteTest.java
@@ -23,11 +23,13 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
+import org.apache.usergrid.StressTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -43,7 +45,7 @@ import com.codahale.metrics.Slf4jReporter;
//@RunWith(JukitoRunner.class)
//@UseModules({ GuiceModule.class })
-@Ignore("Kills embedded cassandra")
+@Category(StressTest.class)
public class PerformanceEntityWriteTest extends AbstractCoreIT {
private static final Logger LOG = LoggerFactory.getLogger( PerformanceEntityWriteTest.class );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerStressTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerStressTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerStressTest.java
index 20cf24e..1aabf75 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerStressTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerStressTest.java
@@ -21,9 +21,11 @@ package org.apache.usergrid.persistence.collection;
import java.util.HashSet;
import java.util.Set;
+import org.apache.usergrid.StressTest;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -50,7 +52,7 @@ import static org.junit.Assert.assertNotNull;
@RunWith(ITRunner.class)
@UseModules(TestCollectionModule.class)
-@Ignore("Stress test should not be run in embedded mode")
+@Category(StressTest.class)
public class EntityCollectionManagerStressTest {
private static final Logger log = LoggerFactory.getLogger(
EntityCollectionManagerStressTest.class );
@@ -58,7 +60,7 @@ public class EntityCollectionManagerStressTest {
@Inject
private EntityCollectionManagerFactory factory;
- @Inject
+ @Inject
@Rule
public MigrationManagerRule migrationManagerRule;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/SerializationComparison.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/SerializationComparison.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/SerializationComparison.java
index 660a6a9..a2ed6c7 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/SerializationComparison.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/SerializationComparison.java
@@ -23,8 +23,9 @@ package org.apache.usergrid.persistence.collection.serialization.impl;
import java.io.IOException;
import java.util.UUID;
-import org.junit.Ignore;
+import org.apache.usergrid.StressTest;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -48,6 +49,7 @@ import com.fasterxml.jackson.dataformat.smile.SmileFactory;
*
* @author tnine
*/
+@Category(StressTest.class)
public class SerializationComparison {
private static final Logger logger = LoggerFactory.getLogger( SerializationComparison.class );
@@ -56,7 +58,6 @@ public class SerializationComparison {
@Test
- @Ignore("Too heavy for normal build process?")
public void smileSerialization() throws IOException {
SmileFactory smile = new SmileFactory();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/common/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/pom.xml b/stack/corepersistence/common/pom.xml
index 2082b04..0f54896 100644
--- a/stack/corepersistence/common/pom.xml
+++ b/stack/corepersistence/common/pom.xml
@@ -183,6 +183,7 @@
<version>${surefire.plugin.version}</version>
<configuration>
<argLine>-javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec</argLine>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/graph/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/pom.xml b/stack/corepersistence/graph/pom.xml
index 23621fb..93fbbd5 100644
--- a/stack/corepersistence/graph/pom.xml
+++ b/stack/corepersistence/graph/pom.xml
@@ -104,6 +104,7 @@
<version>${surefire.plugin.version}</version>
<configuration>
<argLine>-javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec</argLine>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerLoadTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerLoadTest.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerLoadTest.java
index 22683f6..a0be6a6 100644
--- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerLoadTest.java
+++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerLoadTest.java
@@ -29,10 +29,12 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
+import org.apache.usergrid.StressTest;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -63,7 +65,7 @@ import static org.junit.Assert.fail;
@RunWith( ITRunner.class )
@UseModules( TestGraphModule.class )
-@Ignore("Not for testing during build. Kills embedded Cassandra")
+@Category(StressTest.class)
public class GraphManagerLoadTest {
private static final Logger log = LoggerFactory.getLogger( GraphManagerLoadTest.class );
@@ -95,7 +97,6 @@ public class GraphManagerLoadTest {
}
-// @Ignore
@Test
public void writeThousandsSingleSource() throws InterruptedException, ExecutionException {
EdgeGenerator generator = new EdgeGenerator() {
@@ -124,7 +125,7 @@ public class GraphManagerLoadTest {
@Test
- @Ignore("Too heavy for normal build process")
+ @Category(StressTest.class)
public void writeThousandsSingleTarget() throws InterruptedException, ExecutionException {
EdgeGenerator generator = new EdgeGenerator() {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/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 9000c75..45c3d80 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
@@ -39,10 +39,12 @@ import java.util.concurrent.atomic.AtomicLong;
import javax.annotation.Nullable;
+import org.apache.usergrid.StressTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -393,7 +395,7 @@ public class GraphManagerShardConsistencyIT {
@Test(timeout=120000)
- @Ignore("This works, but is occasionally causing cassandra to fall over. Unignore when merged with new shard strategy")
+ @Category(StressTest.class)
public void writeThousandsDelete()
throws InterruptedException, ExecutionException, MigrationException, UnsupportedEncodingException {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerStressTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerStressTest.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerStressTest.java
index 6a2efc9..98065ce 100644
--- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerStressTest.java
+++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/GraphManagerStressTest.java
@@ -19,20 +19,10 @@
package org.apache.usergrid.persistence.graph;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
+import com.google.common.base.Optional;
+import com.google.inject.Inject;
import org.apache.commons.lang3.time.StopWatch;
-
+import org.apache.usergrid.StressTest;
import org.apache.usergrid.persistence.core.guice.MigrationManagerRule;
import org.apache.usergrid.persistence.core.scope.ApplicationScope;
import org.apache.usergrid.persistence.core.test.ITRunner;
@@ -42,25 +32,29 @@ import org.apache.usergrid.persistence.graph.guice.TestGraphModule;
import org.apache.usergrid.persistence.graph.impl.SimpleSearchByEdgeType;
import org.apache.usergrid.persistence.model.entity.Id;
import org.apache.usergrid.persistence.model.util.UUIDGenerator;
-
-import com.google.common.base.Optional;
-import com.google.inject.Inject;
-
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import rx.Observable;
import rx.Subscriber;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+
import static org.apache.usergrid.persistence.graph.test.util.EdgeTestUtils.createEdge;
-import static org.apache.usergrid.persistence.core.util.IdGenerator.createId;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@RunWith(ITRunner.class)
@UseModules(TestGraphModule.class)
-@Ignore("Stress test should not be run in embedded mode")
+@Category(StressTest.class)
public class GraphManagerStressTest {
private static final Logger log = LoggerFactory.getLogger( GraphManagerStressTest.class );
@@ -89,7 +83,7 @@ public class GraphManagerStressTest {
@Test
- @Ignore("Too heavy for normal build process")
+ @Category(StressTest.class)
public void writeThousands() throws InterruptedException {
EdgeGenerator generator = new EdgeGenerator() {
@@ -177,7 +171,7 @@ public class GraphManagerStressTest {
}
- @Ignore("Too heavy for normal build process")
+ @Category(StressTest.class)
@Test
public void writeThousandsSingleSource() throws InterruptedException {
EdgeGenerator generator = new EdgeGenerator() {
@@ -205,7 +199,7 @@ public class GraphManagerStressTest {
@Test
- @Ignore("Too heavy for normal build process")
+ @Category(StressTest.class)
public void writeThousandsSingleTarget() throws InterruptedException {
EdgeGenerator generator = new EdgeGenerator() {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/EdgeSerializationTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/EdgeSerializationTest.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/EdgeSerializationTest.java
index d875e83..d81413e 100644
--- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/EdgeSerializationTest.java
+++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/EdgeSerializationTest.java
@@ -25,10 +25,12 @@ import java.util.Iterator;
import java.util.Set;
import java.util.UUID;
+import org.apache.usergrid.StressTest;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -650,7 +652,7 @@ public abstract class EdgeSerializationTest {
* Test paging by resuming the search from the edge
*/
@Test
- @Ignore("Kills embedded cassandra")
+ @Category(StressTest.class)
public void pageIteration() throws ConnectionException {
int size = graphFig.getScanPageSize() * 2;
@@ -690,7 +692,7 @@ public abstract class EdgeSerializationTest {
* edge types
*/
@Test
- @Ignore("Kills embedded cassandra")
+ @Category(StressTest.class)
public void testIteratorPaging() throws ConnectionException {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/map/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/map/pom.xml b/stack/corepersistence/map/pom.xml
index e6f4d54..8589716 100644
--- a/stack/corepersistence/map/pom.xml
+++ b/stack/corepersistence/map/pom.xml
@@ -81,6 +81,7 @@ limitations under the License.
<version>${surefire.plugin.version}</version>
<configuration>
<argLine>-javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec</argLine>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/model/src/main/java/org/apache/usergrid/ExperimentalTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/model/src/main/java/org/apache/usergrid/ExperimentalTest.java b/stack/corepersistence/model/src/main/java/org/apache/usergrid/ExperimentalTest.java
new file mode 100644
index 0000000..5138fa4
--- /dev/null
+++ b/stack/corepersistence/model/src/main/java/org/apache/usergrid/ExperimentalTest.java
@@ -0,0 +1,22 @@
+/*
+ * 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;
+
+public interface ExperimentalTest {}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/model/src/main/java/org/apache/usergrid/StressTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/model/src/main/java/org/apache/usergrid/StressTest.java b/stack/corepersistence/model/src/main/java/org/apache/usergrid/StressTest.java
new file mode 100644
index 0000000..a51439e
--- /dev/null
+++ b/stack/corepersistence/model/src/main/java/org/apache/usergrid/StressTest.java
@@ -0,0 +1,22 @@
+/*
+ * 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;
+
+public interface StressTest {}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/pom.xml b/stack/corepersistence/pom.xml
index dab863b..66129ed 100644
--- a/stack/corepersistence/pom.xml
+++ b/stack/corepersistence/pom.xml
@@ -54,6 +54,7 @@ limitations under the License.
<version>${surefire.plugin.version}</version>
<configuration>
<argLine>-javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec</argLine>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
</plugin>
</plugins>
@@ -126,6 +127,7 @@ limitations under the License.
<archaius.deployment.environment>UNIT</archaius.deployment.environment>
</systemPropertyVariables>
<argLine>-Xms2G -Xmx4G</argLine>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
</plugin>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/queryindex/pom.xml
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/pom.xml b/stack/corepersistence/queryindex/pom.xml
index 59f4f56..003281e 100644
--- a/stack/corepersistence/queryindex/pom.xml
+++ b/stack/corepersistence/queryindex/pom.xml
@@ -55,10 +55,7 @@
<include>**/*IT.java</include>
<include>**/*Test.java</include>
</includes>
- <!-- run this one manually to stress test -->
- <excludes>
- <exclude>**/IndexLoadTestsIT.java</exclude>
- </excludes>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
</plugin>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/IndexLoadTestsIT.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/IndexLoadTestsIT.java b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/IndexLoadTestsIT.java
index 1be1195..2343784 100644
--- a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/IndexLoadTestsIT.java
+++ b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/IndexLoadTestsIT.java
@@ -23,12 +23,14 @@ import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
+import org.apache.usergrid.StressTest;
import org.apache.usergrid.persistence.core.astyanax.CassandraFig;
import org.apache.usergrid.persistence.index.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -77,6 +79,7 @@ import static org.junit.Assert.assertEquals;
*/
@RunWith( EsRunner.class )
@UseModules( { TestIndexModule.class } )
+@Category( StressTest.class )
public class IndexLoadTestsIT extends BaseIT {
private static final Logger log = LoggerFactory.getLogger( IndexLoadTestsIT.class );
public static final String FIELD_WORKER_INDEX = "workerIndex";
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/pom.xml
----------------------------------------------------------------------
diff --git a/stack/pom.xml b/stack/pom.xml
index 3f7b68b..1df8463 100644
--- a/stack/pom.xml
+++ b/stack/pom.xml
@@ -127,7 +127,7 @@
<usergrid.it.threads>8</usergrid.it.threads>
<metrics.version>3.0.0</metrics.version>
- <surefire.plugin.artifactName>surefire-junit47</surefire.plugin.artifactName>
+ <surefire.plugin.artifactName>surefire-junit47</surefire.plugin.artifactName>
<surefire.plugin.version>2.18.1</surefire.plugin.version>
<powermock.version>1.6.1</powermock.version>
@@ -1344,6 +1344,7 @@
<systemPropertyVariables>
<jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
</systemPropertyVariables>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
<!-- TODO, we may need an exclusion. Appears to be a classloader bug
@@ -1354,14 +1355,6 @@
<groupId>org.apache.maven.surefire</groupId>
<artifactId>${surefire.plugin.artifactName}</artifactId>
<version>${surefire.plugin.version}</version>
-<!--
- <exclusions>
- <exclusion>
- <groupId>org.apache.maven.surfire</groupId>
- <artifactId>common-junit3</artifactId>
- </exclusion>
- </exclusions>
--->
</dependency>
<!-- override plex utils, otherwise bug from above SO post happens-->
@@ -1585,6 +1578,7 @@
<version>${surefire.plugin.version}</version>
<configuration>
<argLine>-javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar ${ug.argline} -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec</argLine>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/rest/pom.xml
----------------------------------------------------------------------
diff --git a/stack/rest/pom.xml b/stack/rest/pom.xml
index 601ed61..f0ce7b3 100644
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@ -85,6 +85,7 @@
<include>**/*IT.java</include>
<include>**/*Test.java</include>
</includes>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
@@ -422,6 +423,7 @@
<version>${surefire.plugin.version}</version>
<configuration>
<argLine>-javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec -Dwebapp.directory=${basedir}/src/main/webapp -Dtest.barrier.timestamp=${maven.build.timestamp} -Dtest.clean.storage=true -Xmx${ug.heapmax} -Xms${ug.heapmin} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar -Djava.util.logging.config.file=${basedir}/src/test/resources/logging.properties ${ug.argline}</argLine>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/services/pom.xml
----------------------------------------------------------------------
diff --git a/stack/services/pom.xml b/stack/services/pom.xml
index 9837e76..bfd2f3b 100644
--- a/stack/services/pom.xml
+++ b/stack/services/pom.xml
@@ -103,12 +103,7 @@
<include>**/*IT.java</include>
<include>**/*Test.java</include>
</includes>
- <excludes>
- <exclude>**/*Scheduler*IT.java</exclude>
- <exclude>**/*Notification*IT.java</exclude>
- <exclude>**/ExportServiceIT.java</exclude>
- <exclude>**/ImportServiceIT.java</exclude>
- </excludes>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
<dependencies>
<dependency>
@@ -474,6 +469,7 @@
<version>${surefire.plugin.version}</version>
<configuration>
<argLine>-Dtest.barrier.timestamp=${maven.build.timestamp} -Dtest.clean.storage=true -Xmx${ug.heapmax} -Xms${ug.heapmin} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar ${ug.argline} -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec</argLine>
+ <excludedGroups>org.apache.usergrid.StressTest,org.apache.usergrid.ExperimentalTest</excludedGroups>
</configuration>
</plugin>
</plugins>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/services/src/test/java/org/apache/usergrid/security/providers/PingIdentityProviderIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/security/providers/PingIdentityProviderIT.java b/stack/services/src/test/java/org/apache/usergrid/security/providers/PingIdentityProviderIT.java
index c47b954..df63d1f 100644
--- a/stack/services/src/test/java/org/apache/usergrid/security/providers/PingIdentityProviderIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/security/providers/PingIdentityProviderIT.java
@@ -20,6 +20,7 @@ package org.apache.usergrid.security.providers;
import java.util.Map;
import java.util.UUID;
+import org.apache.usergrid.ExperimentalTest;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Ignore;
@@ -37,13 +38,14 @@ import org.apache.usergrid.persistence.entities.Application;
import org.apache.usergrid.persistence.entities.User;
import org.apache.usergrid.persistence.index.impl.ElasticSearchResource;
import org.apache.usergrid.utils.MapUtils;
+import org.junit.experimental.categories.Category;
import static junit.framework.Assert.assertNotNull;
/** @author zznate */
-@Ignore("Experimental Ping Indentiyy test")
+@Category(ExperimentalTest.class )
public class PingIdentityProviderIT {
private static UserInfo adminUser;
private static OrganizationInfo organization;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/services/src/test/java/org/apache/usergrid/services/notifications/AbstractServiceNotificationIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/services/notifications/AbstractServiceNotificationIT.java b/stack/services/src/test/java/org/apache/usergrid/services/notifications/AbstractServiceNotificationIT.java
index 798f183..d0d2c29 100644
--- a/stack/services/src/test/java/org/apache/usergrid/services/notifications/AbstractServiceNotificationIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/services/notifications/AbstractServiceNotificationIT.java
@@ -23,6 +23,7 @@ import org.apache.usergrid.persistence.Query;
import org.apache.usergrid.services.ServiceManagerFactory;
import org.junit.Before;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.rules.TestName;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/services/src/test/java/org/apache/usergrid/services/notifications/apns/NotificationsServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/services/notifications/apns/NotificationsServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/services/notifications/apns/NotificationsServiceIT.java
index 8b94661..a3ff449 100644
--- a/stack/services/src/test/java/org/apache/usergrid/services/notifications/apns/NotificationsServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/services/notifications/apns/NotificationsServiceIT.java
@@ -41,6 +41,7 @@ import static org.apache.usergrid.services.notifications.impl.ApplicationQueueMa
// todo: test reschedule on delivery time change
// todo: test restart of queuing
+@Ignore
public class NotificationsServiceIT extends AbstractServiceNotificationIT {
private static final Logger LOG = LoggerFactory.getLogger(NotificationsServiceIT.class);
http://git-wip-us.apache.org/repos/asf/usergrid/blob/99b932ad/stack/services/src/test/java/org/apache/usergrid/services/notifications/gcm/NotificationsServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/services/notifications/gcm/NotificationsServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/services/notifications/gcm/NotificationsServiceIT.java
index 3218137..3369786 100644
--- a/stack/services/src/test/java/org/apache/usergrid/services/notifications/gcm/NotificationsServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/services/notifications/gcm/NotificationsServiceIT.java
@@ -142,6 +142,7 @@ public class NotificationsServiceIT extends AbstractServiceNotificationIT {
}
@Test
+ @Ignore
public void singlePushNotification() throws Exception {
app.clear();
@@ -167,6 +168,7 @@ public class NotificationsServiceIT extends AbstractServiceNotificationIT {
}
@Test
+ @Ignore
public void singlePushNotificationViaUser() throws Exception {
app.clear();
[23/50] usergrid git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/usergrid
Posted by sn...@apache.org.
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/bab89fe0
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/bab89fe0
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/bab89fe0
Branch: refs/heads/USERGRID-872
Commit: bab89fe0fb77bf5358a170150125891ba5756c41
Parents: 6827f08 c3c2818
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Nov 13 09:49:38 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Nov 13 09:49:38 2015 -0500
----------------------------------------------------------------------
.../usergrid/corepersistence/CoreModule.java | 132 +++-
.../asyncevents/AmazonAsyncEventService.java | 47 +-
.../asyncevents/AsyncEventsSchedulerFig.java | 94 +++
.../asyncevents/AsyncIndexProvider.java | 2 +-
.../asyncevents/EventExecutionScheduler.java | 37 ++
.../migration/DeDupConnectionDataMigration.java | 2 +-
.../read/traverse/AbstractReadGraphFilter.java | 8 +-
.../traverse/ReadGraphCollectionFilter.java | 3 +-
.../traverse/ReadGraphConnectionFilter.java | 3 +-
.../corepersistence/rx/impl/AsyncRepair.java | 38 ++
.../rx/impl/ResponseImportTasks.java | 38 ++
.../service/ServiceSchedulerFig.java | 66 ++
.../usergrid/corepersistence/index/RxTest.java | 1 +
.../collection/guice/CollectionModule.java | 32 +
.../guice/CollectionTaskExecutor.java | 35 --
.../EntityCollectionManagerFactoryImpl.java | 5 +-
.../impl/EntityCollectionManagerImpl.java | 20 +-
.../mvcc/stage/delete/UniqueCleanup.java | 12 +-
.../mvcc/stage/write/WriteCommit.java | 11 +-
.../collection/mvcc/stage/write/WriteStart.java | 2 -
.../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 +--
.../persistence/graph/guice/GraphModule.java | 7 -
.../impl/shard/DirectedEdgeMeta.java | 4 +-
.../impl/shard/EdgeShardStrategy.java | 10 +-
.../impl/shard/NodeShardApproximation.java | 66 --
.../impl/shard/ShardEntryGroup.java | 3 +-
.../impl/shard/ShardedEdgeSerialization.java | 2 +-
.../serialization/impl/shard/count/Counter.java | 131 ----
.../shard/count/NodeShardApproximationImpl.java | 272 --------
.../count/NodeShardCounterSerialization.java | 48 --
.../NodeShardCounterSerializationImpl.java | 186 ------
.../impl/shard/count/ShardKey.java | 75 ---
.../shard/impl/NodeShardAllocationImpl.java | 20 +-
.../impl/shard/impl/ShardGroupDeletionImpl.java | 158 ++---
.../impl/ShardedEdgeSerializationImpl.java | 31 +-
.../shard/impl/SizebasedEdgeColumnFamilies.java | 4 +-
.../shard/impl/SizebasedEdgeShardStrategy.java | 13 +-
.../graph/GraphManagerShardConsistencyIT.java | 5 +
.../graph/GraphManagerShardingIT.java | 208 ------
.../graph/impl/NodeDeleteListenerTest.java | 1 -
.../impl/shard/NodeShardAllocationTest.java | 48 +-
.../impl/shard/ShardEntryGroupTest.java | 28 +
.../shard/count/NodeShardApproximationTest.java | 627 -------------------
.../NodeShardCounterSerializationTest.java | 124 ----
.../shard/impl/ShardGroupDeletionImplTest.java | 5 +
.../index/impl/DeIndexOperation.java | 4 +-
.../index/impl/EntityMappingParser.java | 4 +
.../index/impl/IndexOperationMessage.java | 4 +-
.../persistence/index/impl/IndexingUtils.java | 21 +
.../EsIndexMappingMigrationPlugin.java | 2 +-
.../index/impl/EntityToMapConverterTest.java | 48 ++
.../index/impl/IndexingUtilsTest.java | 36 ++
.../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 | 4 -
stack/rest/pom.xml | 10 +
.../exceptions/AbstractExceptionMapper.java | 8 +-
stack/scripts/multitenant_migrate.py | 48 +-
stack/services/pom.xml | 23 +-
.../services/AbstractCollectionService.java | 10 +-
.../usergrid/services/AbstractService.java | 13 +-
.../services/notifications/wns/WNSAdapter.java | 5 +-
.../notifications/wns/WNSAdapterTest.java | 49 ++
75 files changed, 1257 insertions(+), 2293 deletions(-)
----------------------------------------------------------------------
[19/50] usergrid git commit: Merge branch 'refs/heads/2.1-release'
Posted by sn...@apache.org.
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/USERGRID-872
Commit: 14dd48d39d37abf97092264003942dcb73b3ccdf
Parents: 67ab244 6f61b05
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Nov 12 15:14:44 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
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 ? (double) hit.sortValues()[0] : -1;
+ return parseIndexDocId(documentId,distance);
+ }
+
+ public static CandidateResult parseIndexDocId( final String documentId ) {
+ return parseIndexDocId(documentId,-1);
+ }
+ /**
+ * Parse the document id into a candidate result
+ */
+ public static CandidateResult parseIndexDocId( final String documentId, final double distance ) {
- final Matcher matcher = DOCUMENT_PATTERN.matcher( documentId );
+ final Matcher matcher = DOCUMENT_PATTERN.matcher(documentId);
- Preconditions.checkArgument( matcher.matches(), "Pattern for document id did not match expected format" );
- Preconditions.checkArgument( matcher.groupCount() == 9, "9 groups expected in the pattern" );
+ Preconditions.checkArgument(matcher.matches(), "Pattern for document id did not match expected format");
+ Preconditions.checkArgument(matcher.groupCount() == 9, "9 groups expected in the pattern");
//Other fields can be parsed using groups. The groups start at value 1, group 0 is the entire match
- final String entityUUID = matcher.group( 3 );
- final String entityType = matcher.group( 4 );
+ final String entityUUID = matcher.group(3);
+ final String entityType = matcher.group(4);
- final String versionUUID = matcher.group( 5 );
+ final String versionUUID = matcher.group(5);
- Id entityId = new SimpleId( UUID.fromString( entityUUID ), entityType );
+ Id entityId = new SimpleId(UUID.fromString(entityUUID), entityType);
- return new CandidateResult( entityId, UUID.fromString( versionUUID ), documentId );
+ return distance >= 0
+ ? new GeoCandidateResult(entityId, UUID.fromString(versionUUID), documentId, distance)
+ : new CandidateResult(entityId, UUID.fromString(versionUUID), documentId);
}
+ /**
+ * Parse the document id into a candidate result
+ */
+ public static UUID parseAppIdFromIndexDocId( final String documentId) {
+
+ final Matcher matcher = DOCUMENT_PATTERN.matcher(documentId);
+
+ Preconditions.checkArgument(matcher.matches(), "Pattern for document id did not match expected format");
+ Preconditions.checkArgument(matcher.groupCount() == 9, "9 groups expected in the pattern");
+
+ //Other fields can be parsed using groups. The groups start at value 1, group 0 is the entire match
+ final String appUUID = matcher.group(1);
+
+ return UUID.fromString(appUUID);
+
+ }
+
/**
* Get the entity type
http://git-wip-us.apache.org/repos/asf/usergrid/blob/14dd48d3/stack/services/src/main/java/org/apache/usergrid/services/AbstractService.java
----------------------------------------------------------------------
diff --cc stack/services/src/main/java/org/apache/usergrid/services/AbstractService.java
index e7d4fc4,3887f92..88d87fe
--- a/stack/services/src/main/java/org/apache/usergrid/services/AbstractService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/AbstractService.java
@@@ -27,7 -27,9 +27,10 @@@ import java.util.Set
import java.util.UUID;
import com.codahale.metrics.Timer;
+import org.apache.usergrid.persistence.cache.CacheFactory;
+
+ import org.apache.usergrid.corepersistence.rx.impl.ResponseImportTasks;
+ import org.apache.usergrid.corepersistence.service.ServiceSchedulerFig;
import org.apache.usergrid.persistence.core.metrics.MetricsFactory;
import org.apache.usergrid.persistence.core.metrics.ObservableTimer;
import org.slf4j.Logger;
[30/50] usergrid git commit: Un-ignore some tests that now appear to
be working (again).
Posted by sn...@apache.org.
Un-ignore some tests that now appear to be working (again).
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/5c85b759
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/5c85b759
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/5c85b759
Branch: refs/heads/USERGRID-872
Commit: 5c85b7598586abe0b11e29918b09be11addec831
Parents: 59d2a71
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Nov 13 16:32:55 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Nov 13 16:32:55 2015 -0500
----------------------------------------------------------------------
.../applications/ApplicationResourceIT.java | 25 ++----------
.../applications/queries/MatrixQueryTests.java | 2 -
.../rest/filters/ContentTypeResourceIT.java | 4 --
.../usergrid/rest/management/AdminUsersIT.java | 8 ++--
.../cassandra/ManagementServiceIT.java | 41 +++++++-------------
5 files changed, 21 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/5c85b759/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
index 317b742..cd42262 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
@@ -230,7 +230,7 @@ public class ApplicationResourceIT extends AbstractRestIT {
* (for backwards compatibility)
*/
@Test
- @Ignore("this form of backwards compatibility no longer needed")
+ @Ignore("no longer relevant - this type of backwards compatibility no longer needed")
public void jsonForAcceptsTextHtml() throws Exception {
//Create the organization resource
@@ -371,22 +371,6 @@ public class ApplicationResourceIT extends AbstractRestIT {
assertNotNull(credentials.getClientSecret());
}
-
- @Test
- @Ignore //This is implemented now
- public void noAppDelete() throws IOException {
- String orgName = clientSetup.getOrganizationName().toLowerCase();
- String appName = clientSetup.getAppName().toLowerCase();
-
- ApiResponse apiResponse = target().path( String.format( "/%s/%s", orgName, appName ) )
- .queryParam( "access_token", this.getAdminToken().getAccessToken() )
- .request()
- .accept( MediaType.APPLICATION_JSON )
- .delete( ApiResponse.class );
-
- assertNotNull(apiResponse.getError());
- }
-
/**
* Test for an exception when a token's TTL is set greater than the maximum
*/
@@ -591,7 +575,6 @@ public class ApplicationResourceIT extends AbstractRestIT {
* Retrieve an oauth authorization using invalid credentials
*/
@Test
- @Ignore("viewable return types are not working in embedded tomcat 7.x")
public void authorizationCodeWithWrongCredentials() throws Exception {
//Create form input with bogus credentials
Form payload = new Form();
@@ -699,8 +682,8 @@ public class ApplicationResourceIT extends AbstractRestIT {
* Retrieve an access token using HTTP Basic authentication
*/
@Test
- @Ignore
- //Are we trying to generate token with token? Couldn't find enpoint that accepts token for generating token
+ @Ignore("Should fix - https://issues.apache.org/jira/browse/USERGRID-1106")
+ //Are we trying to generate token with token? Couldn't find endpoint that accepts token for generating token
public void clientCredentialsFlowWithHeaderAuthorization() throws Exception {
//retrieve the credentials
Credentials orgCredentials = getAppCredentials();
@@ -783,7 +766,7 @@ public class ApplicationResourceIT extends AbstractRestIT {
* Ensure that the Apigee Mobile Analytics config returns valid JSON
*/
@Test
- @Ignore
+ @Ignore("No longer relevant - Apigee internal")
public void validateApigeeApmConfigAPP() throws IOException {
String orgName = clientSetup.getOrganizationName().toLowerCase();
String appName = clientSetup.getAppName().toLowerCase();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/5c85b759/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/MatrixQueryTests.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/MatrixQueryTests.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/MatrixQueryTests.java
index de21e0a..7525d51 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/MatrixQueryTests.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/queries/MatrixQueryTests.java
@@ -41,7 +41,6 @@ public class MatrixQueryTests extends AbstractRestIT {
*
* @throws Exception
*/
- @Ignore
@Test
public void connectionsTest() throws Exception {
@@ -105,7 +104,6 @@ public class MatrixQueryTests extends AbstractRestIT {
assertEquals(1, user3likes.getResponse().getEntityCount());
}
- @Ignore
@Test
public void largeRootElements() {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/5c85b759/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
index 47afb8c..ce57c4b 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/filters/ContentTypeResourceIT.java
@@ -50,12 +50,8 @@ import static org.junit.Assert.assertNotNull;
/**
* @author tnine
*/
-
-// @Ignore("Client login is causing tests to fail due to socket closure by grizzly. Need to re-enable once we're not
-// using grizzly to test")
public class ContentTypeResourceIT extends AbstractRestIT {
-
/**
* Creates a simple entity of type game. Does not set the content type. The type should be set to json to match the
* body
http://git-wip-us.apache.org/repos/asf/usergrid/blob/5c85b759/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
index 9864e65..3aed997 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
@@ -398,7 +398,7 @@ public class AdminUsersIT extends AbstractRestIT {
assertFalse( inbox.isEmpty() );
}
- @Ignore("Test is broken due to viewables not being properly returned in the embedded tomcat")
+ @Ignore("Build problems - Test is broken due to viewables not being properly returned in the embedded tomcat")
@Test
public void checkFormPasswordReset() throws Exception {
@@ -434,8 +434,8 @@ public class AdminUsersIT extends AbstractRestIT {
assertTrue( html.contains( "invalid token" ) );
}
-//
-// TODO: will work once resetpw viewables work
+
+// // TODO: will work once resetpw viewables work
// @Test
// @Ignore( "causes problems in build" )
// public void passwordResetIncorrectUserName() throws Exception {
@@ -462,8 +462,6 @@ public class AdminUsersIT extends AbstractRestIT {
//
// assertTrue( html.contains( "password set" ) );
// }
-//
-//
/**
http://git-wip-us.apache.org/repos/asf/usergrid/blob/5c85b759/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
index f0c0c10..ad2ce66 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/cassandra/ManagementServiceIT.java
@@ -17,25 +17,11 @@
package org.apache.usergrid.management.cassandra;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.Before;
-import org.junit.ClassRule;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import org.apache.usergrid.NewOrgAppAdminRule;
import org.apache.usergrid.ServiceITSetup;
import org.apache.usergrid.ServiceITSetupImpl;
-import org.apache.usergrid.cassandra.SpringResource;
import org.apache.usergrid.cassandra.ClearShiroSubject;
-
+import org.apache.usergrid.cassandra.SpringResource;
import org.apache.usergrid.count.SimpleBatcher;
import org.apache.usergrid.management.OrganizationInfo;
import org.apache.usergrid.management.UserInfo;
@@ -43,7 +29,6 @@ import org.apache.usergrid.persistence.CredentialsInfo;
import org.apache.usergrid.persistence.Entity;
import org.apache.usergrid.persistence.EntityManager;
import org.apache.usergrid.persistence.entities.User;
-import org.apache.usergrid.persistence.index.impl.ElasticSearchResource;
import org.apache.usergrid.security.AuthPrincipalType;
import org.apache.usergrid.security.crypto.command.Md5HashCommand;
import org.apache.usergrid.security.crypto.command.Sha1HashCommand;
@@ -51,19 +36,22 @@ import org.apache.usergrid.security.tokens.TokenCategory;
import org.apache.usergrid.security.tokens.exceptions.InvalidTokenException;
import org.apache.usergrid.utils.JsonUtils;
import org.apache.usergrid.utils.UUIDUtils;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
import static org.apache.commons.codec.binary.Base64.encodeBase64URLSafeString;
-import static org.apache.usergrid.TestHelper.newUUIDString;
-import static org.apache.usergrid.TestHelper.uniqueApp;
-import static org.apache.usergrid.TestHelper.uniqueEmail;
-import static org.apache.usergrid.TestHelper.uniqueOrg;
-import static org.apache.usergrid.TestHelper.uniqueUsername;
+import static org.apache.usergrid.TestHelper.*;
import static org.apache.usergrid.persistence.Schema.DICTIONARY_CREDENTIALS;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.*;
/**
* @author zznate
@@ -462,7 +450,6 @@ public class ManagementServiceIT {
}
- @Ignore("Why is this ignored?")
public void superUserGetOrganizationsPage() throws Exception {
int beforeSize = setup.getMgmtSvc().getOrganizations().size() - 1;
// create 15 orgs
[12/50] usergrid git commit: fix alias issues
Posted by sn...@apache.org.
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/USERGRID-872
Commit: 30053318fd848cf777d76af77c90edc474a579ee
Parents: fec6520
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Nov 12 12:10:07 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
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 77777c2..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);
[43/50] usergrid git commit: Further categorization of tests.
Posted by sn...@apache.org.
Further categorization of tests.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/a9c1e840
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/a9c1e840
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/a9c1e840
Branch: refs/heads/USERGRID-872
Commit: a9c1e840172fb399a1b4212b4d9f9237b271ff61
Parents: 6af43dc
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 09:31:30 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 09:31:30 2015 -0500
----------------------------------------------------------------------
.../src/test/java/org/apache/usergrid/batch/BulkTestUtils.java | 1 -
.../org/apache/usergrid/count/BatchCountParallelismTest.java | 5 ++++-
.../src/test/java/org/apache/usergrid/utils/UUIDUtilsTest.java | 4 +++-
.../apache/usergrid/security/providers/FacebookProviderIT.java | 4 +++-
4 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/a9c1e840/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java b/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java
index c88175b..d711094 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/BulkTestUtils.java
@@ -23,7 +23,6 @@ import org.apache.usergrid.batch.repository.JobDescriptor;
/** @author zznate */
-@Ignore("Not a test")
public class BulkTestUtils {
public static JobFactory getBulkJobFactory() {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/a9c1e840/stack/core/src/test/java/org/apache/usergrid/count/BatchCountParallelismTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/count/BatchCountParallelismTest.java b/stack/core/src/test/java/org/apache/usergrid/count/BatchCountParallelismTest.java
index 37beeac..78c58a4 100644
--- a/stack/core/src/test/java/org/apache/usergrid/count/BatchCountParallelismTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/count/BatchCountParallelismTest.java
@@ -28,9 +28,11 @@ import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
+import org.apache.usergrid.ExperimentalTest;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -62,7 +64,8 @@ public class BatchCountParallelismTest {
@Test
- @Ignore("This test causes the build to hang when all stack tests are run")
+ @Category(ExperimentalTest.class)
+ // "This test causes the build to hang when all stack tests are run"
public void verifyConcurrentAdd() throws Exception {
final long startCount = batcher.invocationCounter.count();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/a9c1e840/stack/core/src/test/java/org/apache/usergrid/utils/UUIDUtilsTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/utils/UUIDUtilsTest.java b/stack/core/src/test/java/org/apache/usergrid/utils/UUIDUtilsTest.java
index 0493d31..524c5ce 100644
--- a/stack/core/src/test/java/org/apache/usergrid/utils/UUIDUtilsTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/utils/UUIDUtilsTest.java
@@ -27,8 +27,10 @@ import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
+import org.apache.usergrid.ExperimentalTest;
import org.junit.Ignore;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -142,7 +144,7 @@ public class UUIDUtilsTest {
@Test
- @Ignore("This test is timing dependent.")
+ @Category(ExperimentalTest.class)
@SuppressWarnings("unchecked")
public void verifyOrderingTsOnlyAndUnique() {
int count = 500;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/a9c1e840/stack/services/src/test/java/org/apache/usergrid/security/providers/FacebookProviderIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/security/providers/FacebookProviderIT.java b/stack/services/src/test/java/org/apache/usergrid/security/providers/FacebookProviderIT.java
index d22647f..cde0255 100644
--- a/stack/services/src/test/java/org/apache/usergrid/security/providers/FacebookProviderIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/security/providers/FacebookProviderIT.java
@@ -20,6 +20,7 @@ package org.apache.usergrid.security.providers;
import java.util.Map;
import java.util.UUID;
+import org.apache.usergrid.ExperimentalTest;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Ignore;
@@ -37,6 +38,7 @@ import org.apache.usergrid.persistence.entities.Application;
import org.apache.usergrid.persistence.entities.User;
import org.apache.usergrid.persistence.index.impl.ElasticSearchResource;
import org.apache.usergrid.utils.MapUtils;
+import org.junit.experimental.categories.Category;
import static org.apache.usergrid.TestHelper.newUUIDString;
import static org.apache.usergrid.TestHelper.uniqueOrg;
@@ -71,7 +73,7 @@ public class FacebookProviderIT {
@Test
- @Ignore("Requires Facebook credentials")
+ @Category(ExperimentalTest.class)
public void verifyGetOrCreateOk() throws Exception {
Application application = setup.getEmf().getEntityManager( applicationId ).getApplication();
Map fb_user = MapUtils.hashMap( "id", "12345678" ).map( "name", "Facebook User" ).map( "username", "fb.user" );
[22/50] usergrid git commit: remove unnecessary binary file.
Posted by sn...@apache.org.
remove unnecessary binary file.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/6827f08a
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/6827f08a
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/6827f08a
Branch: refs/heads/USERGRID-872
Commit: 6827f08a35446c11784d95f482a733a7040186d2
Parents: de42b9c
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Nov 13 09:47:11 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Nov 13 09:47:11 2015 -0500
----------------------------------------------------------------------
docs/push.tgz | Bin 1651449 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/6827f08a/docs/push.tgz
----------------------------------------------------------------------
diff --git a/docs/push.tgz b/docs/push.tgz
deleted file mode 100644
index ee85d35..0000000
Binary files a/docs/push.tgz and /dev/null differ
[10/50] usergrid git commit: Addresses issues found in the review.
Posted by sn...@apache.org.
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/USERGRID-872
Commit: 7725d90ec504f2002712636cfcad6a395de21226
Parents: 0e1f0e6
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Nov 12 11:54:12 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
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/corepersistence/rx/impl/ImportRepair.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/ImportRepair.java
deleted file mode 100644
index d65d04c..0000000
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/ImportRepair.java
+++ /dev/null
@@ -1,38 +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.rx.impl;
-
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import com.google.inject.BindingAnnotation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-
-/**
- * Label for using the async repair scheduler
- */
-@BindingAnnotation
-@Target({ FIELD, PARAMETER, METHOD }) @Retention(RUNTIME)
-public @interface ImportRepair {
-}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7725d90e/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/ResponseImportTasks.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/ResponseImportTasks.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/ResponseImportTasks.java
new file mode 100644
index 0000000..bf74d1f
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/ResponseImportTasks.java
@@ -0,0 +1,38 @@
+/*
+ * 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.rx.impl;
+
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import com.google.inject.BindingAnnotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+
+/**
+ * Label for using the async repair scheduler
+ */
+@BindingAnnotation
+@Target({ FIELD, PARAMETER, METHOD }) @Retention(RUNTIME)
+public @interface ResponseImportTasks {
+}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7725d90e/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
index 0a6e270..d788174 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
@@ -39,6 +39,7 @@ import org.apache.usergrid.persistence.core.rx.RxTaskSchedulerImpl;
import com.google.inject.AbstractModule;
import com.google.inject.Inject;
import com.google.inject.Provides;
+import com.google.inject.Singleton;
/**
@@ -77,13 +78,14 @@ public abstract class CollectionModule extends AbstractModule {
@Provides
@Inject
@CollectionExecutorScheduler
+ @Singleton
public RxTaskScheduler getRxTaskScheduler( final CollectionSchedulerFig collectionSchedulerFig ){
final String poolName = collectionSchedulerFig.getIoSchedulerName();
final int threadCount = collectionSchedulerFig.getMaxIoThreads();
- final ThreadPoolExecutor executor = TaskExecutorFactory.createTaskExecutor( poolName, threadCount, threadCount,
+ final ThreadPoolExecutor executor = TaskExecutorFactory.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/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 d6bbdc5..8079ad9 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
@@ -363,6 +363,9 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
continue;
}
+ //TODO, we need to validate the property in the entity matches the property in the unique value
+
+
//else add it to our result set
response.addEntity( expectedUnique.getField(), entity );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7725d90e/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/executor/TaskExecutorFactory.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/executor/TaskExecutorFactory.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/executor/TaskExecutorFactory.java
index bd3d3e9..4ffabf7 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/executor/TaskExecutorFactory.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/executor/TaskExecutorFactory.java
@@ -23,6 +23,7 @@ package org.apache.usergrid.persistence.core.executor;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.RejectedExecutionHandler;
+import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@@ -64,7 +65,13 @@ public class TaskExecutorFactory {
final int maxQueueSize, RejectionAction rejectionAction ) {
- final BlockingQueue<Runnable> queue = new ArrayBlockingQueue<Runnable>( maxQueueSize );
+ final BlockingQueue<Runnable> queue;
+
+ if(maxQueueSize == 0){
+ queue = new SynchronousQueue();
+ }else{
+ queue = new ArrayBlockingQueue<>( maxQueueSize );
+ }
if ( rejectionAction == RejectionAction.ABORT ) {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/7725d90e/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 662370f..85c973e 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
@@ -28,8 +28,7 @@ import java.util.UUID;
import com.codahale.metrics.Timer;
-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.ServiceSchedulerFig;
import org.apache.usergrid.persistence.core.metrics.MetricsFactory;
import org.apache.usergrid.persistence.core.metrics.ObservableTimer;
@@ -121,7 +120,7 @@ public abstract class AbstractService implements Service {
this.sm = sm;
em = sm.getEntityManager();
final Injector injector = sm.getApplicationContext().getBean( Injector.class );
- rxScheduler = injector.getInstance( Key.get(RxTaskScheduler.class, ImportRepair.class)).getAsyncIOScheduler();
+ rxScheduler = injector.getInstance( Key.get(RxTaskScheduler.class, ResponseImportTasks.class ) ).getAsyncIOScheduler();
rxSchedulerFig = injector.getInstance(ServiceSchedulerFig.class );
metricsFactory = injector.getInstance(MetricsFactory.class);
this.entityGetTimer = metricsFactory.getTimer(this.getClass(), "importEntity.get");
[06/50] usergrid git commit: Merge branch '2.1-release' of
https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release
Posted by sn...@apache.org.
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/USERGRID-872
Commit: 7da99c7fb69369bfd62cb0fe27f2eac74161f127
Parents: 68d38f4 204bf04
Author: Todd Nine <tn...@apigee.com>
Authored: Wed Nov 11 14:57:00 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
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(-)
----------------------------------------------------------------------
[27/50] usergrid git commit: Fix no-org-delete and test.
Posted by sn...@apache.org.
Fix no-org-delete and test.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/59d2a71c
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/59d2a71c
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/59d2a71c
Branch: refs/heads/USERGRID-872
Commit: 59d2a71c761e1419d143acafd02a08f80a3293eb
Parents: 1434dea
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Nov 13 12:52:39 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Nov 13 12:52:39 2015 -0500
----------------------------------------------------------------------
.../management/organizations/OrganizationResource.java | 9 +++++++++
.../apache/usergrid/rest/management/OrganizationsIT.java | 10 +++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/59d2a71c/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/OrganizationResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/OrganizationResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/OrganizationResource.java
index e1fde46..12fbc63 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/OrganizationResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/OrganizationResource.java
@@ -20,6 +20,7 @@ package org.apache.usergrid.rest.management.organizations;
import com.fasterxml.jackson.jaxrs.json.annotation.JSONP;
import org.apache.amber.oauth2.common.exception.OAuthSystemException;
import org.apache.commons.lang.NullArgumentException;
+import org.apache.usergrid.exception.NotImplementedException;
import org.apache.usergrid.management.ActivationState;
import org.apache.usergrid.management.OrganizationConfig;
import org.apache.usergrid.management.OrganizationInfo;
@@ -420,4 +421,12 @@ public class OrganizationResource extends AbstractContextResource {
return response;
}
+
+ /** Delete organization is not yet supported */
+ //@RequireSystemAccess
+ @DELETE
+ public ApiResponse deleteOrganization() throws Exception {
+ throw new NotImplementedException();
+ }
+
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/59d2a71c/stack/rest/src/test/java/org/apache/usergrid/rest/management/OrganizationsIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/OrganizationsIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/OrganizationsIT.java
index 72a2f8c..3acdfd5 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/OrganizationsIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/OrganizationsIT.java
@@ -31,6 +31,7 @@ import org.apache.usergrid.rest.test.resource.AbstractRestIT;
import org.apache.usergrid.rest.test.resource.RestClient;
import javax.ws.rs.ClientErrorException;
+import javax.ws.rs.ServerErrorException;
import javax.ws.rs.core.Form;
import javax.ws.rs.core.Response;
@@ -291,18 +292,17 @@ public class OrganizationsIT extends AbstractRestIT {
/**
* Returns error from unimplemented delete method by trying to call the delete organization endpoint
- * @throws IOException
*/
- @Ignore("It should return a 501, so when this is fixed the test can be run")
@Test
public void noOrgDelete() throws IOException {
try {
- //Delete default organization
+ // attempt to delete default organization
clientSetup.getRestClient().management().orgs().org( clientSetup.getOrganizationName() ).delete();
fail( "Delete is not implemented yet" );
- }catch(ClientErrorException uie){
- assertEquals( Response.Status.NOT_IMPLEMENTED ,uie.getResponse().getStatus());
+
+ } catch( ServerErrorException see ){
+ assertEquals( Response.Status.NOT_IMPLEMENTED.getStatusCode(), see.getResponse().getStatus());
}
}
[42/50] usergrid git commit: Adding JIRA issue links to ignore
annotations
Posted by sn...@apache.org.
Adding JIRA issue links to ignore annotations
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/6af43dc9
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/6af43dc9
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/6af43dc9
Branch: refs/heads/USERGRID-872
Commit: 6af43dc9b5c3963eefb7a93afb029a4e365cc65f
Parents: 4cf69e6
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 09:30:57 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 09:30:57 2015 -0500
----------------------------------------------------------------------
.../org/apache/usergrid/persistence/EntityManagerIT.java | 3 ++-
.../test/java/org/apache/usergrid/rest/NotificationsIT.java | 2 +-
.../usergrid/rest/applications/ApplicationResourceIT.java | 2 +-
.../usergrid/services/notifications/NotifiersServiceIT.java | 8 ++++----
.../services/notifications/apns/NotificationsServiceIT.java | 8 ++++----
.../services/notifications/gcm/NotificationsServiceIT.java | 8 ++++----
6 files changed, 16 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/6af43dc9/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
index d81cad2..658c808 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
@@ -381,7 +381,8 @@ public class EntityManagerIT extends AbstractCoreIT {
@Test
- @Ignore( "There is a concurrency issue due to counters not being thread safe: see USERGRID-1753" )
+ @Ignore( "Pending https://issues.apache.org/jira/browse/USERGRID-1753. Concurrency issue.")
+ // There is a concurrency issue due to counters not being thread safe
public void testEntityCounters() throws Exception {
LOG.info( "EntityManagerIT#testEntityCounters" );
EntityManager em = app.getEntityManager();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/6af43dc9/stack/rest/src/test/java/org/apache/usergrid/rest/NotificationsIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/NotificationsIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/NotificationsIT.java
index 63e7b49..61dc419 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/NotificationsIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/NotificationsIT.java
@@ -44,7 +44,7 @@ import org.slf4j.LoggerFactory;
/**
* Test creating, sending and paging through Notifications via the REST API.
*/
-@Ignore
+@Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. ")
public class NotificationsIT extends org.apache.usergrid.rest.test.resource.AbstractRestIT {
private static final Logger logger = LoggerFactory.getLogger( NotificationsIT.class );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/6af43dc9/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
index 5915eca..8d29290 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
@@ -648,7 +648,7 @@ public class ApplicationResourceIT extends AbstractRestIT {
* Retrieve an access token using HTTP Basic authentication
*/
@Test
- @Ignore("Should fix - https://issues.apache.org/jira/browse/USERGRID-1106")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1106")
//Are we trying to generate token with token? Couldn't find endpoint that accepts token for generating token
public void clientCredentialsFlowWithHeaderAuthorization() throws Exception {
//retrieve the credentials
http://git-wip-us.apache.org/repos/asf/usergrid/blob/6af43dc9/stack/services/src/test/java/org/apache/usergrid/services/notifications/NotifiersServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/services/notifications/NotifiersServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/services/notifications/NotifiersServiceIT.java
index fbf8290..58172dd 100644
--- a/stack/services/src/test/java/org/apache/usergrid/services/notifications/NotifiersServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/services/notifications/NotifiersServiceIT.java
@@ -83,7 +83,7 @@ public class NotifiersServiceIT extends AbstractServiceIT {
}
}
- @Ignore("Mock doesn't work")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. Mock doesn't work")
@Test
public void badGcmToken() throws Exception {
app.clear();
@@ -146,7 +146,7 @@ public class NotifiersServiceIT extends AbstractServiceIT {
assertArrayEquals(notifier.getP12Certificate(), certBytes);
}
- @Ignore("Mock doesn't work")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. Mock doesn't work")
@Test
public void badAPNsCertificate() throws Exception {
@@ -170,7 +170,7 @@ public class NotifiersServiceIT extends AbstractServiceIT {
}
}
- @Ignore("Mock doesn't work")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. Mock doesn't work")
@Test
public void badAPNsPassword() throws Exception {
@@ -195,7 +195,7 @@ public class NotifiersServiceIT extends AbstractServiceIT {
}
@Test
- @Ignore("No longer needed to verify")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. No longer needed to verify")
public void encryption() throws Exception {
app.clear();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/6af43dc9/stack/services/src/test/java/org/apache/usergrid/services/notifications/apns/NotificationsServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/services/notifications/apns/NotificationsServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/services/notifications/apns/NotificationsServiceIT.java
index a3ff449..60b02a6 100644
--- a/stack/services/src/test/java/org/apache/usergrid/services/notifications/apns/NotificationsServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/services/notifications/apns/NotificationsServiceIT.java
@@ -41,7 +41,7 @@ import static org.apache.usergrid.services.notifications.impl.ApplicationQueueMa
// todo: test reschedule on delivery time change
// todo: test restart of queuing
-@Ignore
+@Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. ")
public class NotificationsServiceIT extends AbstractServiceNotificationIT {
private static final Logger LOG = LoggerFactory.getLogger(NotificationsServiceIT.class);
@@ -383,7 +383,7 @@ public class NotificationsServiceIT extends AbstractServiceNotificationIT {
}
}
- @Ignore("todo: how can I mock this?")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. todo: how can I mock this?")
@Test
public void badToken() throws Exception {
@@ -576,7 +576,7 @@ public class NotificationsServiceIT extends AbstractServiceNotificationIT {
checkReceipts(notification, 2);
}
- @Ignore("todo: how can I mock this?")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. todo: how can I mock this?")
@Test
public void badCertificate() throws Exception {
@@ -649,7 +649,7 @@ public class NotificationsServiceIT extends AbstractServiceNotificationIT {
assertNotNull(entity);
}
- @Ignore("todo: how can I mock this?")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. todo: how can I mock this?")
@Test
public void inactiveDeviceUpdate() throws Exception {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/6af43dc9/stack/services/src/test/java/org/apache/usergrid/services/notifications/gcm/NotificationsServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/services/notifications/gcm/NotificationsServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/services/notifications/gcm/NotificationsServiceIT.java
index 3369786..282055c 100644
--- a/stack/services/src/test/java/org/apache/usergrid/services/notifications/gcm/NotificationsServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/services/notifications/gcm/NotificationsServiceIT.java
@@ -142,7 +142,7 @@ public class NotificationsServiceIT extends AbstractServiceNotificationIT {
}
@Test
- @Ignore
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. ")
public void singlePushNotification() throws Exception {
app.clear();
@@ -168,7 +168,7 @@ public class NotificationsServiceIT extends AbstractServiceNotificationIT {
}
@Test
- @Ignore
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. ")
public void singlePushNotificationViaUser() throws Exception {
app.clear();
@@ -303,7 +303,7 @@ public class NotificationsServiceIT extends AbstractServiceNotificationIT {
}
}
- @Ignore("todo: how can I mock this?")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. todo: how can I mock this?")
@Test
public void badToken() throws Exception {
@@ -346,7 +346,7 @@ public class NotificationsServiceIT extends AbstractServiceNotificationIT {
assertEquals("InvalidRegistration", receipt.getErrorCode());
}
- @Ignore("todo: how can I mock this?")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1113. todo: how can I mock this?")
@Test
public void badAPIKey() throws Exception {
[40/50] usergrid git commit: Remove unnecessary ignores in some
places, add new ignores for broken tests that were once excluded via moms.
Posted by sn...@apache.org.
Remove unnecessary ignores in some places, add new ignores for broken tests that were once excluded via moms.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/41dde128
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/41dde128
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/41dde128
Branch: refs/heads/USERGRID-872
Commit: 41dde128cc04d211a29bf5af13520a7755246325
Parents: 99b932a
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 07:55:32 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 07:55:32 2015 -0500
----------------------------------------------------------------------
.../usergrid/batch/job/CountdownLatchJob.java | 1 -
.../usergrid/batch/job/DelayExecution.java | 1 -
.../usergrid/batch/job/DelayHeartbeat.java | 1 -
.../usergrid/batch/job/FailureJobExecution.java | 1 -
.../usergrid/persistence/CoreSchemaManager.java | 1 -
.../mvcc/stage/delete/UniqueCleanupTest.java | 1 -
.../apache/usergrid/rest/NotificationsIT.java | 2 +
.../applications/ApplicationResourceIT.java | 61 ----------------
.../users/extensions/TestResource.java | 1 -
.../rest/applications/utils/TestUtils.java | 1 -
.../usergrid/rest/management/AdminUsersIT.java | 1 -
.../rest/management/ExportResourceIT.java | 22 +-----
.../rest/management/ImportResourceIT.java | 11 +--
.../management/export/ExportServiceIT.java | 75 --------------------
.../management/importer/ImportServiceIT.java | 1 -
15 files changed, 4 insertions(+), 177 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java
index 53996a2..4149150 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/CountdownLatchJob.java
@@ -33,7 +33,6 @@ import org.apache.usergrid.batch.JobExecution;
* @author tnine
*/
@Component("countdownLatch")
-@Ignore("Not a test")
public class CountdownLatchJob implements Job {
private CountDownLatch latch = null;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java
index aaa7071..4c8bda6 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayExecution.java
@@ -35,7 +35,6 @@ import org.apache.usergrid.batch.JobExecution;
* @author tnine
*/
@Component("delayExecution")
-@Ignore("Not a test")
public class DelayExecution implements Job {
private static final Logger logger = LoggerFactory.getLogger( DelayExecution.class );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java
index 0fc104b..391b18b 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/DelayHeartbeat.java
@@ -35,7 +35,6 @@ import org.apache.usergrid.batch.JobExecution;
* @author tnine
*/
@Component("delayHeartbeat")
-@Ignore("Not a test")
public class DelayHeartbeat implements Job {
private static final Logger logger = LoggerFactory.getLogger( DelayHeartbeat.class );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExecution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExecution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExecution.java
index b31b520..5072e4a 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExecution.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/FailureJobExecution.java
@@ -33,7 +33,6 @@ import org.apache.usergrid.batch.JobExecution;
* @author tnine
*/
@Component("failureJobExceuction")
-@Ignore("Not a test")
public class FailureJobExecution implements Job {
private CountDownLatch latch = null;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/core/src/test/java/org/apache/usergrid/persistence/CoreSchemaManager.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/CoreSchemaManager.java b/stack/core/src/test/java/org/apache/usergrid/persistence/CoreSchemaManager.java
index adecc40..e9de76e 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/CoreSchemaManager.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/CoreSchemaManager.java
@@ -33,7 +33,6 @@ import me.prettyprint.hector.api.Cluster;
/** @author zznate */
-@Ignore( "Not a test" )
public class CoreSchemaManager implements SchemaManager {
private static final Logger LOG = LoggerFactory.getLogger( CoreSchemaManager.class );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/UniqueCleanupTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/UniqueCleanupTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/UniqueCleanupTest.java
index c1f76f2..e361f42 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/UniqueCleanupTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/UniqueCleanupTest.java
@@ -430,7 +430,6 @@ public class UniqueCleanupTest {
// /**
// * Tests what happens when our listeners are VERY slow
// */
-//// @Ignore( "Test is a work in progress" )
// @Test( timeout = 10000 )
// public void multipleListenerMultipleVersionsNoThreadsToRun()
// throws ExecutionException, InterruptedException, ConnectionException {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/rest/src/test/java/org/apache/usergrid/rest/NotificationsIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/NotificationsIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/NotificationsIT.java
index 22785dc..63e7b49 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/NotificationsIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/NotificationsIT.java
@@ -35,6 +35,7 @@ import org.junit.After;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -43,6 +44,7 @@ import org.slf4j.LoggerFactory;
/**
* Test creating, sending and paging through Notifications via the REST API.
*/
+@Ignore
public class NotificationsIT extends org.apache.usergrid.rest.test.resource.AbstractRestIT {
private static final Logger logger = LoggerFactory.getLogger( NotificationsIT.class );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
index cd42262..5915eca 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/ApplicationResourceIT.java
@@ -225,40 +225,6 @@ public class ApplicationResourceIT extends AbstractRestIT {
}
- /**
- * Verifies that we return JSON even when text/html is requested.
- * (for backwards compatibility)
- */
- @Test
- @Ignore("no longer relevant - this type of backwards compatibility no longer needed")
- public void jsonForAcceptsTextHtml() throws Exception {
-
- //Create the organization resource
- OrganizationResource orgResource = clientSetup.getRestClient()
- .management().orgs().org( clientSetup.getOrganizationName() );
-
- //retrieve the credentials
- Credentials orgCredentials = new Credentials( orgResource.credentials().get(ApiResponse.class));
- String clientId = orgCredentials.getClientId();
- String clientSecret = orgCredentials.getClientSecret();
-
- //retrieve the users collection, setting the "Accept" header to text/html
- Invocation.Builder builder = this.app().collection( "users" ).getTarget()
- //Add the org credentials to the query
- .queryParam( "grant_type", "client_credentials" )
- .queryParam( "client_id", clientId )
- .queryParam( "client_secret", clientSecret )
- .request();
-
- ApiResponse apiResponse = builder
- .accept(MediaType.TEXT_HTML)
- .get(ApiResponse.class);
-
- Collection users = new Collection(apiResponse);
- //make sure that a valid response is returned without error
- assertNotNull(users);
- assertNull(users.getResponse().getError());
- }
/**
* Retrieve an application using password credentials
@@ -762,33 +728,6 @@ public class ApplicationResourceIT extends AbstractRestIT {
assertNotNull("It has expires_in.", apiResponse.getExpirationDate());
}
- /**
- * Ensure that the Apigee Mobile Analytics config returns valid JSON
- */
- @Test
- @Ignore("No longer relevant - Apigee internal")
- public void validateApigeeApmConfigAPP() throws IOException {
- String orgName = clientSetup.getOrganizationName().toLowerCase();
- String appName = clientSetup.getAppName().toLowerCase();
-
- try {
- //GET the APM endpoint
- String response = target().path( String.format( "/%s/%s/apm/apigeeMobileConfig", orgName, appName ) )
- .request()
- .accept( MediaType.APPLICATION_JSON )
- .get(String.class);
- //Parse the response
- JsonNode node = mapper.readTree(response);
-
- //if things are kosher then JSON should have value for instaOpsApplicationId
- assertTrue("it's valid json for APM", node.has("instaOpsApplicationId"));
- } catch (ClientErrorException uie) {
- //Validate that APM config exists
- assertNotEquals("APM Config API exists", Response.Status.NOT_FOUND,
- uie.getResponse().getStatus()); //i.e It should not be "Not Found"
- }
- }
-
/**
* Retrieve an application token using organization credentials
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/extensions/TestResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/extensions/TestResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/extensions/TestResource.java
index b74a162..969430e 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/extensions/TestResource.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/users/extensions/TestResource.java
@@ -29,7 +29,6 @@ import org.springframework.stereotype.Component;
import org.apache.usergrid.rest.applications.users.AbstractUserExtensionResource;
-@Ignore("Not a test")
@Component("TestResource")
@Scope("prototype")
@Produces(MediaType.APPLICATION_JSON)
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/TestUtils.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/TestUtils.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/TestUtils.java
index fa8356d..9a7d71c 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/TestUtils.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/utils/TestUtils.java
@@ -27,7 +27,6 @@ import org.apache.usergrid.utils.UUIDUtils;
/** @author tnine */
-@Ignore("Not a test")
public class TestUtils {
/** Get the uuid at the given index for the root node. If it doesn't exist, null is returned */
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
index 3aed997..fba0c43 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/AdminUsersIT.java
@@ -437,7 +437,6 @@ public class AdminUsersIT extends AbstractRestIT {
// // TODO: will work once resetpw viewables work
// @Test
-// @Ignore( "causes problems in build" )
// public void passwordResetIncorrectUserName() throws Exception {
//
// String email = "test2@usergrid.com";
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/rest/src/test/java/org/apache/usergrid/rest/management/ExportResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ExportResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ExportResourceIT.java
index 939363f..79590b8 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ExportResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ExportResourceIT.java
@@ -32,6 +32,7 @@ import java.util.UUID;
import static org.junit.Assert.*;
+@Ignore
public class ExportResourceIT extends AbstractRestIT {
@@ -40,7 +41,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
- @Ignore
@Test
public void exportApplicationUUIDRetTest() throws Exception {
@@ -54,7 +54,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
- @Ignore
@Test
public void exportCollectionUUIDRetTest() throws Exception {
@@ -81,7 +80,6 @@ public class ExportResourceIT extends AbstractRestIT {
* Check that you can get the org export uuid returned and that you can check the status of the job using that uuid.
* @throws Exception
*/
- @Ignore
@Test
public void exportGetOrganizationJobStatTest() throws Exception {
@@ -123,7 +121,6 @@ public class ExportResourceIT extends AbstractRestIT {
* @throws Exception
*/
- @Ignore
@Test
public void exportGetApplicationJobStatTest() throws Exception {
@@ -160,7 +157,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
- @Ignore
@Test
public void exportGetCollectionJobStatTest() throws Exception {
@@ -192,7 +188,6 @@ public class ExportResourceIT extends AbstractRestIT {
//
//
// // //do an unauthorized test for both post and get
-@Ignore
@Test
public void exportGetWrongUUID() throws Exception {
UUID fake = UUID.fromString( "AAAAAAAA-FFFF-FFFF-FFFF-AAAAAAAAAAAA" );
@@ -209,7 +204,6 @@ public class ExportResourceIT extends AbstractRestIT {
//
- @Ignore
@Test
public void exportPostApplicationNullPointerProperties() throws Exception {
try {
@@ -225,7 +219,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
- @Ignore
@Test
public void exportPostOrganizationNullPointerProperties() throws Exception {
try {
@@ -239,7 +232,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
//
- @Ignore
@Test
public void exportPostCollectionNullPointer() throws Exception {
try {
@@ -255,7 +247,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
}
- @Ignore
@Test
public void exportGetCollectionUnauthorized() throws Exception {
UUID fake = UUID.fromString( "AAAAAAAA-FFFF-FFFF-FFFF-AAAAAAAAAAAA" );
@@ -272,7 +263,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
}
- @Ignore
@Test
public void exportGetApplicationUnauthorized() throws Exception {
UUID fake = UUID.fromString( "AAAAAAAA-FFFF-FFFF-FFFF-AAAAAAAAAAAA" );
@@ -288,7 +278,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
}
- @Ignore
@Test
public void exportGetOrganizationUnauthorized() throws Exception {
UUID fake = UUID.fromString( "AAAAAAAA-FFFF-FFFF-FFFF-AAAAAAAAAAAA" );
@@ -303,7 +292,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
}
- @Ignore
@Test
public void exportPostOrganizationNullPointerStorageInfo() throws Exception {
HashMap<String, Object> payload = payloadBuilder();
@@ -323,7 +311,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
- @Ignore
@Test
public void exportPostApplicationNullPointerStorageInfo() throws Exception {
HashMap<String, Object> payload = payloadBuilder();
@@ -344,7 +331,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
}
- @Ignore
@Test
public void exportPostCollectionNullPointerStorageInfo() throws Exception {
HashMap<String, Object> payload = payloadBuilder();
@@ -366,7 +352,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
}
- @Ignore
@Test
public void exportPostOrganizationNullPointerStorageProvider() throws Exception {
HashMap<String, Object> payload = payloadBuilder();
@@ -386,7 +371,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
- @Ignore
@Test
public void exportPostApplicationNullPointerStorageProvider() throws Exception {
HashMap<String, Object> payload = payloadBuilder();
@@ -407,7 +391,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
}
- @Ignore
@Test
public void exportPostCollectionNullPointerStorageProvider() throws Exception {
HashMap<String, Object> payload = payloadBuilder();
@@ -430,7 +413,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
- @Ignore
@Test
public void exportPostOrganizationNullPointerStorageVerification() throws Exception {
HashMap<String, Object> payload = payloadBuilder();
@@ -482,7 +464,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
}
- @Ignore
@Test
public void exportPostApplicationNullPointerStorageVerification() throws Exception {
HashMap<String, Object> payload = payloadBuilder();
@@ -537,7 +518,6 @@ public class ExportResourceIT extends AbstractRestIT {
}
}
- @Ignore
@Test
public void exportPostCollectionNullPointerStorageVerification() throws Exception {
HashMap<String, Object> payload = payloadBuilder();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
index 784ff67..ee6ed8e 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/ImportResourceIT.java
@@ -60,6 +60,7 @@ import java.util.Properties;
import static org.junit.Assert.*;
+@Ignore
public class ImportResourceIT extends AbstractRestIT {
private static final Logger logger = LoggerFactory.getLogger(ImportResourceIT.class);
@@ -127,7 +128,6 @@ public class ImportResourceIT extends AbstractRestIT {
*
* @throws Exception
*/
- @Ignore
@Test
public void importGetCollectionJobStatTest() throws Exception {
@@ -162,7 +162,6 @@ public class ImportResourceIT extends AbstractRestIT {
* Verify that import job can only be read with an authorized token and cannot be read
* with an invalid/notAllowed token.
*/
- @Ignore
@Test
public void importTokenAuthorizationTest() throws Exception {
@@ -218,7 +217,6 @@ public class ImportResourceIT extends AbstractRestIT {
}
- @Ignore
@Test
public void importPostApplicationNullPointerProperties() throws Exception {
String org = clientSetup.getOrganizationName();
@@ -235,7 +233,6 @@ public class ImportResourceIT extends AbstractRestIT {
assertEquals(Response.Status.BAD_REQUEST, responseStatus);
}
- @Ignore
@Test
public void importPostApplicationNullPointerStorageInfo() throws Exception {
String org = clientSetup.getOrganizationName();
@@ -256,7 +253,6 @@ public class ImportResourceIT extends AbstractRestIT {
}
- @Ignore
@Test
public void importPostApplicationNullPointerStorageProvider() throws Exception {
String org = clientSetup.getOrganizationName();
@@ -278,7 +274,6 @@ public class ImportResourceIT extends AbstractRestIT {
}
- @Ignore
@Test
public void importPostApplicationNullPointerStorageVerification() throws Exception {
String org = clientSetup.getOrganizationName();
@@ -412,7 +407,6 @@ public class ImportResourceIT extends AbstractRestIT {
/**
* TODO: Test that importing bad JSON will result in an informative error message.
*/
- @Ignore
@Test
public void testImportGoodJson() throws Exception {
// import from a bad JSON file
@@ -484,7 +478,6 @@ public class ImportResourceIT extends AbstractRestIT {
/**
* TODO: Test that importing bad JSON will result in an informative error message.
*/
- @Ignore
@Test
public void testImportOneGoodOneBad() throws Exception {
@@ -532,7 +525,6 @@ public class ImportResourceIT extends AbstractRestIT {
/**
* TODO: Test that importing bad JSON will result in an informative error message.
*/
- @Ignore
@Test
public void testImportOneBadFile() throws Exception {
// import from a bad JSON file
@@ -581,7 +573,6 @@ public class ImportResourceIT extends AbstractRestIT {
/**
* TODO: Test that importing bad JSON will result in an informative error message.
*/
- @Ignore
@Test
public void testImportBadJson() throws Exception {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
index 8f67e85..4f78b92 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/export/ExportServiceIT.java
@@ -663,81 +663,6 @@ public class ExportServiceIT {
@Test
- @Ignore("this is a meaningless test because our export format does not support export of organizations")
- public void testExportOneOrganization() throws Exception {
-
- // create a bunch of organizations, each with applications and collections of entities
-
- int maxOrgs = 3;
- int maxApps = 3;
- int maxEntities = 20;
-
- List<ApplicationInfo> appsMade = new ArrayList<>();
- List<OrganizationInfo> orgsMade = new ArrayList<>();
-
- for ( int orgIndex = 0; orgIndex < maxOrgs; orgIndex++ ) {
-
-
- String orgName = "org_" + RandomStringUtils.randomAlphanumeric(10);
- OrganizationInfo orgMade = setup.getMgmtSvc().createOrganization( orgName, adminUser, true );
- orgsMade.add( orgMade );
- logger.debug("Created org {}", orgName);
-
- for ( int appIndex = 0; appIndex < maxApps; appIndex++ ) {
-
- String appName = "app_" + RandomStringUtils.randomAlphanumeric(10);
- ApplicationInfo appMade = setup.getMgmtSvc().createApplication( orgMade.getUuid(), appName );
- appsMade.add( appMade );
- logger.debug("Created app {}", appName);
-
- for (int entityIndex = 0; entityIndex < maxEntities; entityIndex++) {
-
- EntityManager appEm = setup.getEmf().getEntityManager( appMade.getId() );
- appEm.create( appName + "_type", new HashMap<String, Object>() {{
- put("property1", "value1");
- put("property2", "value2");
- }});
- }
- }
- }
-
- // export one of the organizations only, using mock S3 export that writes to local disk
-
- String exportFileName = "exportOneOrganization.json";
- S3Export s3Export = new MockS3ExportImpl( exportFileName );
-
- HashMap<String, Object> payload = payloadBuilder(appsMade.get(0).getName());
- payload.put("organizationId", orgsMade.get(0).getUuid() );
- payload.put( "applicationId", appsMade.get(0).getId() );
-
- ExportService exportService = setup.getExportService();
- UUID exportUUID = exportService.schedule( payload );
-
- JobData jobData = jobDataCreator( payload, exportUUID, s3Export );
- JobExecution jobExecution = mock( JobExecution.class );
- when( jobExecution.getJobData() ).thenReturn(jobData);
-
- exportService.doExport( jobExecution );
-
- // finally, we check that file was created and contains the right number of entities in the array
-
- File exportedFile = new File( exportFileName );
- exportedFile.deleteOnExit();
-
- TypeReference<HashMap<String,Object>> typeRef
- = new TypeReference<HashMap<String,Object>>() {};
-
- ObjectMapper mapper = new ObjectMapper();
- Map<String,Object> jsonMap = mapper.readValue(new FileReader( exportedFile ), typeRef);
- Map collectionsMap = (Map)jsonMap.get("collections");
-
- List collectionList = (List)collectionsMap.get("users");
-
- assertEquals( 3, collectionList.size() );
- }
-
-
- @Test
public void testExportDoJob() throws Exception {
String appName = newOrgAppAdminRule.getApplicationInfo().getName();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/41dde128/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
index e8d6081..d7d7028 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/importer/ImportServiceIT.java
@@ -64,7 +64,6 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-//@Concurrent
public class ImportServiceIT {
private static final Logger logger = LoggerFactory.getLogger(ImportServiceIT.class);
[38/50] usergrid git commit: Fix spelling error in class names.
Posted by sn...@apache.org.
Fix spelling error in class names.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/d1f17107
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/d1f17107
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/d1f17107
Branch: refs/heads/USERGRID-872
Commit: d1f17107631c3e7c83ae0efccb371e3979c174ed
Parents: f62e0aa
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 07:52:21 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 07:52:21 2015 -0500
----------------------------------------------------------------------
.../java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java | 2 +-
.../java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/d1f17107/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
index 239101c..5d2e00d 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
@@ -50,7 +50,7 @@ public class SchedulerRuntime6IT extends AbstractSchedulerRuntimeIT {
long customRetry = sleepTime + 1000;
int numberOfRuns = 1;
- OnlyOnceExceution job = springResource.getBean( "onlyOnceExceution", OnlyOnceExceution.class );
+ OnlyOnceExecution job = springResource.getBean( "onlyOnceExceution", OnlyOnceExecution.class );
job.setTimeout( customRetry );
job.setLatch( numberOfRuns );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/d1f17107/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
index 091c875..000996d 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
@@ -46,8 +46,8 @@ public class SchedulerRuntime7IT extends AbstractSchedulerRuntimeIT {
long customRetry = sleepTime * 2;
int numberOfRuns = 2;
- OnlyOnceUnlockOnFailExceution job =
- springResource.getBean( "onlyOnceUnlockOnFailExceution", OnlyOnceUnlockOnFailExceution.class );
+ OnlyOnceUnlockOnFailExecution job =
+ springResource.getBean( "onlyOnceUnlockOnFailExceution", OnlyOnceUnlockOnFailExecution.class );
job.setTimeout( customRetry );
job.setLatch( numberOfRuns );
[33/50] usergrid git commit: Unignoring and fixing tests more tests.
Posted by sn...@apache.org.
Unignoring and fixing tests more tests.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/40cd3798
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/40cd3798
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/40cd3798
Branch: refs/heads/USERGRID-872
Commit: 40cd37988b72ceaabe7d265eb7c4e5c6e0dd1e95
Parents: 5c85b75
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Nov 16 09:18:05 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Nov 16 09:18:05 2015 -0500
----------------------------------------------------------------------
.../org/apache/usergrid/persistence/CounterIT.java | 1 -
.../usergrid/persistence/EntityConnectionsIT.java | 10 ++++------
.../org/apache/usergrid/persistence/EntityTest.java | 2 --
.../usergrid/persistence/GeoQueryBooleanTest.java | 1 -
.../graph/GraphManagerShardConsistencyIT.java | 1 -
.../collection/paging/PagingResourceIT.java | 13 +++++--------
6 files changed, 9 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
index 54302ad..e558bad 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
@@ -179,7 +179,6 @@ public class CounterIT extends AbstractCoreIT {
@Test
- @Ignore()
public void testCommunityCounters() throws Exception {
EntityManager em = setup.getEmf().getEntityManager( setup.getEmf().getManagementAppId() );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
index 47b61e9..f5d3ce4 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityConnectionsIT.java
@@ -341,7 +341,6 @@ public class EntityConnectionsIT extends AbstractCoreIT {
@Test
- @Ignore("This is broken, and needs fixed after the refactor")
public void testConnectionsIterable() throws Exception {
EntityManager em = app.getEntityManager();
assertNotNull( em );
@@ -356,7 +355,7 @@ public class EntityConnectionsIT extends AbstractCoreIT {
final int connectionCount = 100;
- final List<Entity> things = new ArrayList<>( connectionCount );
+ final Map<UUID, Entity> things = new HashMap<>();
for(int i = 0; i < connectionCount; i ++){
Map<String, Object> data = new HashMap<String, Object>();
@@ -366,7 +365,7 @@ public class EntityConnectionsIT extends AbstractCoreIT {
em.createConnection( firstUserEntity, "likes", entity );
- things.add( entity );
+ things.put( entity.getUuid(), entity );
}
@@ -380,15 +379,14 @@ public class EntityConnectionsIT extends AbstractCoreIT {
int checkedIndex = 0;
for(; checkedIndex < connectionCount && itr.hasNext(); checkedIndex ++){
final Entity returned = ( Entity ) itr.next();
- final Entity expected = things.get( checkedIndex );
+ final Entity expected = things.get( returned.getUuid() );
assertEquals("Entity expected", expected, returned);
}
assertEquals("Checked all entities", connectionCount, checkedIndex );
-
-
}
+
//
//
// @Test
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/stack/core/src/test/java/org/apache/usergrid/persistence/EntityTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityTest.java
index e9e6163..1e8ded5 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityTest.java
@@ -39,7 +39,6 @@ public class EntityTest {
@Test
- // @Ignore( "Fix this then enable EntityTest.testEntityClasses:45 » ConcurrentModification" )
public void testEntityClasses() throws Exception {
logger.info( "testEntityClasses" );
@@ -75,7 +74,6 @@ public class EntityTest {
@SuppressWarnings("unchecked")
@Test
- // @Ignore( "Fix this and enable: EntityTest.testJson:83 » ConcurrentModification" )
public void testJson() throws Exception {
User user = new User();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java
index d780f85..3c04ce6 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoQueryBooleanTest.java
@@ -108,7 +108,6 @@ public class GeoQueryBooleanTest extends AbstractCoreIT {
@Test
- //@Ignore // work in progress
public void testGeoQueryWithNot() throws Exception {
log.info( "GeoQueryBooleanTest.testGeoQueryWithOr" );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/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..9000c75 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
@@ -80,7 +80,6 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
-//@Ignore( "Kills cassandra, needs to be part of functional testing" )
public class GraphManagerShardConsistencyIT {
private static final Logger log = LoggerFactory.getLogger( GraphManagerShardConsistencyIT.class );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/40cd3798/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/paging/PagingResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/paging/PagingResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/paging/PagingResourceIT.java
index 2e3a163..e3ec07c 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/paging/PagingResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/paging/PagingResourceIT.java
@@ -223,12 +223,9 @@ public class PagingResourceIT extends AbstractRestIT {
* Pages through entities that are connected to each other
* @throws IOException
*/
- @Ignore("This does not return a page for any entities. It just keeps returning them in bulk."
- + " Not sure about intended functionality")
@Test
public void pageThroughConnectedEntities() throws IOException {
-
long created = 0;
int numOfEntities = 100;
int numOfPages = 10;
@@ -238,7 +235,7 @@ public class PagingResourceIT extends AbstractRestIT {
for ( created = 1; created <= numOfEntities; created++ ) {
- entityPayload.put( "name", "value" + created );
+ entityPayload.put( "name", created );
Entity entity = new Entity( entityPayload );
entity = this.app().collection( collectionName ).post( entity );
refreshIndex();
@@ -252,11 +249,11 @@ public class PagingResourceIT extends AbstractRestIT {
refreshIndex();
- Collection colConnection = this.app().collection( collectionName ).entity(connectedEntity).connection("likes").get();
- assertNotNull(colConnection);
- assertNotNull( colConnection.getCursor() );
- pageAndVerifyEntities(collectionName, null, numOfPages, numOfEntities);
+ QueryParameters qp = new QueryParameters();
+ qp.setQuery("select * order by created asc");
+ qp.setLimit(10);
+ pageAndVerifyEntities(collectionName, qp, numOfPages, numOfEntities);
}
[41/50] usergrid git commit: Add an additional reindex/wait to test
that fails intermittently.
Posted by sn...@apache.org.
Add an additional reindex/wait to test that fails intermittently.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/4cf69e6f
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/4cf69e6f
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/4cf69e6f
Branch: refs/heads/USERGRID-872
Commit: 4cf69e6f0498dbdc55e55739d38dd78f32a87e58
Parents: 41dde12
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 08:12:30 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 08:12:30 2015 -0500
----------------------------------------------------------------------
.../src/test/java/org/apache/usergrid/management/RoleIT.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/4cf69e6f/stack/services/src/test/java/org/apache/usergrid/management/RoleIT.java
----------------------------------------------------------------------
diff --git a/stack/services/src/test/java/org/apache/usergrid/management/RoleIT.java b/stack/services/src/test/java/org/apache/usergrid/management/RoleIT.java
index e2a1941..0bd4f41 100644
--- a/stack/services/src/test/java/org/apache/usergrid/management/RoleIT.java
+++ b/stack/services/src/test/java/org/apache/usergrid/management/RoleIT.java
@@ -64,7 +64,6 @@ public class RoleIT {
UUID applicationId = setup.getMgmtSvc().createApplication( organization.getUuid(), "test-app" ).getId();
EntityManager em = setup.getEmf().getEntityManager( applicationId );
-
setup.getEntityIndex().refresh(em.getApplicationId());
Map<String, Object> properties = new LinkedHashMap<String, Object>();
@@ -75,6 +74,7 @@ public class RoleIT {
em.createRole( "logged-in", "Logged In", 2000 );
setup.getEntityIndex().refresh(em.getApplicationId());
+ setup.getEntityIndex().refresh(em.getApplicationId());
em.addUserToRole( user.getUuid(), "logged-in" );
String accessToken = setup.getMgmtSvc().getAccessTokenForAppUser( applicationId, user.getUuid(), 0 );
[49/50] usergrid git commit: Use variable instead of hardcoded JUnit
version number
Posted by sn...@apache.org.
Use variable instead of hardcoded JUnit version number
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/6f3541be
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/6f3541be
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/6f3541be
Branch: refs/heads/USERGRID-872
Commit: 6f3541be60998f23f95c9794a77d7230396db3e3
Parents: c96e294
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 15:14:51 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 15:14:51 2015 -0500
----------------------------------------------------------------------
stack/build-tools/pom.xml | 2 +-
stack/config/pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/6f3541be/stack/build-tools/pom.xml
----------------------------------------------------------------------
diff --git a/stack/build-tools/pom.xml b/stack/build-tools/pom.xml
index 2001396..91c655d 100644
--- a/stack/build-tools/pom.xml
+++ b/stack/build-tools/pom.xml
@@ -44,7 +44,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.12</version>
+ <version>${junit-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/6f3541be/stack/config/pom.xml
----------------------------------------------------------------------
diff --git a/stack/config/pom.xml b/stack/config/pom.xml
index 4ee1a3b..c445c58 100644
--- a/stack/config/pom.xml
+++ b/stack/config/pom.xml
@@ -47,7 +47,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.12</version>
+ <version>${junit-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
[46/50] usergrid git commit: Un-ignore some working tests.
Posted by sn...@apache.org.
Un-ignore some working tests.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/43f7ee05
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/43f7ee05
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/43f7ee05
Branch: refs/heads/USERGRID-872
Commit: 43f7ee05b20b57f37f28eac5ff3baa41cee1326c
Parents: 68be7d7
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 10:52:47 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 10:52:47 2015 -0500
----------------------------------------------------------------------
.../corepersistence/StaleIndexCleanupTest.java | 99 ++++++++++----------
.../mvcc/stage/AbstractEntityStageTest.java | 1 -
.../graph/impl/NodeDeleteListenerTest.java | 1 -
3 files changed, 51 insertions(+), 50 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/43f7ee05/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
index 2f96c18..8e6d21f 100644
--- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
@@ -194,16 +194,16 @@ public class StaleIndexCleanupTest extends AbstractCoreIT {
/**
* Test that the CpRelationManager cleans up and stale indexes that it finds when
* it is building search results.
+ * TODO: does this test still make sense?
*/
@Test
- @Ignore("Breaks other tests - or would if we reenabled that EVENTS_DISABLED property")
public void testStaleIndexCleanup() throws Exception {
logger.info( "Started testStaleIndexCleanup()" );
- // turn off post processing stuff that cleans up stale entities
- System.setProperty( EVENTS_DISABLED, "true" );
+ // this EVENTS_DISABLED property is no longer supported
+ //System.setProperty( EVENTS_DISABLED, "true" );
final EntityManager em = app.getEntityManager();
@@ -255,54 +255,57 @@ public class StaleIndexCleanupTest extends AbstractCoreIT {
app.refreshIndex();
// query Core Persistence directly for total number of result candidates
- crs = queryCollectionCp( "things", "thing", "select * order by updateCount asc" );
- Assert.assertEquals( "Expect stale candidates", numEntities * ( numUpdates + 1 ), crs.size() );
-
- // query EntityManager for results and page through them
- // should return numEntities because it filters out the stale entities
- final int limit = 8;
-
- // we order by updateCount asc, this forces old versions to appear first, otherwise,
- // we don't clean them up in our versions
- Query q = Query.fromQL( "select * order by updateCount asc" );
- q.setLimit( limit );
-
- int thingCount = 0;
- int index = 0;
- String cursor;
-
- do {
- Results results = em.searchCollection( em.getApplicationRef(), "things", q );
- thingCount += results.size();
-
- logger.debug( "Retrieved total of {} entities", thingCount );
-
- cursor = results.getCursor();
- if ( cursor != null && thingCount < numEntities ) {
- assertEquals( limit, results.size() );
- }
- for ( int i = 0; i < results.size(); i++, index++ ) {
+ // Because events are not disabled there will be no stale candidates
- final Entity returned = results.getEntities().get( i );
+// crs = queryCollectionCp( "things", "thing", "select * order by updateCount asc" );
+// Assert.assertEquals( "Expect stale candidates", numEntities * ( numUpdates + 1 ), crs.size() );
- // last entities appear first
- final Entity expected = maxVersions.get( index );
- assertEquals("correct entity returned", expected, returned);
-
- }
- }
- while ( cursor != null );
-
- assertEquals( "Expect no stale candidates", numEntities, thingCount );
-
-
- app.refreshIndex();
-
-
- // query for total number of result candidates = numEntities
- crs = queryCollectionCp( "things", "thing", "select *" );
- Assert.assertEquals( "Expect stale candidates de-indexed", numEntities, crs.size() );//20,21
+ // query EntityManager for results and page through them
+ // should return numEntities because it filters out the stale entities
+// final int limit = 8;
+//
+// // we order by updateCount asc, this forces old versions to appear first, otherwise,
+// // we don't clean them up in our versions
+// Query q = Query.fromQL( "select * order by updateCount asc" );
+// q.setLimit( limit );
+//
+// int thingCount = 0;
+// int index = 0;
+// String cursor;
+//
+// do {
+// Results results = em.searchCollection( em.getApplicationRef(), "things", q );
+// thingCount += results.size();
+//
+// logger.debug( "Retrieved total of {} entities", thingCount );
+//
+// cursor = results.getCursor();
+// if ( cursor != null && thingCount < numEntities ) {
+// assertEquals( limit, results.size() );
+// }
+//
+// for ( int i = 0; i < results.size(); i++, index++ ) {
+//
+// final Entity returned = results.getEntities().get( i );
+//
+// // last entities appear first
+// final Entity expected = maxVersions.get( index );
+// assertEquals("correct entity returned", expected, returned);
+//
+// }
+// }
+// while ( cursor != null );
+//
+// assertEquals( "Expect no stale candidates", numEntities, thingCount );
+//
+//
+// app.refreshIndex();
+//
+//
+// // query for total number of result candidates = numEntities
+// crs = queryCollectionCp( "things", "thing", "select *" );
+// Assert.assertEquals( "Expect stale candidates de-indexed", numEntities, crs.size() );//20,21
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/43f7ee05/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/AbstractEntityStageTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/AbstractEntityStageTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/AbstractEntityStageTest.java
index 201aa8c..62e1403 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/AbstractEntityStageTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/AbstractEntityStageTest.java
@@ -47,7 +47,6 @@ public abstract class AbstractEntityStageTest {
/** Test every Entity with */
- @Ignore("Why is this ignored?")
@Test( expected = IllegalArgumentException.class )
@Theory
public void testWrongEntityType(@InvalidEntityGenerator.IllegalFields final Entity entity, @InvalidIdGenerator.IllegalFields final Id id) throws Exception {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/43f7ee05/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
index dd92261..f2d4d94 100644
--- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
+++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
@@ -319,7 +319,6 @@ public class NodeDeleteListenerTest {
* since it has no other targets
*/
@Test
- @Ignore("This needs to be re-enable. The counters for sharding fall over in cass, needs fixes")
public void testMultiDelete() throws ConnectionException, InterruptedException {
GraphManager em = emf.createEdgeManager( scope );
[20/50] usergrid git commit: Addresses incorrect usages of
.subscribe() and removed obsolete TODOs
Posted by sn...@apache.org.
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/USERGRID-872
Commit: d4d3ed3ed7e1e1da501b7b886f890c0b5cedffdf
Parents: 6f61b05
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Nov 12 16:27:27 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
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. <p/> 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<CollectionIoEvent<MvccEntity>, 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
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java
index 26ea3cd..7d73b7b 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/write/WriteStart.java
@@ -61,7 +61,6 @@ public class WriteStart implements Func1<CollectionIoEvent<Entity>, CollectionIo
final UUID newVersion = UUIDGenerator.newTimeUUID();
- //TODO update this when merged with George's changes
final MvccLogEntry startEntry = new MvccLogEntryImpl( entityId, newVersion,
Stage.ACTIVE, MvccLogEntry.State.COMPLETE);
@@ -83,7 +82,6 @@ public class WriteStart implements Func1<CollectionIoEvent<Entity>, CollectionIo
}
//create the mvcc entity for the next stage
- //TODO: we need to create a complete or partial update here (or sooner)
return new CollectionIoEvent<>( applicationScope, nextStage );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/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 a849029..374d373 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
@@ -275,7 +275,6 @@ public class NodeShardAllocationImpl implements NodeShardAllocation {
private boolean isNewNode( DirectedEdgeMeta directedEdgeMeta ) {
- //TODO: TN this is broken....
//The timeout is in milliseconds. Time for a time uuid is 1/10000 of a milli, so we need to get the units
// correct
final long timeoutDelta = graphFig.getShardCacheTimeout();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
index 1060495..bc02c8d 100644
--- a/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
+++ b/stack/corepersistence/graph/src/main/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardedEdgeSerializationImpl.java
@@ -72,8 +72,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
/**
- * TODO: Rafactor this to use shards only, no shard groups, just collections of shards. The parent caller can aggregate
- * the results of multiple groups together, this has an impedance mismatch in the API layer.
+ *
*/
@Singleton
public class ShardedEdgeSerializationImpl implements ShardedEdgeSerialization {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
index 3382507..dd92261 100644
--- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
+++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/impl/NodeDeleteListenerTest.java
@@ -368,7 +368,6 @@ public class NodeDeleteListenerTest {
int count = deleteListener.receive( scope, toDelete, UUIDGenerator.newTimeUUID() ).toBlocking().last();
- //TODO T.N. THIS SHOULD WORK!!!! It fails intermittently with RX 0.17.1 with too many scheduler threads (which was wrong), try this again after the next release
assertEquals( edgeCount, count );
//now verify we can't get any of the info back
http://git-wip-us.apache.org/repos/asf/usergrid/blob/d4d3ed3e/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/migration/EsIndexMappingMigrationPlugin.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/migration/EsIndexMappingMigrationPlugin.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/migration/EsIndexMappingMigrationPlugin.java
index de32e0e..e29ed81 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/migration/EsIndexMappingMigrationPlugin.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/migration/EsIndexMappingMigrationPlugin.java
@@ -94,7 +94,7 @@ public class EsIndexMappingMigrationPlugin implements MigrationPlugin {
migrationInfoSerialization.setVersion(getName(), getMaxVersion());
observer.complete();
})
- .subscribe(); //should run through
+ .toBlocking().lastOrDefault( null ); //should run through
}catch (Exception ee){
[28/50] usergrid git commit: Removed unused file and unused variable
Posted by sn...@apache.org.
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/USERGRID-872
Commit: 91a49115501e09fbf84d7d529281c0097e980d52
Parents: c3c2818
Author: Todd Nine <tn...@apigee.com>
Authored: Fri Nov 13 14:10:54 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
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..0000000
--- 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 {
@Assisted( "collectionName" ) final String collectionName,
@Assisted( "entityType" ) final String entityType ) {
super( entityIndexFactory, metricsFactory, indexLocationStrategyFactory, query );
- this.indexLocationStrategyFactory = indexLocationStrategyFactory;
this.collectionName = collectionName;
this.entityType = entityType;
}
[31/50] usergrid git commit: Cleanup some name changes on the
response import tasks scheduler.
Posted by sn...@apache.org.
Cleanup some name changes on the response import tasks scheduler.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/8ed1bc78
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/8ed1bc78
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/8ed1bc78
Branch: refs/heads/USERGRID-872
Commit: 8ed1bc784e386eac14670fbe71d0e4516625559d
Parents: d4d3ed3
Author: Michael Russo <mi...@gmail.com>
Authored: Sun Nov 15 08:11:42 2015 -0800
Committer: Michael Russo <mi...@gmail.com>
Committed: Sun Nov 15 08:11:42 2015 -0800
----------------------------------------------------------------------
.../usergrid/corepersistence/CoreModule.java | 2 +-
.../asyncevents/AsyncEventsSchedulerFig.java | 18 ------------------
2 files changed, 1 insertion(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/8ed1bc78/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 5d2d8dc..8e17701 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,7 +240,7 @@ public class CoreModule extends AbstractModule {
@Inject
@ResponseImportTasks
@Singleton
- public RxTaskScheduler getImportRepairScheduler( final ServiceSchedulerFig serviceSchedulerFig ) {
+ public RxTaskScheduler getResponseImportScheduler(final ServiceSchedulerFig serviceSchedulerFig ) {
final String poolName = serviceSchedulerFig.getRepairPoolName();
final int threadCount = serviceSchedulerFig.getImportThreadPoolSize();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/8ed1bc78/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventsSchedulerFig.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventsSchedulerFig.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventsSchedulerFig.java
index 83eb02e..2ed3a04 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventsSchedulerFig.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventsSchedulerFig.java
@@ -55,17 +55,6 @@ public interface AsyncEventsSchedulerFig extends GuicyFig {
String REPAIR_SCHEDULER_NAME = "repair.io.poolName";
- /**
- * Amount of threads to use in async processing
- */
- String IMPORT_SCHEDULER_THREADS = "import.io.threads";
-
-
- /**
- * Name of pool to use when performing scheduling
- */
- String IMPORT_SCHEDULER_NAME = "import.io.poolName";
-
@Default( "100" )
@Key( IO_SCHEDULER_THREADS )
@@ -84,11 +73,4 @@ public interface AsyncEventsSchedulerFig extends GuicyFig {
@Key( REPAIR_SCHEDULER_NAME )
String getRepairPoolName();
- @Default( "100" )
- @Key( IMPORT_SCHEDULER_THREADS )
- int getMaxImportThreads();
-
- @Default( "Usergrid-Import-Pool" )
- @Key( IMPORT_SCHEDULER_NAME )
- String getImportSchedulerName();
}
[50/50] usergrid git commit: Merge branch 'master' into USERGRID-872
Posted by sn...@apache.org.
Merge branch 'master' into USERGRID-872
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/c8ff1022
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/c8ff1022
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/c8ff1022
Branch: refs/heads/USERGRID-872
Commit: c8ff1022d58599c2aa053905679b56e9f3b02bdd
Parents: d04f6e3 6f3541b
Author: Dave Johnson <sn...@apache.org>
Authored: Wed Nov 18 11:26:48 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Wed Nov 18 11:26:48 2015 -0500
----------------------------------------------------------------------
.../installation/ug2-deploy-to-tomcat.txt | 2 +
.../docs/installation/ug2-deploy-to-tomcat.html | 2 +
docs/data-queries/operators-and-types.md | 25 +-
docs/installation/ug2-deploy-to-tomcat.md | 2 +
docs/push.tgz | Bin 1651449 -> 0 bytes
portal/Gruntfile.js | 5 +-
portal/bower.json | 2 +-
portal/getStatus.js | 37 +
portal/package.json | 2 +-
portal/status.html | 35 +
stack/Coverage.md | 2 +-
stack/build-tools/pom.xml | 11 +
stack/config/pom.xml | 10 +
.../usergrid/corepersistence/CoreModule.java | 132 +++-
.../corepersistence/CpEntityManager.java | 2 +-
.../corepersistence/CpEntityManagerFactory.java | 7 +-
.../corepersistence/CpRelationManager.java | 16 +-
.../asyncevents/AmazonAsyncEventService.java | 146 ++--
.../asyncevents/AsyncEventService.java | 5 +
.../asyncevents/AsyncEventsSchedulerFig.java | 76 +++
.../asyncevents/AsyncIndexProvider.java | 2 +-
.../asyncevents/EventBuilder.java | 25 +-
.../asyncevents/EventBuilderImpl.java | 60 +-
.../asyncevents/EventExecutionScheduler.java | 37 +
.../index/IndexProcessorFig.java | 15 +-
.../corepersistence/index/IndexServiceImpl.java | 5 +-
.../migration/DeDupConnectionDataMigration.java | 2 +-
.../pipeline/PipelineModule.java | 2 +-
.../pipeline/PipelineOperations.java | 30 -
.../pipeline/read/FilterResult.java | 7 +
.../read/search/CandidateEntityFilter.java | 6 +
.../read/search/SearchCollectionFilter.java | 2 -
.../read/traverse/AbstractReadGraphFilter.java | 136 +++-
.../read/traverse/EdgeCursorSerializer.java | 8 +-
.../read/traverse/EntityLoadVerifyFilter.java | 24 +-
.../traverse/ReadGraphCollectionFilter.java | 12 +-
.../ReadGraphConnectionByTypeFilter.java | 11 +-
.../traverse/ReadGraphConnectionFilter.java | 12 +-
.../results/ObservableQueryExecutor.java | 7 +
.../corepersistence/rx/impl/AsyncRepair.java | 38 ++
.../rx/impl/ResponseImportTasks.java | 38 ++
.../service/ServiceSchedulerFig.java | 66 ++
.../service/StatusServiceImpl.java | 3 +-
.../usergrid/persistence/CredentialsInfo.java | 46 ++
.../persistence/ObservableIterator.java | 83 ---
.../apache/usergrid/batch/BulkTestUtils.java | 1 -
.../usergrid/batch/job/CountdownLatchJob.java | 1 -
.../usergrid/batch/job/DelayExecution.java | 1 -
.../usergrid/batch/job/DelayHeartbeat.java | 1 -
.../usergrid/batch/job/FailureJobExecution.java | 1 -
.../usergrid/batch/job/OnlyOnceExceution.java | 123 ----
.../usergrid/batch/job/OnlyOnceExecution.java | 122 ++++
.../job/OnlyOnceUnlockOnFailExceution.java | 133 ----
.../job/OnlyOnceUnlockOnFailExecution.java | 132 ++++
.../usergrid/batch/job/SchedulerRuntime1IT.java | 3 +-
.../usergrid/batch/job/SchedulerRuntime2IT.java | 3 +-
.../usergrid/batch/job/SchedulerRuntime3IT.java | 3 +-
.../usergrid/batch/job/SchedulerRuntime4IT.java | 3 +-
.../usergrid/batch/job/SchedulerRuntime5IT.java | 3 +-
.../usergrid/batch/job/SchedulerRuntime6IT.java | 5 +-
.../usergrid/batch/job/SchedulerRuntime7IT.java | 7 +-
.../usergrid/batch/job/SchedulerRuntime8IT.java | 3 +-
.../batch/job/SchedulerRuntimeIntervalIT.java | 3 +-
.../clustering/hazelcast/HazelcastTest.java | 5 +-
.../corepersistence/StaleIndexCleanupTest.java | 99 +--
.../index/AsyncIndexServiceTest.java | 3 +-
.../corepersistence/index/IndexServiceTest.java | 12 +-
.../usergrid/corepersistence/index/RxTest.java | 9 +-
.../pipeline/cursor/CursorTest.java | 24 +-
.../service/ConnectionServiceImplTest.java | 5 +-
.../count/BatchCountParallelismTest.java | 5 +-
.../java/org/apache/usergrid/mq/MessagesIT.java | 8 +-
.../persistence/ApplicationServiceIT.java | 4 +-
.../usergrid/persistence/CoreSchemaManager.java | 1 -
.../apache/usergrid/persistence/CounterIT.java | 30 +-
.../persistence/EntityConnectionsIT.java | 10 +-
.../usergrid/persistence/EntityManagerIT.java | 3 +-
.../apache/usergrid/persistence/EntityTest.java | 2 -
.../org/apache/usergrid/persistence/GeoIT.java | 71 ++
.../persistence/GeoQueryBooleanTest.java | 1 -
.../persistence/PerformanceEntityReadTest.java | 4 +-
.../persistence/PerformanceEntityWriteTest.java | 4 +-
.../usergrid/persistence/RebuildIndexTest.java | 118 +++-
.../apache/usergrid/utils/UUIDUtilsTest.java | 4 +-
.../collection/guice/CollectionModule.java | 32 +
.../guice/CollectionTaskExecutor.java | 35 -
.../EntityCollectionManagerFactoryImpl.java | 5 +-
.../impl/EntityCollectionManagerImpl.java | 20 +-
.../mvcc/stage/delete/UniqueCleanup.java | 12 +-
.../mvcc/stage/write/WriteCommit.java | 11 +-
.../collection/mvcc/stage/write/WriteStart.java | 9 +-
.../scheduler/CollectionExecutorScheduler.java | 52 ++
.../scheduler/CollectionSchedulerFig.java | 53 ++
.../collection/EntityCollectionManagerIT.java | 68 ++
.../EntityCollectionManagerStressTest.java | 6 +-
.../mvcc/stage/AbstractEntityStageTest.java | 1 -
.../mvcc/stage/delete/MarkCommitTest.java | 2 +-
.../mvcc/stage/delete/UniqueCleanupTest.java | 1 -
.../mvcc/stage/write/WriteCommitTest.java | 2 +-
.../impl/SerializationComparison.java | 5 +-
...niqueValueSerializationStrategyImplTest.java | 4 +-
stack/corepersistence/common/pom.xml | 1 +
.../persistence/core/astyanax/CassandraFig.java | 2 +-
.../core/astyanax/MultiRowColumnIterator.java | 46 +-
.../core/executor/TaskExecutorFactory.java | 108 ++-
.../persistence/core/guice/CommonModule.java | 25 +-
.../persistence/core/rx/ObservableIterator.java | 2 +-
.../persistence/core/rx/RxSchedulerFig.java | 71 --
.../core/rx/RxTaskSchedulerImpl.java | 81 +--
.../persistence/core/rx/OrderedMergeTest.java | 5 +-
stack/corepersistence/graph/pom.xml | 1 +
.../usergrid/persistence/graph/GraphFig.java | 4 +-
.../persistence/graph/GraphManager.java | 14 +-
.../usergrid/persistence/graph/MarkedEdge.java | 15 +-
.../persistence/graph/guice/GraphModule.java | 18 +-
.../graph/impl/GraphManagerImpl.java | 90 ++-
.../graph/impl/SimpleMarkedEdge.java | 62 +-
.../impl/stage/NodeDeleteListenerImpl.java | 27 +-
.../impl/EdgeSerializationImpl.java | 17 +-
.../impl/shard/AsyncTaskExecutor.java | 34 +
.../impl/shard/DirectedEdgeMeta.java | 4 +-
.../impl/shard/EdgeShardStrategy.java | 10 +-
.../impl/shard/NodeShardApproximation.java | 66 --
.../graph/serialization/impl/shard/Shard.java | 15 +
.../impl/shard/ShardEntryGroup.java | 16 +-
.../impl/shard/ShardGroupCompaction.java | 4 -
.../impl/shard/ShardGroupDeletion.java | 78 +++
.../impl/shard/ShardedEdgeSerialization.java | 2 +-
.../serialization/impl/shard/count/Counter.java | 131 ----
.../shard/count/NodeShardApproximationImpl.java | 272 --------
.../count/NodeShardCounterSerialization.java | 48 --
.../NodeShardCounterSerializationImpl.java | 186 -----
.../impl/shard/count/ShardKey.java | 75 --
.../impl/shard/impl/AsyncTaskExecutorImpl.java | 53 ++
.../shard/impl/NodeShardAllocationImpl.java | 97 ++-
.../shard/impl/ShardGroupColumnIterator.java | 72 +-
.../shard/impl/ShardGroupCompactionImpl.java | 10 +-
.../impl/shard/impl/ShardGroupDeletionImpl.java | 240 +++++++
.../impl/ShardedEdgeSerializationImpl.java | 31 +-
.../impl/shard/impl/ShardsColumnIterator.java | 10 +
.../shard/impl/SizebasedEdgeColumnFamilies.java | 4 +-
.../shard/impl/SizebasedEdgeShardStrategy.java | 13 +-
.../persistence/graph/GraphManagerIT.java | 76 +--
.../persistence/graph/GraphManagerLoadTest.java | 17 +-
.../graph/GraphManagerShardConsistencyIT.java | 388 ++++++++---
.../graph/GraphManagerShardingIT.java | 208 ------
.../graph/GraphManagerStressTest.java | 60 +-
.../graph/impl/NodeDeleteListenerTest.java | 3 +-
.../serialization/EdgeSerializationTest.java | 6 +-
.../impl/shard/NodeShardAllocationTest.java | 48 +-
.../impl/shard/ShardEntryGroupTest.java | 42 ++
.../impl/shard/ShardGroupCompactionTest.java | 30 +-
.../shard/count/NodeShardApproximationTest.java | 627 -----------------
.../NodeShardCounterSerializationTest.java | 124 ----
.../shard/impl/ShardGroupDeletionImplTest.java | 346 ++++++++++
stack/corepersistence/map/pom.xml | 1 +
.../org/apache/usergrid/ExperimentalTest.java | 22 +
.../java/org/apache/usergrid/StressTest.java | 22 +
.../model/entity/EntityToMapConverter.java | 9 +-
.../persistence/model/field/DistanceField.java | 42 ++
.../persistence/model/field/FieldTypeName.java | 3 +-
stack/corepersistence/pom.xml | 4 +-
stack/corepersistence/queryindex/pom.xml | 5 +-
.../persistence/index/CandidateResult.java | 11 +-
.../persistence/index/EntityIndexBatch.java | 2 +-
.../persistence/index/GeoCandidateResult.java | 40 ++
.../usergrid/persistence/index/IndexFig.java | 6 +
.../index/impl/DeIndexOperation.java | 9 +-
.../index/impl/EntityMappingParser.java | 4 +
.../index/impl/EsEntityIndexBatchImpl.java | 34 +-
.../index/impl/EsEntityIndexImpl.java | 196 ++++--
.../index/impl/IndexOperationMessage.java | 4 +-
.../persistence/index/impl/IndexingUtils.java | 62 +-
.../EsIndexMappingMigrationPlugin.java | 2 +-
.../persistence/index/query/ParsedQuery.java | 4 +
.../persistence/index/impl/EntityIndexTest.java | 14 +-
.../index/impl/EntityToMapConverterTest.java | 48 ++
.../index/impl/IndexLoadTestsIT.java | 3 +
.../index/impl/IndexingUtilsTest.java | 36 +
.../usergrid/persistence/queue/QueueFig.java | 2 +-
stack/loadtests/README.md | 14 +-
stack/loadtests/runAuditDeleteEntities.sh | 65 ++
.../runAuditGetAllAppCollectionEntities.sh | 6 +-
.../loadtests/runAuditGetCollectionEntities.sh | 6 +-
.../runAuditVerifyCollectionEntities.sh | 2 +-
stack/loadtests/runLoadEntitiesUnlimited.sh | 1 +
stack/loadtests/runOrgAppSetup.sh | 17 +-
.../datagenerators/FeederGenerator.scala | 16 +-
.../usergrid/enums/ConfigProperties.scala | 8 +-
.../apache/usergrid/enums/ScenarioType.scala | 3 +-
.../apache/usergrid/helpers/Extractors.scala | 18 +-
.../usergrid/scenarios/AuditScenarios.scala | 203 ++++--
.../scenarios/EntityCollectionScenarios.scala | 102 ++-
.../org/apache/usergrid/settings/Settings.scala | 42 +-
.../usergrid/simulations/AuditSimulation.scala | 15 +-
.../simulations/ConfigurableSimulation.scala | 2 +-
stack/loadtests/testConfig.sh | 4 +-
.../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 | 16 +-
stack/rest/pom.xml | 12 +
.../org/apache/usergrid/rest/IndexResource.java | 350 ----------
.../apache/usergrid/rest/MigrateResource.java | 275 --------
.../apache/usergrid/rest/SystemResource.java | 111 ---
.../rest/applications/ApplicationResource.java | 50 ++
.../rest/applications/users/UserResource.java | 134 +++-
.../exceptions/AbstractExceptionMapper.java | 8 +-
.../usergrid/rest/filters/MeteringFilter.java | 8 +-
.../usergrid/rest/filters/TracingFilter.java | 5 +-
.../organizations/OrganizationResource.java | 9 +
.../organizations/OrganizationsResource.java | 33 +
.../rest/security/CrossOriginRequestFilter.java | 4 +-
.../rest/system/ConnectionResource.java | 216 ++++++
.../usergrid/rest/system/DatabaseResource.java | 2 +
.../usergrid/rest/system/IndexResource.java | 353 ++++++++++
.../usergrid/rest/system/MigrateResource.java | 277 ++++++++
.../usergrid/rest/system/SystemResource.java | 121 ++++
.../apache/usergrid/rest/IndexResourceIT.java | 4 +-
.../apache/usergrid/rest/NotificationsIT.java | 2 +
.../applications/ApplicationResourceIT.java | 82 +--
.../collection/CollectionsResourceIT.java | 18 -
.../collection/groups/GroupResourceIT.java | 2 +-
.../collection/paging/PagingResourceIT.java | 13 +-
.../collection/users/UserResourceIT.java | 117 ++++
.../users/extensions/TestResource.java | 1 -
.../applications/events/EventsResourceIT.java | 2 +-
.../applications/queries/MatrixQueryTests.java | 2 -
.../rest/applications/utils/TestUtils.java | 1 -
.../rest/filters/ContentTypeResourceIT.java | 4 -
.../usergrid/rest/management/AdminUsersIT.java | 23 +-
.../rest/management/ExportResourceIT.java | 22 +-
.../rest/management/ImportResourceIT.java | 11 +-
.../rest/management/OrganizationsIT.java | 10 +-
.../organizations/AdminEmailEncodingIT.java | 3 +-
.../usergrid/rest/test/resource/DumbClient.java | 58 --
stack/scripts/create_test_data.py | 222 ++++++
stack/scripts/migrate_entity_data.py | 18 +-
stack/scripts/multitenant_migrate.py | 677 +++++++++++++++++++
stack/services/pom.xml | 31 +-
.../management/AppInfoMigrationPlugin.java | 5 +-
.../usergrid/management/ManagementService.java | 14 +-
.../cassandra/ManagementServiceImpl.java | 43 +-
.../services/AbstractCollectionService.java | 10 +-
.../usergrid/services/AbstractService.java | 13 +-
.../services/notifications/wns/WNSAdapter.java | 5 +-
.../org/apache/usergrid/management/RoleIT.java | 2 +-
.../cassandra/ManagementServiceIT.java | 41 +-
.../management/export/ExportServiceIT.java | 84 +--
.../importer/ImportConnectionsTest.java | 2 +-
.../management/importer/ImportServiceIT.java | 13 +-
.../security/providers/FacebookProviderIT.java | 4 +-
.../providers/PingIdentityProviderIT.java | 4 +-
.../AbstractServiceNotificationIT.java | 1 +
.../notifications/NotifiersServiceIT.java | 8 +-
.../apns/NotificationsServiceIT.java | 7 +-
.../gcm/NotificationsServiceIT.java | 6 +-
.../notifications/wns/WNSAdapterTest.java | 49 ++
.../usergrid/cassandra/FakeSchemaManager.java | 4 -
262 files changed, 6767 insertions(+), 4618 deletions(-)
----------------------------------------------------------------------
[34/50] usergrid git commit: Correct Jacoco profile command arg
Posted by sn...@apache.org.
Correct Jacoco profile command arg
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/bba77f0a
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/bba77f0a
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/bba77f0a
Branch: refs/heads/USERGRID-872
Commit: bba77f0af590a634415694d8b1f59e65bb85b2ff
Parents: 40cd379
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Nov 16 13:10:44 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Nov 16 13:10:44 2015 -0500
----------------------------------------------------------------------
stack/Coverage.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/bba77f0a/stack/Coverage.md
----------------------------------------------------------------------
diff --git a/stack/Coverage.md b/stack/Coverage.md
index e09d951..0f6e0a8 100644
--- a/stack/Coverage.md
+++ b/stack/Coverage.md
@@ -5,7 +5,7 @@ To generate Jacoco coverage reports for Usergrid, do a build that runs the tests
For example:
- mvn install
+ mvn install -Pjacoco
Note that all tests must pass, or some Jacoco files will be missing and report generation is likely to fail complete.
[18/50] usergrid git commit: Merge branch '2.1-release' of
https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release
Posted by sn...@apache.org.
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/USERGRID-872
Commit: 6f61b05dd0531b54637be7e9c407f3058aa98006
Parents: a693643 63f49ba
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Nov 12 14:21:54 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Thu Nov 12 14:21:54 2015 -0700
----------------------------------------------------------------------
----------------------------------------------------------------------
[17/50] usergrid git commit: Merge commit 'refs/pull/433/head' of
github.com:apache/usergrid into 2.1-release
Posted by sn...@apache.org.
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/USERGRID-872
Commit: 63f49bac58395b8fc9b36fedd59dae297e63459f
Parents: b895643 f840623
Author: Michael Russo <mi...@gmail.com>
Authored: Thu Nov 12 13:19:54 2015 -0800
Committer: Michael Russo <mi...@gmail.com>
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
----------------------------------------------------------------------
[03/50] usergrid git commit: Moving log message to trace as it occurs
a lot during normal runtime traffic.
Posted by sn...@apache.org.
Moving log message to trace as it occurs a lot during normal runtime traffic.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/79452099
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/79452099
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/79452099
Branch: refs/heads/USERGRID-872
Commit: 79452099b809627f06efb63902b50688a18e27eb
Parents: e3d1f3b
Author: Michael Russo <mi...@gmail.com>
Authored: Wed Nov 11 08:23:22 2015 -0800
Committer: Michael Russo <mi...@gmail.com>
Committed: Wed Nov 11 08:23:22 2015 -0800
----------------------------------------------------------------------
.../serialization/impl/shard/impl/NodeShardAllocationImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/79452099/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 8943737..a849029 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.info( "Shard {} in shard group {} not full, not splitting", shardEntryGroup );
+ LOG.trace( "Shard {} in shard group {} not full, not splitting", shardEntryGroup );
return false;
}
[35/50] usergrid git commit: Tests run more reliably with 20
iterations.
Posted by sn...@apache.org.
Tests run more reliably with 20 iterations.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/f2cbf1a9
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/f2cbf1a9
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/f2cbf1a9
Branch: refs/heads/USERGRID-872
Commit: f2cbf1a98c723fe75ec6ff967e74c95b09aa82a3
Parents: bba77f0
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Nov 16 13:25:58 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Nov 16 13:25:58 2015 -0500
----------------------------------------------------------------------
.../java/org/apache/usergrid/corepersistence/CpEntityManager.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f2cbf1a9/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 009266b..522c523 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
@@ -2887,7 +2887,7 @@ public class CpEntityManager implements EntityManager {
EntityIndex.IndexRefreshCommandInfo indexRefreshCommandInfo
= managerCache.getEntityIndex(applicationScope).refreshAsync().toBlocking().first();
try {
- for (int i = 0; i < 10; i++) {
+ for (int i = 0; i < 20; i++) {
if (searchCollection(
new SimpleEntityRef(org.apache.usergrid.persistence.entities.Application.ENTITY_TYPE, getApplicationId()),
InflectionUtils.pluralize("refresh"),
[47/50] usergrid git commit: Adding "Pending" comments and JIRA links.
Posted by sn...@apache.org.
Adding "Pending" comments and JIRA links.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/78f3da6f
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/78f3da6f
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/78f3da6f
Branch: refs/heads/USERGRID-872
Commit: 78f3da6fcb194190af1d67151bb8d419f620c22e
Parents: 43f7ee0
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 10:53:38 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 10:53:38 2015 -0500
----------------------------------------------------------------------
.../apache/usergrid/persistence/CounterIT.java | 29 ++++++++++----------
.../persistence/core/rx/OrderedMergeTest.java | 5 ++--
.../shard/impl/ShardGroupDeletionImplTest.java | 2 +-
.../collection/groups/GroupResourceIT.java | 2 +-
.../applications/events/EventsResourceIT.java | 2 +-
.../organizations/AdminEmailEncodingIT.java | 3 +-
6 files changed, 22 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/78f3da6f/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
index e558bad..77dacf2 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
@@ -18,17 +18,7 @@
package org.apache.usergrid.persistence;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.UUID;
-
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
+import net.jcip.annotations.NotThreadSafe;
import org.apache.usergrid.AbstractCoreIT;
import org.apache.usergrid.corepersistence.util.CpNamingUtils;
import org.apache.usergrid.persistence.entities.Event;
@@ -39,12 +29,19 @@ import org.apache.usergrid.persistence.model.util.UUIDGenerator;
import org.apache.usergrid.utils.ImmediateCounterRule;
import org.apache.usergrid.utils.JsonUtils;
import org.apache.usergrid.utils.UUIDUtils;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
-import net.jcip.annotations.NotThreadSafe;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.UUID;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
@NotThreadSafe
@@ -63,7 +60,8 @@ public class CounterIT extends AbstractCoreIT {
}
- @Ignore( "needs to have elasticsearch refreshes implemented" )
+ @Ignore( "Pending https://issues.apache.org/jira/browse/USERGRID-1120. ")
+ // needs to have elasticsearch refreshes implemented
@Test
public void testIncrementAndDecrement() throws Exception {
@@ -89,12 +87,15 @@ public class CounterIT extends AbstractCoreIT {
LOG.debug( "user={}", user );
+ em.refreshIndex();
counters = em.getEntityCounters( applicationId );
assertEquals( new Long( 1 ), counters.get( "application.collection.users" ) );
em.delete( user );
+ em.refreshIndex();
+
counters = em.getEntityCounters( applicationId );
assertEquals( new Long( 0 ), counters.get( "application.collection.users" ) );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/78f3da6f/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/OrderedMergeTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/OrderedMergeTest.java b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/OrderedMergeTest.java
index 6366de1..465e22d 100644
--- a/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/OrderedMergeTest.java
+++ b/stack/corepersistence/common/src/test/java/org/apache/usergrid/persistence/core/rx/OrderedMergeTest.java
@@ -148,7 +148,7 @@ public class OrderedMergeTest {
@Test
- @Ignore( "Doesn't work until backpressure is implemented" )
+ @Ignore( "Pending implementation of backpressure" )
public void multipleOperatorSingleThreadSizeException() throws InterruptedException {
List<Integer> expected1List = Arrays.asList( 5, 3, 2, 0 );
@@ -269,8 +269,7 @@ public class OrderedMergeTest {
@Test
- @Ignore("Shouldn't throw an exception, should work with current impl. "
- + "Needs to be changed when backpressure is introduced" )
+ @Ignore("Pending implementation of backpressure")
public void multipleOperatorMultipleThreadSizeException() throws InterruptedException {
List<Integer> expected1List = Arrays.asList( 10, 4, 3, 2, 1 );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/78f3da6f/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImplTest.java b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImplTest.java
index 1cf6d54..fa6a3fd 100644
--- a/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImplTest.java
+++ b/stack/corepersistence/graph/src/test/java/org/apache/usergrid/persistence/graph/serialization/impl/shard/impl/ShardGroupDeletionImplTest.java
@@ -56,7 +56,7 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-@Ignore("Temporarily removing until delete is re-enabled")
+@Ignore("Pending re-enable of delete functionality")
public class ShardGroupDeletionImplTest {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/78f3da6f/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/groups/GroupResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/groups/GroupResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/groups/GroupResourceIT.java
index abf2be5..bd75adf 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/groups/GroupResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/groups/GroupResourceIT.java
@@ -393,7 +393,7 @@ public class GroupResourceIT extends AbstractRestIT {
* Post a group activity and make sure it can be read back only by group members
*
*/
- @Ignore("Fails. See todo in the test itself.")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1119. Fails. See todo in the test itself.")
@Test
public void postGroupActivity() throws IOException {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/78f3da6f/stack/rest/src/test/java/org/apache/usergrid/rest/applications/events/EventsResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/events/EventsResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/events/EventsResourceIT.java
index 2777967..185a37b 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/events/EventsResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/events/EventsResourceIT.java
@@ -45,7 +45,7 @@ public class EventsResourceIT extends AbstractRestIT {
@Test
- @Ignore("Events not working yet")
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1118. Events not working yet")
public void testEventPostandGet() throws IOException {
Map<String, Object> payload = new LinkedHashMap<String, Object>();
http://git-wip-us.apache.org/repos/asf/usergrid/blob/78f3da6f/stack/rest/src/test/java/org/apache/usergrid/rest/management/organizations/AdminEmailEncodingIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/management/organizations/AdminEmailEncodingIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/management/organizations/AdminEmailEncodingIT.java
index c615b60..bb5593e 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/management/organizations/AdminEmailEncodingIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/management/organizations/AdminEmailEncodingIT.java
@@ -77,7 +77,8 @@ public class AdminEmailEncodingIT extends AbstractRestIT {
* @throws Exception
*/
@Test
- @Ignore //This fails. I'm not sure if it is by design, but a single quote is valid in an email address
+ @Ignore("Pending https://issues.apache.org/jira/browse/USERGRID-1117")
+ // This fails. I'm not sure if it is by design, but a single quote is valid in an email address
public void getTokenQuote() throws Exception {
doTest("'");
}
[26/50] usergrid git commit: Remove some unnecessary ignore
annotations and some unnecessary code.
Posted by sn...@apache.org.
Remove some unnecessary ignore annotations and some unnecessary code.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/1434deaa
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/1434deaa
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/1434deaa
Branch: refs/heads/USERGRID-872
Commit: 1434deaace2bd9bb9a237b1a5da9fbaab70ec1e7
Parents: f1aa450
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Nov 13 10:54:13 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Nov 13 10:54:13 2015 -0500
----------------------------------------------------------------------
.../corepersistence/StaleIndexCleanupTest.java | 2 +-
.../usergrid/corepersistence/index/RxTest.java | 2 +-
.../collection/CollectionsResourceIT.java | 18 ------
.../usergrid/rest/test/resource/DumbClient.java | 58 --------------------
.../usergrid/cassandra/FakeSchemaManager.java | 4 --
5 files changed, 2 insertions(+), 82 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/1434deaa/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
index 5e0e062..2f96c18 100644
--- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/StaleIndexCleanupTest.java
@@ -196,7 +196,7 @@ public class StaleIndexCleanupTest extends AbstractCoreIT {
* it is building search results.
*/
@Test
- @Ignore("Broken until search connections is fixed")
+ @Ignore("Breaks other tests - or would if we reenabled that EVENTS_DISABLED property")
public void testStaleIndexCleanup() throws Exception {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/1434deaa/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
index 020371d..1a94aac 100644
--- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
@@ -64,7 +64,7 @@ public class RxTest {
@Test
- @Ignore("This seems like it should work, yet blocks forever")
+ @Ignore("Experimental - seems like it should work, yet blocks forever")
public void testConnectableObserver() throws InterruptedException {
final int count = 10;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/1434deaa/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/CollectionsResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/CollectionsResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/CollectionsResourceIT.java
index 92eac90..57f7b2c 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/CollectionsResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/CollectionsResourceIT.java
@@ -103,24 +103,6 @@ public class CollectionsResourceIT extends AbstractRestIT {
}
- @Ignore("Not sure that this test makes any sense")
- @Test
- public void postToEmptyCollection() throws IOException {
-/*
- Entity payload = new Entity();
- Entity entity = this.app().collection("cities").post(payload);
- assertNull(entity.get("name"));
-
-
- Map<String, String> payload = new HashMap<String, String>();
-
- JsonNode node = mapper.readTree( resource().path( "/test-organization/test-app/cities" ).queryParam( "access_token", access_token )
- .accept( MediaType.APPLICATION_JSON ).type( MediaType.APPLICATION_JSON_TYPE )
- .post( String.class, payload ));
- assertNull( getEntity( node, 0 ) );
- assertNull( node.get( "count" ) );
-*/
- }
@Test
public void postToReservedField() throws Exception {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/1434deaa/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/DumbClient.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/DumbClient.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/DumbClient.java
deleted file mode 100644
index ae74d4b..0000000
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/DumbClient.java
+++ /dev/null
@@ -1,58 +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.rest.test.resource;
-
-import org.junit.Ignore;
-import org.junit.Test;
-
-import org.apache.usergrid.persistence.index.utils.UUIDUtils;
-
-
-
-/**
- * Test Class used to model if the client is working or doing what it is supposed to be doing.
- * ask if this is for test purposes and if so if I can mark it with junit
- */
-
-public class DumbClient extends AbstractRestIT {
-
- @Test
- public void stuff(){
-
- String name = "stuff"+ UUIDUtils.newTimeUUID();
- // User user = new User( "derp","derp", "derp" );
-
-
- //Organization org = clientSetup.getRestClient().management().orgs().post( )
- // clientSetup.getRestClient().management().orgs().delete(org.getName);
- // OrganizationResource response = clientSetup.getRestClient().management().orgs().organization( "" );
- //assertNotNull( response );
- //EntityResponse itr = client.org( "test" ).getApp( "test" ).users().getEntityResponse();
- //for(Entity entity: itr){
- }
-
-
- @Ignore
- public void stateful(){
-
-// EntityResponse itr = client.org( "test" ).getApp( "test" ).users().getEntityResponse();
-//
-// for(Entity entity: itr){
-//
-// }
- }
-}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/1434deaa/stack/test-utils/src/test/java/org/apache/usergrid/cassandra/FakeSchemaManager.java
----------------------------------------------------------------------
diff --git a/stack/test-utils/src/test/java/org/apache/usergrid/cassandra/FakeSchemaManager.java b/stack/test-utils/src/test/java/org/apache/usergrid/cassandra/FakeSchemaManager.java
index 7d80c6e..bb6a933 100644
--- a/stack/test-utils/src/test/java/org/apache/usergrid/cassandra/FakeSchemaManager.java
+++ b/stack/test-utils/src/test/java/org/apache/usergrid/cassandra/FakeSchemaManager.java
@@ -17,11 +17,7 @@
package org.apache.usergrid.cassandra;
-import org.junit.Ignore;
-
-
/** @author zznate */
-@Ignore
public class FakeSchemaManager implements SchemaManager {
@Override
public void create() {
[29/50] usergrid git commit: Merge branch 'master' of
https://git-wip-us.apache.org/repos/asf/usergrid
Posted by sn...@apache.org.
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/USERGRID-872
Commit: 044b14963bd00ba02c63447b9658978b98bba1f6
Parents: 91a4911 27de65c
Author: Todd Nine <tn...@apigee.com>
Authored: Fri Nov 13 14:11:25 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
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(-)
----------------------------------------------------------------------
[05/50] usergrid git commit: Merge branch '2.1-release' of
https://git-wip-us.apache.org/repos/asf/usergrid into 2.1-release
Posted by sn...@apache.org.
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/204bf042
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/204bf042
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/204bf042
Branch: refs/heads/USERGRID-872
Commit: 204bf04272be75056a05e40b4bf6d3c389f0b134
Parents: 24600e0 7945209
Author: Shawn Feldman <sf...@apache.org>
Authored: Wed Nov 11 09:49:04 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
Committed: Wed Nov 11 09:49:04 2015 -0700
----------------------------------------------------------------------
.../read/traverse/AbstractReadGraphFilter.java | 6 +-
.../usergrid/corepersistence/index/RxTest.java | 5 +-
.../persistence/graph/guice/GraphModule.java | 7 -
.../impl/shard/DirectedEdgeMeta.java | 4 +-
.../impl/shard/EdgeShardStrategy.java | 10 +-
.../impl/shard/NodeShardApproximation.java | 66 --
.../impl/shard/ShardEntryGroup.java | 3 +-
.../impl/shard/ShardedEdgeSerialization.java | 2 +-
.../serialization/impl/shard/count/Counter.java | 131 ----
.../shard/count/NodeShardApproximationImpl.java | 272 --------
.../count/NodeShardCounterSerialization.java | 48 --
.../NodeShardCounterSerializationImpl.java | 186 ------
.../impl/shard/count/ShardKey.java | 75 ---
.../shard/impl/NodeShardAllocationImpl.java | 19 +-
.../impl/shard/impl/ShardGroupDeletionImpl.java | 158 ++---
.../impl/ShardedEdgeSerializationImpl.java | 28 -
.../shard/impl/SizebasedEdgeColumnFamilies.java | 4 +-
.../shard/impl/SizebasedEdgeShardStrategy.java | 13 +-
.../graph/GraphManagerShardConsistencyIT.java | 5 +
.../graph/GraphManagerShardingIT.java | 208 ------
.../impl/shard/NodeShardAllocationTest.java | 48 +-
.../impl/shard/ShardEntryGroupTest.java | 28 +
.../shard/count/NodeShardApproximationTest.java | 627 -------------------
.../NodeShardCounterSerializationTest.java | 124 ----
.../shard/impl/ShardGroupDeletionImplTest.java | 5 +
.../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 +
.../exceptions/AbstractExceptionMapper.java | 8 +-
stack/services/pom.xml | 10 +-
.../services/AbstractCollectionService.java | 10 +-
.../notifications/wns/WNSAdapterTest.java | 49 ++
38 files changed, 399 insertions(+), 1977 deletions(-)
----------------------------------------------------------------------
[07/50] usergrid git commit: merge
Posted by sn...@apache.org.
merge
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/67ab2443
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/67ab2443
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/67ab2443
Branch: refs/heads/USERGRID-872
Commit: 67ab24430c90586122e8458a168d48bad30bf494
Parents: de42b9c 204bf04
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Nov 12 08:35:38 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
Committed: Thu Nov 12 08:35:38 2015 -0700
----------------------------------------------------------------------
.../asyncevents/AmazonAsyncEventService.java | 8 +-
.../read/traverse/AbstractReadGraphFilter.java | 8 +-
.../usergrid/corepersistence/index/RxTest.java | 1 +
.../persistence/graph/guice/GraphModule.java | 7 -
.../impl/shard/DirectedEdgeMeta.java | 4 +-
.../impl/shard/EdgeShardStrategy.java | 10 +-
.../impl/shard/NodeShardApproximation.java | 66 --
.../impl/shard/ShardEntryGroup.java | 3 +-
.../impl/shard/ShardedEdgeSerialization.java | 2 +-
.../serialization/impl/shard/count/Counter.java | 131 ----
.../shard/count/NodeShardApproximationImpl.java | 272 --------
.../count/NodeShardCounterSerialization.java | 48 --
.../NodeShardCounterSerializationImpl.java | 186 ------
.../impl/shard/count/ShardKey.java | 75 ---
.../shard/impl/NodeShardAllocationImpl.java | 19 +-
.../impl/shard/impl/ShardGroupDeletionImpl.java | 158 ++---
.../impl/ShardedEdgeSerializationImpl.java | 28 -
.../shard/impl/SizebasedEdgeColumnFamilies.java | 4 +-
.../shard/impl/SizebasedEdgeShardStrategy.java | 13 +-
.../graph/GraphManagerShardConsistencyIT.java | 5 +
.../graph/GraphManagerShardingIT.java | 208 ------
.../impl/shard/NodeShardAllocationTest.java | 48 +-
.../impl/shard/ShardEntryGroupTest.java | 28 +
.../shard/count/NodeShardApproximationTest.java | 627 -------------------
.../NodeShardCounterSerializationTest.java | 124 ----
.../shard/impl/ShardGroupDeletionImplTest.java | 5 +
.../index/impl/EntityMappingParser.java | 4 +
.../index/impl/IndexOperationMessage.java | 4 +-
.../index/impl/EntityToMapConverterTest.java | 48 ++
.../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 | 4 -
stack/rest/pom.xml | 10 +
.../exceptions/AbstractExceptionMapper.java | 8 +-
stack/scripts/multitenant_migrate.py | 48 +-
stack/services/pom.xml | 23 +-
.../services/AbstractCollectionService.java | 10 +-
.../services/notifications/wns/WNSAdapter.java | 5 +-
.../notifications/wns/WNSAdapterTest.java | 49 ++
43 files changed, 438 insertions(+), 1998 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/67ab2443/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AmazonAsyncEventService.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/67ab2443/stack/core/src/test/java/org/apache/usergrid/corepersistence/index/RxTest.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/67ab2443/stack/pom.xml
----------------------------------------------------------------------
diff --cc stack/pom.xml
index c1ded77,ae55ea1..3f7b68b
--- a/stack/pom.xml
+++ b/stack/pom.xml
@@@ -1574,26 -1646,7 +1574,23 @@@
</plugins>
</reporting>
--
+ <profiles>
+ <profile>
+ <id>jacoco</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire.plugin.version}</version>
+ <configuration>
+ <argLine>-javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar ${ug.argline} -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
-
- <!--
<repositories>
<repository>
<id>local-dependencies</id>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/67ab2443/stack/rest/pom.xml
----------------------------------------------------------------------
diff --cc stack/rest/pom.xml
index d70cdd8,7b1bad6..601ed61
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@@ -395,6 -400,24 +395,16 @@@
<artifactId>usergrid-java-client</artifactId>
<scope>test</scope>
</dependency>
-
- <dependency>
- <groupId>org.apache.usergrid</groupId>
- <artifactId>usergrid-services</artifactId>
- <version>2.1.0-SNAPSHOT</version>
- <scope>test</scope>
- <classifier>tests</classifier>
- </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey.contribs</groupId>
+ <artifactId>jersey-apache-client</artifactId>
+ <version>1.19</version>
+ </dependency>
</dependencies>
http://git-wip-us.apache.org/repos/asf/usergrid/blob/67ab2443/stack/services/pom.xml
----------------------------------------------------------------------
diff --cc stack/services/pom.xml
index 0c66ccf,a37e6ee..9837e76
--- a/stack/services/pom.xml
+++ b/stack/services/pom.xml
@@@ -455,47 -439,7 +456,29 @@@
<dependency>
<groupId>com.github.fernandospr</groupId>
<artifactId>java-wns</artifactId>
- <version>1.3</version>
- <exclusions>
- <exclusion>
- <artifactId>jackson-jaxrs</artifactId>
- <groupId>org.codehaus.jackson</groupId>
- </exclusion>
- <!-- Would be nice if we could exclude this dependency on Jersey 1.
- Apparently Java-WNS 1.3.1 will move to Jersey 2.
- <exclusion>
- <artifactId>jersey-apache-client</artifactId>
- <groupId>com.sun.jersey.contribs</groupId>
- </exclusion>
- <exclusion>
- <artifactId>jersey-client</artifactId>
- <groupId>com.sun.jersey</groupId>
- </exclusion>
- -->
- </exclusions>
+ <version>1.2-USERGRID</version>
</dependency>
-
</dependencies>
+
+ <!--
+ Need jacoco profile here because we override the parent's surefire plugin settings above.
+ -->
+ <profiles>
+ <profile>
+ <id>jacoco</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire.plugin.version}</version>
+ <configuration>
+ <argLine>-Dtest.barrier.timestamp=${maven.build.timestamp} -Dtest.clean.storage=true -Xmx${ug.heapmax} -Xms${ug.heapmin} -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -javaagent:${settings.localRepository}/com/github/stephenc/jamm/0.2.5/jamm-0.2.5.jar ${ug.argline} -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${project.build.directory}/jacoco.exec</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
</project>
[13/50] usergrid git commit: fix alias issues
Posted by sn...@apache.org.
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/USERGRID-872
Commit: c068ab0d471bf8bf86dff2a9d3d30ae1baa0f24d
Parents: 3005331
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Nov 12 12:34:46 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
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<UUID,Boolean> 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);
+ }
});
}
[04/50] usergrid git commit: fix bug in expiration
Posted by sn...@apache.org.
fix bug in expiration
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/24600e0b
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/24600e0b
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/24600e0b
Branch: refs/heads/USERGRID-872
Commit: 24600e0bd17bff9ca022271d780a7e220bfda94e
Parents: 5fd1d5d
Author: Shawn Feldman <sf...@apache.org>
Authored: Wed Nov 11 09:48:42 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
Committed: Wed Nov 11 09:48:42 2015 -0700
----------------------------------------------------------------------
.../apache/usergrid/services/notifications/wns/WNSAdapter.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/24600e0b/stack/services/src/main/java/org/apache/usergrid/services/notifications/wns/WNSAdapter.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/notifications/wns/WNSAdapter.java b/stack/services/src/main/java/org/apache/usergrid/services/notifications/wns/WNSAdapter.java
index 3ad3d35..f2946df 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/notifications/wns/WNSAdapter.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/notifications/wns/WNSAdapter.java
@@ -77,8 +77,9 @@ public class WNSAdapter implements ProviderAdapter {
// set the optional TTL value used when pushing notifications
WnsNotificationRequestOptional opt = new WnsNotificationRequestOptional();
- opt.ttl = String.valueOf(notification.getExpireTTLSeconds());
-
+ if(notification.getExpireTTLSeconds()>0) {
+ opt.ttl = String.valueOf(notification.getExpireTTLSeconds());
+ }
switch (translatedNotification.getType()) {
case "toast":
WnsToast toast = new WnsToastBuilder().bindingTemplateToastText01(translatedNotification.getMessage().toString()).build();
[02/50] usergrid git commit: Fix annotations so that CORS and tracing
filters work, and add JIRA issue for the TODO on the Metering Filter.
Posted by sn...@apache.org.
Fix annotations so that CORS and tracing filters work, and add JIRA issue for the TODO on the Metering Filter.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/de42b9cb
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/de42b9cb
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/de42b9cb
Branch: refs/heads/USERGRID-872
Commit: de42b9cb0ee77ab40f2f0af5f34dc4d7df56dac5
Parents: 40e002b
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 10 15:21:21 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 10 15:21:21 2015 -0500
----------------------------------------------------------------------
.../org/apache/usergrid/rest/filters/MeteringFilter.java | 8 ++++----
.../java/org/apache/usergrid/rest/filters/TracingFilter.java | 5 ++---
.../usergrid/rest/security/CrossOriginRequestFilter.java | 4 ++--
3 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de42b9cb/stack/rest/src/main/java/org/apache/usergrid/rest/filters/MeteringFilter.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/filters/MeteringFilter.java b/stack/rest/src/main/java/org/apache/usergrid/rest/filters/MeteringFilter.java
index 2735cdf..b8adc9a 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/filters/MeteringFilter.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/filters/MeteringFilter.java
@@ -36,6 +36,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.container.*;
import javax.ws.rs.core.Context;
+import javax.ws.rs.ext.Provider;
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -46,10 +47,9 @@ import java.util.UUID;
import java.util.concurrent.TimeUnit;
-// TODO: Metering for Jersey 2
-@Resource
-@PreMatching
-@Component
+// TODO: Metering for Jersey 2 (https://issues.apache.org/jira/browse/USERGRID-1103)
+
+@Provider
public class MeteringFilter implements ContainerRequestFilter, ContainerResponseFilter {
@Override
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de42b9cb/stack/rest/src/main/java/org/apache/usergrid/rest/filters/TracingFilter.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/filters/TracingFilter.java b/stack/rest/src/main/java/org/apache/usergrid/rest/filters/TracingFilter.java
index 64d0209..1c23f63 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/filters/TracingFilter.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/filters/TracingFilter.java
@@ -30,6 +30,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.container.*;
import javax.ws.rs.core.Context;
+import javax.ws.rs.ext.Provider;
/**
@@ -37,9 +38,7 @@ import javax.ws.rs.core.Context;
*
* @author zznate
*/
-@Resource
-@PreMatching
-@Component
+@Provider
public class TracingFilter implements ContainerRequestFilter, ContainerResponseFilter {
private Logger logger = LoggerFactory.getLogger( TracingFilter.class );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/de42b9cb/stack/rest/src/main/java/org/apache/usergrid/rest/security/CrossOriginRequestFilter.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/security/CrossOriginRequestFilter.java b/stack/rest/src/main/java/org/apache/usergrid/rest/security/CrossOriginRequestFilter.java
index 00c12d7..f150b2b 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/security/CrossOriginRequestFilter.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/security/CrossOriginRequestFilter.java
@@ -21,14 +21,14 @@ import org.apache.usergrid.rest.utils.CORSUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Resource;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.container.ContainerResponseFilter;
+import javax.ws.rs.ext.Provider;
import java.io.IOException;
-@Resource
+@Provider
public class CrossOriginRequestFilter implements ContainerResponseFilter {
public static final Logger logger = LoggerFactory.getLogger( CrossOriginRequestFilter.class );
[09/50] usergrid git commit: fix alias issues
Posted by sn...@apache.org.
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/USERGRID-872
Commit: fec6520eb47fa6fe7bc1d8d7fad6a729874f3475
Parents: 204bf04
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Nov 12 11:07:29 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
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..77777c2 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 18cb928..179b3c4 100644
--- 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
@@ -244,6 +244,23 @@ public class IndexingUtils {
return new CandidateResult( entityId, UUID.fromString( versionUUID ), documentId );
}
+ /**
+ * Parse the document id into a candidate result
+ */
+ public static UUID parseAppIdFromIndexDocId( final String documentId) {
+
+ final Matcher matcher = DOCUMENT_PATTERN.matcher(documentId);
+
+ Preconditions.checkArgument(matcher.matches(), "Pattern for document id did not match expected format");
+ Preconditions.checkArgument(matcher.groupCount() == 9, "9 groups expected in the pattern");
+
+ //Other fields can be parsed using groups. The groups start at value 1, group 0 is the entire match
+ final String appUUID = matcher.group(1);
+
+ return UUID.fromString(appUUID);
+
+ }
+
/**
* Get the entity type
@@ -262,4 +279,8 @@ public class IndexingUtils {
sb.append( ENTITY_TYPE_NAME).append("(" ).append( type ).append( ")" );
return sb.toString();
}
+
+ public static UUID getApplicationIdFromIndexDocId(String documentId) {
+ return parseAppIdFromIndexDocId(documentId);
+ }
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/fec6520e/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/IndexingUtilsTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/IndexingUtilsTest.java b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/IndexingUtilsTest.java
index 97389b2..d93f8a3 100644
--- a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/IndexingUtilsTest.java
+++ b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/IndexingUtilsTest.java
@@ -31,6 +31,7 @@ import org.apache.usergrid.persistence.model.entity.Id;
import org.apache.usergrid.persistence.model.entity.SimpleId;
import org.apache.usergrid.persistence.model.util.UUIDGenerator;
+import static org.apache.usergrid.persistence.index.impl.IndexingUtils.parseAppIdFromIndexDocId;
import static org.apache.usergrid.persistence.index.impl.IndexingUtils.parseIndexDocId;
import static org.junit.Assert.assertEquals;
@@ -91,6 +92,41 @@ public class IndexingUtilsTest {
@Test
+ public void testAppIdFromDocumentId() {
+
+ final ApplicationScopeImpl applicationScope = new ApplicationScopeImpl( new SimpleId( "application" ) );
+
+ final Id id = new SimpleId( "id" );
+ final UUID version = UUIDGenerator.newTimeUUID();
+
+ final SearchEdgeImpl searchEdge =
+ new SearchEdgeImpl( new SimpleId( "source" ), "users", SearchEdge.NodeType.TARGET );
+
+ final String output = IndexingUtils.createIndexDocId( applicationScope, id, version, searchEdge );
+
+
+ final String expected =
+ "appId(" + applicationScope.getApplication().getUuid() + ",application).entityId(" + id.getUuid() + "," + id
+ .getType() + ").version(" + version + ").nodeId(" + searchEdge.getNodeId().getUuid() + "," + searchEdge
+ .getNodeId().getType() + ").edgeName(users).nodeType(TARGET)";
+
+
+ assertEquals( output, expected );
+
+
+ //now parse it
+
+ final CandidateResult parsedId = parseIndexDocId( output );
+
+ assertEquals(version, parsedId.getVersion());
+ assertEquals(id, parsedId.getId());
+
+ final UUID appId = parseAppIdFromIndexDocId(output);
+ assertEquals(appId,applicationScope.getApplication().getUuid());
+ }
+
+
+ @Test
public void testDocumentIdPipes() {
final ApplicationScopeImpl applicationScope = new ApplicationScopeImpl( new SimpleId( "application" ) );
[25/50] usergrid git commit: Add references to JIRA issues in @Ignore
annotations
Posted by sn...@apache.org.
Add references to JIRA issues in @Ignore annotations
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/f1aa4506
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/f1aa4506
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/f1aa4506
Branch: refs/heads/USERGRID-872
Commit: f1aa4506da471ad01ce0fb0c57af9cdc33ea1a70
Parents: 27de65c
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Nov 13 10:51:26 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Nov 13 10:51:26 2015 -0500
----------------------------------------------------------------------
.../java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java | 2 +-
.../java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java | 2 +-
.../java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java | 2 +-
.../java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java | 2 +-
.../java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java | 2 +-
.../java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java | 2 +-
.../java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java | 2 +-
.../java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f1aa4506/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
index 3d85c0e..380a683 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime1IT.java
@@ -34,7 +34,7 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes.
*/
-@Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
+@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
public class SchedulerRuntime1IT extends AbstractSchedulerRuntimeIT {
private static final Logger logger = LoggerFactory.getLogger(SchedulerRuntime1IT.class.getName());
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f1aa4506/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
index 88f5311..2c2aa40 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime2IT.java
@@ -34,7 +34,7 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
+@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
public class SchedulerRuntime2IT extends AbstractSchedulerRuntimeIT {
private static final Logger logger = LoggerFactory.getLogger(SchedulerRuntime2IT.class.getName());
/** Test the scheduler ramps up correctly when there are more jobs to be read after a pause */
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f1aa4506/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
index dfe4f52..5fc6398 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime3IT.java
@@ -33,7 +33,7 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
+@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
public class SchedulerRuntime3IT extends AbstractSchedulerRuntimeIT {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f1aa4506/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
index 2cf1c42..fbd49f2 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime4IT.java
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
+@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
public class SchedulerRuntime4IT extends AbstractSchedulerRuntimeIT {
/**
* Test the scheduler ramps up correctly when there are more jobs to be read after a pause when the job specifies
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f1aa4506/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
index aa4f018..1b5cbab 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime5IT.java
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
+@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
public class SchedulerRuntime5IT extends AbstractSchedulerRuntimeIT {
/**
* Test the scheduler ramps up correctly when there are more jobs to be read after a pause when the job specifies
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f1aa4506/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
index d4cb657..239101c 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime6IT.java
@@ -35,7 +35,7 @@ import static org.junit.Assert.assertTrue;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
+@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
public class SchedulerRuntime6IT extends AbstractSchedulerRuntimeIT {
/**
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f1aa4506/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
index 0cbe151..091c875 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime7IT.java
@@ -32,7 +32,7 @@ import static org.junit.Assert.assertTrue;
*/
//@org.junit.Ignore( "Todd you need to take a look at this since it's not clear to me what was intended in this test." )
-@Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
+@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
public class SchedulerRuntime7IT extends AbstractSchedulerRuntimeIT {
/** Test that we're only running once, even when a job exceeds the heartbeat time */
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f1aa4506/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
index a8c88ff..65b5e67 100644
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/SchedulerRuntime8IT.java
@@ -35,7 +35,7 @@ import static org.junit.Assert.assertFalse;
* Class to test job runtimes
*/
-@Ignore("These tests no longer work with shared spring context. Need to re-evaluate")
+@Ignore("These tests no longer work with shared Spring context, need to be fixed https://issues.apache.org/jira/browse/USERGRID-1105" )
public class SchedulerRuntime8IT extends AbstractSchedulerRuntimeIT {
/**
[37/50] usergrid git commit: Fix spelling error in class names.
Posted by sn...@apache.org.
Fix spelling error in class names.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/f62e0aa5
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/f62e0aa5
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/f62e0aa5
Branch: refs/heads/USERGRID-872
Commit: f62e0aa5869785b459571cab306579ca21bf0be1
Parents: 1385366
Author: Dave Johnson <sn...@apache.org>
Authored: Tue Nov 17 07:51:29 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Tue Nov 17 07:51:29 2015 -0500
----------------------------------------------------------------------
.../usergrid/batch/job/OnlyOnceExceution.java | 123 -----------------
.../usergrid/batch/job/OnlyOnceExecution.java | 122 +++++++++++++++++
.../job/OnlyOnceUnlockOnFailExceution.java | 133 -------------------
.../job/OnlyOnceUnlockOnFailExecution.java | 132 ++++++++++++++++++
4 files changed, 254 insertions(+), 256 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f62e0aa5/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java
deleted file mode 100644
index 6109f1f..0000000
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExceution.java
+++ /dev/null
@@ -1,123 +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.batch.job;
-
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.Ignore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import org.apache.usergrid.batch.JobExecution;
-
-
-/**
- * A job that will sleep for the amount of time specified. Used to check that our counter is only ever run once.
- *
- * @author tnine
- */
-@Component("onlyOnceExceution")
-@Ignore("Not a test")
-public class OnlyOnceExceution extends OnlyOnceJob {
-
- private static final Logger logger = LoggerFactory.getLogger( OnlyOnceExceution.class );
-
- private CountDownLatch latch = null;
- private CountDownLatch sleptLatch = new CountDownLatch( 1 );
- private long timeout;
- private boolean slept = false;
- private long delay;
-
-
- /**
- *
- */
- public OnlyOnceExceution() {
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.usergrid.batch.job.OnlyOnceJob#doJob(org.apache.usergrid.batch.JobExecution)
- */
- @Override
- protected void doJob( JobExecution execution ) throws Exception {
- logger.info( "Running only once execution" );
-
- latch.countDown();
-
-
- if ( !slept ) {
- logger.info( "Sleeping in only once execution" );
- Thread.sleep( timeout );
- slept = true;
- sleptLatch.countDown();
- }
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.usergrid.batch.job.OnlyOnceJob#getDelay(org.apache.usergrid.batch.JobExecution)
- */
- @Override
- protected long getDelay( JobExecution execution ) throws Exception {
- return delay;
- }
-
-
- public void setDelay( long delay ) {
- this.delay = delay;
- }
-
-
- public void setLatch( int calls ) {
- latch = new CountDownLatch( calls );
- }
-
-
- public boolean waitForCount( long timeout, TimeUnit unit ) throws InterruptedException {
- return latch.await( timeout, unit );
- }
-
-
- public boolean waitForSleep( long timeout, TimeUnit unit ) throws InterruptedException {
- return sleptLatch.await( timeout, unit );
- }
-
-
- /** @return the timeout */
- public long getTimeout() {
- return timeout;
- }
-
-
- /** @param timeout the timeout to set */
- public void setTimeout( long timeout ) {
- this.timeout = timeout;
- }
-
-
- @Override
- public void dead( final JobExecution execution ) throws Exception {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f62e0aa5/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExecution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExecution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExecution.java
new file mode 100644
index 0000000..ed9e8f4
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceExecution.java
@@ -0,0 +1,122 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.Ignore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import org.apache.usergrid.batch.JobExecution;
+
+
+/**
+ * A job that will sleep for the amount of time specified. Used to check that our counter is only ever run once.
+ *
+ * @author tnine
+ */
+@Component("onlyOnceExecution")
+public class OnlyOnceExecution extends OnlyOnceJob {
+
+ private static final Logger logger = LoggerFactory.getLogger( OnlyOnceExecution.class );
+
+ private CountDownLatch latch = null;
+ private CountDownLatch sleptLatch = new CountDownLatch( 1 );
+ private long timeout;
+ private boolean slept = false;
+ private long delay;
+
+
+ /**
+ *
+ */
+ public OnlyOnceExecution() {
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.usergrid.batch.job.OnlyOnceJob#doJob(org.apache.usergrid.batch.JobExecution)
+ */
+ @Override
+ protected void doJob( JobExecution execution ) throws Exception {
+ logger.info( "Running only once execution" );
+
+ latch.countDown();
+
+
+ if ( !slept ) {
+ logger.info( "Sleeping in only once execution" );
+ Thread.sleep( timeout );
+ slept = true;
+ sleptLatch.countDown();
+ }
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.usergrid.batch.job.OnlyOnceJob#getDelay(org.apache.usergrid.batch.JobExecution)
+ */
+ @Override
+ protected long getDelay( JobExecution execution ) throws Exception {
+ return delay;
+ }
+
+
+ public void setDelay( long delay ) {
+ this.delay = delay;
+ }
+
+
+ public void setLatch( int calls ) {
+ latch = new CountDownLatch( calls );
+ }
+
+
+ public boolean waitForCount( long timeout, TimeUnit unit ) throws InterruptedException {
+ return latch.await( timeout, unit );
+ }
+
+
+ public boolean waitForSleep( long timeout, TimeUnit unit ) throws InterruptedException {
+ return sleptLatch.await( timeout, unit );
+ }
+
+
+ /** @return the timeout */
+ public long getTimeout() {
+ return timeout;
+ }
+
+
+ /** @param timeout the timeout to set */
+ public void setTimeout( long timeout ) {
+ this.timeout = timeout;
+ }
+
+
+ @Override
+ public void dead( final JobExecution execution ) throws Exception {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f62e0aa5/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java
deleted file mode 100644
index 6dd826a..0000000
--- a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExceution.java
+++ /dev/null
@@ -1,133 +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.batch.job;
-
-
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.Ignore;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Component;
-
-import org.apache.usergrid.batch.JobExecution;
-
-
-/**
- * A job that will sleep for the amount of time specified. Used to check that our counter is only ever run once. Checks
- * the lock is released on fail
- *
- * @author tnine
- */
-@Component("onlyOnceUnlockOnFailExceution")
-@Ignore("Not a test")
-public class OnlyOnceUnlockOnFailExceution extends OnlyOnceJob {
-
- private static final Logger logger = LoggerFactory.getLogger( OnlyOnceUnlockOnFailExceution.class );
-
- private CountDownLatch latch = null;
- private CountDownLatch exception = new CountDownLatch( 1 );
- private CountDownLatch completed = new CountDownLatch( 1 );
- private long timeout;
- private boolean slept = false;
- private long delay;
-
-
- /**
- *
- */
- public OnlyOnceUnlockOnFailExceution() {
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.usergrid.batch.job.OnlyOnceJob#doJob(org.apache.usergrid.batch.JobExecution)
- */
- @Override
- protected void doJob( JobExecution execution ) throws Exception {
- logger.info( "Running only once execution" );
-
-
- latch.countDown();
-
- if ( !slept ) {
- logger.info( "Sleeping in only once execution" );
- Thread.sleep( timeout );
- slept = true;
- exception.countDown();
- throw new RuntimeException( "I failed to run correctly, I should be retried" );
- }
-
- completed.countDown();
- }
-
-
- /* (non-Javadoc)
- * @see org.apache.usergrid.batch.job.OnlyOnceJob#getDelay(org.apache.usergrid.batch.JobExecution)
- */
- @Override
- protected long getDelay( JobExecution execution ) throws Exception {
- return delay;
- }
-
-
- public void setDelay( long delay ) {
- this.delay = delay;
- }
-
-
- public void setLatch( int calls ) {
- latch = new CountDownLatch( calls );
- }
-
-
- public boolean waitForCount( long timeout, TimeUnit unit ) throws InterruptedException {
- return latch.await( timeout, unit );
- }
-
-
- public boolean waitForException( long timeout, TimeUnit unit ) throws InterruptedException {
- return exception.await( timeout, unit );
- }
-
-
- public boolean waitForCompletion( long timeout, TimeUnit unit ) throws InterruptedException {
- return completed.await( timeout, unit );
- }
-
-
- /** @return the timeout */
- public long getTimeout() {
- return timeout;
- }
-
-
- /** @param timeout the timeout to set */
- public void setTimeout( long timeout ) {
- this.timeout = timeout;
- }
-
-
- @Override
- public void dead( final JobExecution execution ) throws Exception {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/f62e0aa5/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExecution.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExecution.java b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExecution.java
new file mode 100644
index 0000000..53fde15
--- /dev/null
+++ b/stack/core/src/test/java/org/apache/usergrid/batch/job/OnlyOnceUnlockOnFailExecution.java
@@ -0,0 +1,132 @@
+/*
+ * 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.batch.job;
+
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.junit.Ignore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+import org.apache.usergrid.batch.JobExecution;
+
+
+/**
+ * A job that will sleep for the amount of time specified. Used to check that our counter is only ever run once. Checks
+ * the lock is released on fail
+ *
+ * @author tnine
+ */
+@Component("onlyOnceUnlockOnFailExecution")
+public class OnlyOnceUnlockOnFailExecution extends OnlyOnceJob {
+
+ private static final Logger logger = LoggerFactory.getLogger( OnlyOnceUnlockOnFailExecution.class );
+
+ private CountDownLatch latch = null;
+ private CountDownLatch exception = new CountDownLatch( 1 );
+ private CountDownLatch completed = new CountDownLatch( 1 );
+ private long timeout;
+ private boolean slept = false;
+ private long delay;
+
+
+ /**
+ *
+ */
+ public OnlyOnceUnlockOnFailExecution() {
+ }
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.usergrid.batch.job.OnlyOnceJob#doJob(org.apache.usergrid.batch.JobExecution)
+ */
+ @Override
+ protected void doJob( JobExecution execution ) throws Exception {
+ logger.info( "Running only once execution" );
+
+
+ latch.countDown();
+
+ if ( !slept ) {
+ logger.info( "Sleeping in only once execution" );
+ Thread.sleep( timeout );
+ slept = true;
+ exception.countDown();
+ throw new RuntimeException( "I failed to run correctly, I should be retried" );
+ }
+
+ completed.countDown();
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.apache.usergrid.batch.job.OnlyOnceJob#getDelay(org.apache.usergrid.batch.JobExecution)
+ */
+ @Override
+ protected long getDelay( JobExecution execution ) throws Exception {
+ return delay;
+ }
+
+
+ public void setDelay( long delay ) {
+ this.delay = delay;
+ }
+
+
+ public void setLatch( int calls ) {
+ latch = new CountDownLatch( calls );
+ }
+
+
+ public boolean waitForCount( long timeout, TimeUnit unit ) throws InterruptedException {
+ return latch.await( timeout, unit );
+ }
+
+
+ public boolean waitForException( long timeout, TimeUnit unit ) throws InterruptedException {
+ return exception.await( timeout, unit );
+ }
+
+
+ public boolean waitForCompletion( long timeout, TimeUnit unit ) throws InterruptedException {
+ return completed.await( timeout, unit );
+ }
+
+
+ /** @return the timeout */
+ public long getTimeout() {
+ return timeout;
+ }
+
+
+ /** @param timeout the timeout to set */
+ public void setTimeout( long timeout ) {
+ this.timeout = timeout;
+ }
+
+
+ @Override
+ public void dead( final JobExecution execution ) throws Exception {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+}
[32/50] usergrid git commit: Merge branch '2.1-release' of
https://git-wip-us.apache.org/repos/asf/usergrid
Posted by sn...@apache.org.
Merge branch '2.1-release' 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/fdcae67f
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/fdcae67f
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/fdcae67f
Branch: refs/heads/USERGRID-872
Commit: fdcae67fa7af349fbbb8266925c66b0a9a802083
Parents: 044b149 8ed1bc7
Author: Michael Russo <mi...@gmail.com>
Authored: Sun Nov 15 08:12:35 2015 -0800
Committer: Michael Russo <mi...@gmail.com>
Committed: Sun Nov 15 08:12:35 2015 -0800
----------------------------------------------------------------------
.../usergrid/corepersistence/CoreModule.java | 2 +-
.../asyncevents/AsyncEventsSchedulerFig.java | 18 ------------------
2 files changed, 1 insertion(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/fdcae67f/stack/core/src/main/java/org/apache/usergrid/corepersistence/CoreModule.java
----------------------------------------------------------------------
[14/50] usergrid git commit: fix alias issues
Posted by sn...@apache.org.
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/USERGRID-872
Commit: f13e45b16561494d460a0f9c8592e319308be049
Parents: c068ab0
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Nov 12 12:36:52 2015 -0700
Committer: Shawn Feldman <sf...@apache.org>
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<UUID,Boolean> apps = new HashMap<>(indexOperationMessage.getIndexRequests().size()+indexOperationMessage.getDeIndexRequests().size());
+ final Map<UUID,Boolean> 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);
}
- });
+ };
}
[36/50] usergrid git commit: Merge branch 'master' into ignores
Posted by sn...@apache.org.
Merge branch 'master' into ignores
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/13853662
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/13853662
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/13853662
Branch: refs/heads/USERGRID-872
Commit: 13853662ee07ab4ec5b812fd3d5fe42ef8b99d9a
Parents: f2cbf1a fdcae67
Author: Dave Johnson <sn...@apache.org>
Authored: Mon Nov 16 13:53:02 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Mon Nov 16 13:53:02 2015 -0500
----------------------------------------------------------------------
.../usergrid/corepersistence/CoreModule.java | 2 +-
.../asyncevents/AsyncEventsSchedulerFig.java | 18 ------------
.../pipeline/PipelineModule.java | 2 +-
.../pipeline/PipelineOperations.java | 30 --------------------
.../read/search/SearchCollectionFilter.java | 2 --
5 files changed, 2 insertions(+), 52 deletions(-)
----------------------------------------------------------------------
[11/50] usergrid git commit: Address fixes found during review
Posted by sn...@apache.org.
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/USERGRID-872
Commit: f840623df82131429cfd564e0ad4fdeac356a93d
Parents: 7725d90
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Nov 12 11:59:53 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
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);
}
[24/50] usergrid git commit: Add a note about precedence to the
operators page.
Posted by sn...@apache.org.
Add a note about precedence to the operators page.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/27de65ce
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/27de65ce
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/27de65ce
Branch: refs/heads/USERGRID-872
Commit: 27de65cecd0da42d30d200cd4a04d3f5047ba2b5
Parents: bab89fe
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Nov 13 09:55:04 2015 -0500
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Nov 13 09:55:04 2015 -0500
----------------------------------------------------------------------
docs/data-queries/operators-and-types.md | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/27de65ce/docs/data-queries/operators-and-types.md
----------------------------------------------------------------------
diff --git a/docs/data-queries/operators-and-types.md b/docs/data-queries/operators-and-types.md
index bb42107..8c0bb6a 100644
--- a/docs/data-queries/operators-and-types.md
+++ b/docs/data-queries/operators-and-types.md
@@ -41,6 +41,11 @@ The following operators and data types are supported by the SQL-like query langu
<td>select * where quantity < '4000' and not quantity = '2000'</td>
</tr>
<tr>
+ <td>contains</td>
+ <td>Narrow by contained text</td>
+ <td>select * where title contains 'tale'</td>
+ </tr>
+ <tr>
<td>and</td>
<td>Union of results</td>
<td>select * where quantity > '1000' and quantity < '4000'</td>
@@ -50,14 +55,24 @@ The following operators and data types are supported by the SQL-like query langu
<td>Intersection of results</td>
<td>select * where quantity = '1000' or quantity = '4000'</td>
</tr>
- <tr>
- <td>contains</td>
- <td>Narrow by contained text</td>
- <td>select * where title contains 'tale'</td>
- </tr>
</table>
+### Precedence
+
+The operators at the bottom of the above table are the ones with lower precedence.
+When a query is evaluated the comparison operators (=, > , <, <= and >=) will be evaluated first.
+And next "not", "contains" and "or" will be evaluated and in that order.
+
+Though they are not shown above, parentheses are allowed and may be used to group query expressions.
+
+For example, given our rules of precedence, these two queries are equivalent:
+
+ select * where age > 6 or size = 'large' and color = 'tabby'
+
+ select * where (age > 6 or size = 'large') and color = 'tabby'
+
+
## Data types
As you develop queries, remember that entity properties each conform to a particular data type. For example, in the default entity User, the name property is stored as a string, the created date as a long, and metadata is stored as a JSON object. Your queries must be data type-aware to ensure that query results are as you expect them to be.
[08/50] usergrid git commit: Refactored schedulers to have separate
schedulers for different tasks
Posted by sn...@apache.org.
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/USERGRID-872
Commit: 0e1f0e64176ce13b579762c42d8358eaa7543f20
Parents: 7da99c7
Author: Todd Nine <tn...@apigee.com>
Authored: Wed Nov 11 16:55:00 2015 -0700
Committer: Todd Nine <tn...@apigee.com>
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.guice.CollectionModule;
import org.apache.usergrid.persistence.collection.serialization.impl.migration.EntityIdScope;
+import org.apache.usergrid.persistence.core.executor.TaskExecutorFactory;
import org.apache.usergrid.persistence.core.guice.CommonModule;
import org.apache.usergrid.persistence.core.migration.data.DataMigration;
import org.apache.usergrid.persistence.core.migration.data.MigrationDataProvider;
import org.apache.usergrid.persistence.core.migration.data.MigrationPlugin;
+import org.apache.usergrid.persistence.core.rx.RxTaskScheduler;
+import org.apache.usergrid.persistence.core.rx.RxTaskSchedulerImpl;
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 com.google.inject.AbstractModule;
+import com.google.inject.Inject;
+import com.google.inject.Provides;
import com.google.inject.TypeLiteral;
import com.google.inject.assistedinject.FactoryModuleBuilder;
import com.google.inject.multibindings.Multibinder;
@@ -73,25 +85,22 @@ import com.google.inject.multibindings.Multibinder;
/**
* Guice Module that encapsulates Core Persistence.
*/
-public class CoreModule extends AbstractModule {
-
-
+public class CoreModule extends AbstractModule {
@Override
protected void configure() {
- install( new CommonModule());
+ install( new CommonModule() );
install( new CollectionModule() {
/**
* configure our migration data provider for all entities in the system
*/
@Override
- public void configureMigrationProvider() {
+ public void configureMigrationProvider() {
- bind(new TypeLiteral<MigrationDataProvider<EntityIdScope>>(){}).to(
- AllEntitiesInSystemImpl.class );
- }
+ bind( new TypeLiteral<MigrationDataProvider<EntityIdScope>>() {} ).to( AllEntitiesInSystemImpl.class );
+ }
} );
install( new GraphModule() {
@@ -100,30 +109,28 @@ public class CoreModule extends AbstractModule {
*/
@Override
public void configureMigrationProvider() {
- bind( new TypeLiteral<MigrationDataProvider<GraphNode>>() {} ).to(
- AllNodesInGraphImpl.class );
+ bind( new TypeLiteral<MigrationDataProvider<GraphNode>>() {} ).to( AllNodesInGraphImpl.class );
}
} );
- install(new IndexModule(){
+ install( new IndexModule() {
@Override
public void configureMigrationProvider() {
- bind( new TypeLiteral<MigrationDataProvider<ApplicationScope>>() {} ).to(
- AllApplicationsObservableImpl.class );
+ bind( new TypeLiteral<MigrationDataProvider<ApplicationScope>>() {} )
+ .to( AllApplicationsObservableImpl.class );
}
- });
- // install(new MapModule()); TODO, re-enable when index module doesn't depend on queue
- // install(new QueueModule());
+ } );
+ // install(new MapModule()); TODO, re-enable when index module doesn't depend on queue
+ // install(new QueueModule());
- bind(ManagerCache.class).to( CpManagerCache.class );
- bind(ApplicationIdCacheFactory.class);
+ bind( ManagerCache.class ).to( CpManagerCache.class );
+ bind( ApplicationIdCacheFactory.class );
/**
* Create our migrations for within our core plugin
*/
Multibinder<DataMigration> dataMigrationMultibinder =
- Multibinder.newSetBinder( binder(),
- new TypeLiteral<DataMigration>() {}, CoreMigration.class );
+ Multibinder.newSetBinder( binder(), new TypeLiteral<DataMigration>() {}, CoreMigration.class );
dataMigrationMultibinder.addBinding().to( DeDupConnectionDataMigration.class );
@@ -135,7 +142,7 @@ public class CoreModule extends AbstractModule {
plugins.addBinding().to( MigrationModuleVersionPlugin.class );
bind( AllApplicationsObservable.class ).to( AllApplicationsObservableImpl.class );
- bind( AllEntityIdsObservable.class).to( AllEntityIdsObservableImpl.class );
+ bind( AllEntityIdsObservable.class ).to( AllEntityIdsObservableImpl.class );
/*****
@@ -143,50 +150,103 @@ public class CoreModule extends AbstractModule {
*****/
- bind( IndexService.class ).to(IndexServiceImpl.class);
+ bind( IndexService.class ).to( IndexServiceImpl.class );
//bind the event handlers
- bind( EventBuilder.class).to( EventBuilderImpl.class );
- bind(ApplicationIndexBucketLocator.class);
+ bind( EventBuilder.class ).to( EventBuilderImpl.class );
+ bind( ApplicationIndexBucketLocator.class );
//bind the queue provider
bind( AsyncEventService.class ).toProvider( AsyncIndexProvider.class );
- bind( ReIndexService.class).to(ReIndexServiceImpl.class);
+ bind( ReIndexService.class ).to( ReIndexServiceImpl.class );
- install(new FactoryModuleBuilder()
- .implement(AggregationService.class, AggregationServiceImpl.class)
- .build(AggregationServiceFactory.class));
+ install( new FactoryModuleBuilder().implement( AggregationService.class, AggregationServiceImpl.class )
+ .build( AggregationServiceFactory.class ) );
- bind(IndexLocationStrategyFactory.class).to( IndexLocationStrategyFactoryImpl.class );
+ bind( IndexLocationStrategyFactory.class ).to( IndexLocationStrategyFactoryImpl.class );
- install(new GuicyFigModule(IndexProcessorFig.class));
-
- install(new GuicyFigModule(CoreIndexFig.class));
+ install( new GuicyFigModule( IndexProcessorFig.class ) );
+ install( new GuicyFigModule( CoreIndexFig.class ) );
install( new GuicyFigModule( ApplicationIdCacheFig.class ) );
install( new GuicyFigModule( EntityManagerFig.class ) );
+ install( new GuicyFigModule( AsyncEventsSchedulerFig.class ) );
+
+ install( new GuicyFigModule( ServiceSchedulerFig.class ) );
+
//install our pipeline modules
- install(new PipelineModule());
+ install( new PipelineModule() );
/**
* Install our service operations
*/
- bind( CollectionService.class).to( CollectionServiceImpl.class );
+ bind( CollectionService.class ).to( CollectionServiceImpl.class );
- bind( ConnectionService.class).to( ConnectionServiceImpl.class);
+ bind( ConnectionService.class ).to( ConnectionServiceImpl.class );
bind( ApplicationService.class ).to( ApplicationServiceImpl.class );
bind( StatusService.class ).to( StatusServiceImpl.class );
+ }
+
+
+ @Provides
+ @Inject
+ @EventExecutionScheduler
+ public RxTaskScheduler getSqsTaskScheduler( final AsyncEventsSchedulerFig asyncEventsSchedulerFig ) {
+
+ final String poolName = asyncEventsSchedulerFig.getIoSchedulerName();
+ final int threadCount = asyncEventsSchedulerFig.getMaxIoThreads();
+
+
+ final ThreadPoolExecutor executor = TaskExecutorFactory
+ .createTaskExecutor( poolName, threadCount, threadCount, TaskExecutorFactory.RejectionAction.CALLERRUNS );
+ final RxTaskScheduler taskScheduler = new RxTaskSchedulerImpl( executor );
+ return taskScheduler;
}
+
+ @Provides
+ @Inject
+ @AsyncRepair
+ public RxTaskScheduler getAsyncRepairScheduler( final AsyncEventsSchedulerFig asyncEventsSchedulerFig ) {
+
+ final String poolName = asyncEventsSchedulerFig.getRepairPoolName();
+ final int threadCount = asyncEventsSchedulerFig.getMaxRepairThreads();
+
+
+ final ThreadPoolExecutor executor = TaskExecutorFactory
+ .createTaskExecutor( poolName, threadCount, 1, TaskExecutorFactory.RejectionAction.DROP );
+
+ final RxTaskScheduler taskScheduler = new RxTaskSchedulerImpl( executor );
+
+ return taskScheduler;
+ }
+
+
+ @Provides
+ @Inject
+ @ImportRepair
+ public RxTaskScheduler getImportRepairScheduler( final AsyncEventsSchedulerFig asyncEventsSchedulerFig ) {
+
+ final String poolName = asyncEventsSchedulerFig.getImportSchedulerName();
+ final int threadCount = asyncEventsSchedulerFig.getMaxImportThreads();
+
+
+ final ThreadPoolExecutor executor = TaskExecutorFactory
+ .createTaskExecutor( poolName, threadCount, 1, TaskExecutorFactory.RejectionAction.CALLERRUNS );
+
+ final RxTaskScheduler taskScheduler = new RxTaskSchedulerImpl( executor );
+
+ return taskScheduler;
+ }
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/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..24ec51f 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
@@ -153,6 +153,7 @@ public class AmazonAsyncEventService implements AsyncEventService {
final EventBuilder eventBuilder,
final MapManagerFactory mapManagerFactory,
final QueueFig queueFig,
+ @EventExecutionScheduler
final RxTaskScheduler rxTaskScheduler ) {
this.indexProducer = indexProducer;
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventsSchedulerFig.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventsSchedulerFig.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventsSchedulerFig.java
new file mode 100644
index 0000000..83eb02e
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncEventsSchedulerFig.java
@@ -0,0 +1,94 @@
+/*
+ * 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;
+
+
+import org.safehaus.guicyfig.Default;
+import org.safehaus.guicyfig.FigSingleton;
+import org.safehaus.guicyfig.GuicyFig;
+import org.safehaus.guicyfig.Key;
+
+
+/**
+ *
+ */
+@FigSingleton
+public interface AsyncEventsSchedulerFig extends GuicyFig {
+
+
+ /**
+ * Amount of threads to use in async processing
+ */
+ String IO_SCHEDULER_THREADS = "scheduler.io.threads";
+
+
+ /**
+ * Name of pool to use when performing scheduling
+ */
+ String IO_SCHEDULER_NAME = "scheduler.io.poolName";
+
+
+ /**
+ * Amount of threads to use in async processing
+ */
+ String REPAIR_SCHEDULER_THREADS = "repair.io.threads";
+
+
+ /**
+ * Name of pool to use when performing scheduling
+ */
+ String REPAIR_SCHEDULER_NAME = "repair.io.poolName";
+
+
+ /**
+ * Amount of threads to use in async processing
+ */
+ String IMPORT_SCHEDULER_THREADS = "import.io.threads";
+
+
+ /**
+ * Name of pool to use when performing scheduling
+ */
+ String IMPORT_SCHEDULER_NAME = "import.io.poolName";
+
+
+ @Default( "100" )
+ @Key( IO_SCHEDULER_THREADS )
+ int getMaxIoThreads();
+
+ @Default( "Usergrid-SQS-Pool" )
+ @Key( IO_SCHEDULER_NAME )
+ String getIoSchedulerName();
+
+
+ @Default( "20" )
+ @Key( REPAIR_SCHEDULER_THREADS )
+ int getMaxRepairThreads();
+
+ @Default( "Usergrid-Repair-Pool" )
+ @Key( REPAIR_SCHEDULER_NAME )
+ String getRepairPoolName();
+
+ @Default( "100" )
+ @Key( IMPORT_SCHEDULER_THREADS )
+ int getMaxImportThreads();
+
+ @Default( "Usergrid-Import-Pool" )
+ @Key( IMPORT_SCHEDULER_NAME )
+ String getImportSchedulerName();
+}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncIndexProvider.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncIndexProvider.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncIndexProvider.java
index 2bace8d..d65cffd 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncIndexProvider.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/AsyncIndexProvider.java
@@ -62,7 +62,7 @@ public class AsyncIndexProvider implements Provider<AsyncEventService> {
public AsyncIndexProvider(final IndexProcessorFig indexProcessorFig,
final QueueManagerFactory queueManagerFactory,
final MetricsFactory metricsFactory,
- final RxTaskScheduler rxTaskScheduler,
+ @EventExecutionScheduler final RxTaskScheduler rxTaskScheduler,
final EntityCollectionManagerFactory entityCollectionManagerFactory,
final EventBuilder eventBuilder,
final IndexLocationStrategyFactory indexLocationStrategyFactory,
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventExecutionScheduler.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventExecutionScheduler.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventExecutionScheduler.java
new file mode 100644
index 0000000..ce09aae
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/asyncevents/EventExecutionScheduler.java
@@ -0,0 +1,37 @@
+/*
+ * 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;
+
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import com.google.inject.BindingAnnotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+
+/**
+ * Label for using the event execution scheduler
+ */
+@BindingAnnotation
+@Target({ FIELD, PARAMETER, METHOD }) @Retention(RUNTIME)
+public @interface EventExecutionScheduler {}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/ReadGraphCollectionFilter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/ReadGraphCollectionFilter.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/ReadGraphCollectionFilter.java
index 3d7df3b..3819659 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/ReadGraphCollectionFilter.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/ReadGraphCollectionFilter.java
@@ -22,6 +22,7 @@ package org.apache.usergrid.corepersistence.pipeline.read.traverse;
import org.apache.usergrid.corepersistence.asyncevents.AsyncEventService;
import org.apache.usergrid.corepersistence.asyncevents.EventBuilder;
+import org.apache.usergrid.corepersistence.rx.impl.AsyncRepair;
import org.apache.usergrid.persistence.core.rx.RxTaskScheduler;
import org.apache.usergrid.persistence.graph.GraphManagerFactory;
@@ -44,7 +45,7 @@ public class ReadGraphCollectionFilter extends AbstractReadGraphFilter {
*/
@Inject
public ReadGraphCollectionFilter( final GraphManagerFactory graphManagerFactory,
- final RxTaskScheduler rxTaskScheduler,
+ @AsyncRepair final RxTaskScheduler rxTaskScheduler,
final EventBuilder eventBuilder,
final AsyncEventService asyncEventService,
@Assisted final String collectionName ) {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/ReadGraphConnectionFilter.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/ReadGraphConnectionFilter.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/ReadGraphConnectionFilter.java
index b2d368b..3c92c03 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/ReadGraphConnectionFilter.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/read/traverse/ReadGraphConnectionFilter.java
@@ -22,6 +22,7 @@ package org.apache.usergrid.corepersistence.pipeline.read.traverse;
import org.apache.usergrid.corepersistence.asyncevents.AsyncEventService;
import org.apache.usergrid.corepersistence.asyncevents.EventBuilder;
+import org.apache.usergrid.corepersistence.rx.impl.AsyncRepair;
import org.apache.usergrid.persistence.core.rx.RxTaskScheduler;
import org.apache.usergrid.persistence.graph.GraphManagerFactory;
@@ -44,7 +45,7 @@ public class ReadGraphConnectionFilter extends AbstractReadGraphFilter {
*/
@Inject
public ReadGraphConnectionFilter( final GraphManagerFactory graphManagerFactory,
- final RxTaskScheduler rxTaskScheduler,
+ @AsyncRepair final RxTaskScheduler rxTaskScheduler,
final EventBuilder eventBuilder,
final AsyncEventService asyncEventService,
@Assisted final String connectionName ) {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AsyncRepair.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AsyncRepair.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AsyncRepair.java
new file mode 100644
index 0000000..aa2cc12
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AsyncRepair.java
@@ -0,0 +1,38 @@
+/*
+ * 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.rx.impl;
+
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import com.google.inject.BindingAnnotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+
+/**
+ * Label for using the async repair scheduler
+ */
+@BindingAnnotation
+@Target({ FIELD, PARAMETER, METHOD }) @Retention(RUNTIME)
+public @interface AsyncRepair {
+}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/ImportRepair.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/ImportRepair.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/ImportRepair.java
new file mode 100644
index 0000000..d65d04c
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/ImportRepair.java
@@ -0,0 +1,38 @@
+/*
+ * 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.rx.impl;
+
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import com.google.inject.BindingAnnotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+
+/**
+ * Label for using the async repair scheduler
+ */
+@BindingAnnotation
+@Target({ FIELD, PARAMETER, METHOD }) @Retention(RUNTIME)
+public @interface ImportRepair {
+}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/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
new file mode 100644
index 0000000..ddaa01c
--- /dev/null
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/service/ServiceSchedulerFig.java
@@ -0,0 +1,48 @@
+/*
+ * 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.service;
+
+
+import org.safehaus.guicyfig.Default;
+import org.safehaus.guicyfig.FigSingleton;
+import org.safehaus.guicyfig.GuicyFig;
+import org.safehaus.guicyfig.Key;
+
+
+/**
+ *
+ */
+@FigSingleton
+public interface ServiceSchedulerFig extends GuicyFig {
+
+
+ /**
+ * The number of threads to use when importing entities into result sets
+ */
+ String SERVICE_IMPORT_THREADS = "service.import.threads";
+
+
+
+ @Default("20")
+ @Key( SERVICE_IMPORT_THREADS)
+ int getImportThreads();
+
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
index 78c7f37..0a6e270 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionModule.java
@@ -18,6 +18,8 @@
package org.apache.usergrid.persistence.collection.guice;
+import java.util.concurrent.ThreadPoolExecutor;
+
import org.safehaus.guicyfig.GuicyFigModule;
import org.apache.usergrid.persistence.collection.EntityCollectionManagerFactory;
@@ -25,11 +27,18 @@ import org.apache.usergrid.persistence.collection.cache.EntityCacheFig;
import org.apache.usergrid.persistence.collection.impl.EntityCollectionManagerFactoryImpl;
import org.apache.usergrid.persistence.collection.mvcc.changelog.ChangeLogGenerator;
import org.apache.usergrid.persistence.collection.mvcc.changelog.ChangeLogGeneratorImpl;
+import org.apache.usergrid.persistence.collection.scheduler.CollectionExecutorScheduler;
+import org.apache.usergrid.persistence.collection.scheduler.CollectionSchedulerFig;
import org.apache.usergrid.persistence.collection.serialization.SerializationFig;
import org.apache.usergrid.persistence.collection.serialization.impl.SerializationModule;
import org.apache.usergrid.persistence.collection.service.impl.ServiceModule;
+import org.apache.usergrid.persistence.core.executor.TaskExecutorFactory;
+import org.apache.usergrid.persistence.core.rx.RxTaskScheduler;
+import org.apache.usergrid.persistence.core.rx.RxTaskSchedulerImpl;
import com.google.inject.AbstractModule;
+import com.google.inject.Inject;
+import com.google.inject.Provides;
/**
@@ -45,6 +54,7 @@ public abstract class CollectionModule extends AbstractModule {
// noinspection unchecked
install( new GuicyFigModule( SerializationFig.class ) );
+ install( new GuicyFigModule( CollectionSchedulerFig.class ) );
install( new SerializationModule() );
install( new ServiceModule() );
@@ -62,6 +72,26 @@ public abstract class CollectionModule extends AbstractModule {
}
+
+
+ @Provides
+ @Inject
+ @CollectionExecutorScheduler
+ public RxTaskScheduler getRxTaskScheduler( final CollectionSchedulerFig collectionSchedulerFig ){
+
+ final String poolName = collectionSchedulerFig.getIoSchedulerName();
+ final int threadCount = collectionSchedulerFig.getMaxIoThreads();
+
+
+ final ThreadPoolExecutor executor = TaskExecutorFactory.createTaskExecutor( poolName, threadCount, threadCount,
+ TaskExecutorFactory.RejectionAction.CALLERRUNS );
+
+ final RxTaskScheduler taskScheduler = new RxTaskSchedulerImpl(executor );
+
+ return taskScheduler;
+ }
+
+
/**
* Gives callers the ability to to configure an instance of
*
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionTaskExecutor.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionTaskExecutor.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionTaskExecutor.java
deleted file mode 100644
index 53c1f48..0000000
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/guice/CollectionTaskExecutor.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.apache.usergrid.persistence.collection.guice;/*
- * 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.
- */
-
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-import com.google.inject.BindingAnnotation;
-
-import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-
-
-@BindingAnnotation
-@Target({ FIELD, PARAMETER, METHOD }) @Retention(RUNTIME)
-public @interface CollectionTaskExecutor {}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerFactoryImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerFactoryImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerFactoryImpl.java
index 45cee06..a52ee9c 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerFactoryImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/impl/EntityCollectionManagerFactoryImpl.java
@@ -35,6 +35,7 @@ import org.apache.usergrid.persistence.collection.mvcc.stage.write.WriteCommit;
import org.apache.usergrid.persistence.collection.mvcc.stage.write.WriteOptimisticVerify;
import org.apache.usergrid.persistence.collection.mvcc.stage.write.WriteStart;
import org.apache.usergrid.persistence.collection.mvcc.stage.write.WriteUniqueVerify;
+import org.apache.usergrid.persistence.collection.scheduler.CollectionExecutorScheduler;
import org.apache.usergrid.persistence.collection.serialization.MvccEntitySerializationStrategy;
import org.apache.usergrid.persistence.collection.serialization.MvccLogEntrySerializationStrategy;
import org.apache.usergrid.persistence.collection.serialization.SerializationFig;
@@ -74,7 +75,6 @@ public class EntityCollectionManagerFactoryImpl implements EntityCollectionManag
private final UniqueValueSerializationStrategy uniqueValueSerializationStrategy;
private final MvccLogEntrySerializationStrategy mvccLogEntrySerializationStrategy;
private final Keyspace keyspace;
- private final EntityCacheFig entityCacheFig;
private final MetricsFactory metricsFactory;
private final RxTaskScheduler rxTaskScheduler;
@@ -107,7 +107,7 @@ public class EntityCollectionManagerFactoryImpl implements EntityCollectionManag
final UniqueValueSerializationStrategy uniqueValueSerializationStrategy,
final MvccLogEntrySerializationStrategy mvccLogEntrySerializationStrategy,
final Keyspace keyspace, final EntityCacheFig entityCacheFig,
- MetricsFactory metricsFactory, final RxTaskScheduler rxTaskScheduler ) {
+ final MetricsFactory metricsFactory, @CollectionExecutorScheduler final RxTaskScheduler rxTaskScheduler ) {
this.writeStart = writeStart;
this.writeVerifyUnique = writeVerifyUnique;
@@ -123,7 +123,6 @@ public class EntityCollectionManagerFactoryImpl implements EntityCollectionManag
this.uniqueValueSerializationStrategy = uniqueValueSerializationStrategy;
this.mvccLogEntrySerializationStrategy = mvccLogEntrySerializationStrategy;
this.keyspace = keyspace;
- this.entityCacheFig = entityCacheFig;
this.metricsFactory = metricsFactory;
this.rxTaskScheduler = rxTaskScheduler;
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/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 cb1515c..d6bbdc5 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
@@ -63,6 +63,7 @@ import org.apache.usergrid.persistence.core.util.ValidationUtils;
import org.apache.usergrid.persistence.model.entity.Entity;
import org.apache.usergrid.persistence.model.entity.Id;
import org.apache.usergrid.persistence.model.field.Field;
+import org.apache.usergrid.persistence.model.util.EntityUtils;
import org.apache.usergrid.persistence.model.util.UUIDGenerator;
import com.codahale.metrics.Timer;
@@ -117,7 +118,6 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
private final Timer deleteTimer;
private final Timer fieldIdTimer;
private final Timer fieldEntityTimer;
- private final Timer updateTimer;
private final Timer loadTimer;
private final Timer getLatestTimer;
@@ -165,7 +165,6 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
this.deleteTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class, "base.delete");
this.fieldIdTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class, "base.fieldId");
this.fieldEntityTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class, "base.fieldEntity");
- this.updateTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class, "base.update");
this.loadTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class, "base.load");
this.getLatestTimer = metricsFactory.getTimer(EntityCollectionManagerImpl.class, "base.latest");
}
@@ -188,8 +187,14 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
Observable<CollectionIoEvent<MvccEntity>> observable = stageRunner( writeData, writeStart );
- final Observable<Entity> write = observable.map( writeCommit ).compose( uniqueCleanup )
- //now extract the ioEvent we need to return
+ final Observable<Entity> write = observable.map( writeCommit )
+ .map(ioEvent -> {
+ //fire this in the background so we don't block writes
+ Observable.just( ioEvent ).compose( uniqueCleanup ).subscribeOn( rxTaskScheduler.getAsyncIOScheduler() ).subscribe();
+ return ioEvent;
+ }
+ )
+ //now extract the ioEvent we need to return and update the version
.map( ioEvent -> ioEvent.getEvent().getEntity().get() );
return ObservableTimer.time( write, writeTimer );
@@ -358,7 +363,6 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
continue;
}
-
//else add it to our result set
response.addEntity( expectedUnique.getField(), entity );
}
@@ -380,6 +384,8 @@ public class EntityCollectionManagerImpl implements EntityCollectionManager {
}
+
+
// fire the stages
public Observable<CollectionIoEvent<MvccEntity>> stageRunner( CollectionIoEvent<Entity> writeData,
WriteStart writeState ) {
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/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 9b1a393..fe3f9a9 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
@@ -94,7 +94,9 @@ public class WriteCommit implements Func1<CollectionIoEvent<MvccEntity>, Collect
final ApplicationScope applicationScope = ioEvent.getEntityCollection();
//set the version into the entity
- EntityUtils.setVersion( mvccEntity.getEntity().get(), version );
+ final Entity entity = mvccEntity.getEntity().get();
+
+ EntityUtils.setVersion( entity, version );
MvccValidationUtils.verifyMvccEntityWithEntity( ioEvent.getEvent() );
ValidationUtils.verifyTimeUuid( version ,"version" );
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/scheduler/CollectionExecutorScheduler.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/scheduler/CollectionExecutorScheduler.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/scheduler/CollectionExecutorScheduler.java
new file mode 100644
index 0000000..8f8aa00
--- /dev/null
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/scheduler/CollectionExecutorScheduler.java
@@ -0,0 +1,52 @@
+/*
+ * 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.collection.scheduler;/*
+ * 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.
+ */
+
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import com.google.inject.BindingAnnotation;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+
+
+@BindingAnnotation
+@Target({ FIELD, PARAMETER, METHOD }) @Retention(RUNTIME)
+public @interface CollectionExecutorScheduler {}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/scheduler/CollectionSchedulerFig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/scheduler/CollectionSchedulerFig.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/scheduler/CollectionSchedulerFig.java
new file mode 100644
index 0000000..daefa9b
--- /dev/null
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/scheduler/CollectionSchedulerFig.java
@@ -0,0 +1,53 @@
+/*
+ * 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.collection.scheduler;
+
+
+import org.safehaus.guicyfig.Default;
+import org.safehaus.guicyfig.FigSingleton;
+import org.safehaus.guicyfig.GuicyFig;
+import org.safehaus.guicyfig.Key;
+
+
+/**
+ *
+ */
+@FigSingleton
+public interface CollectionSchedulerFig extends GuicyFig {
+
+
+ /**
+ * Amount of threads to use in async processing
+ */
+ String COLLECTION_SCHEDULER_THREADS = "scheduler.collection.threads";
+
+
+ /**
+ * Name of pool to use when performing scheduling
+ */
+ String COLLECTION_SCHEDULER_NAME = "scheduler.collection.poolName";
+
+
+ @Default( "20" )
+ @Key( COLLECTION_SCHEDULER_THREADS )
+ int getMaxIoThreads();
+
+ @Default( "Usergrid-Collection-Pool" )
+ @Key( COLLECTION_SCHEDULER_NAME )
+ String getIoSchedulerName();
+}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
index e6c6909..115be99 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerIT.java
@@ -20,6 +20,7 @@ package org.apache.usergrid.persistence.collection;
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.List;
import java.util.UUID;
@@ -58,6 +59,7 @@ import rx.Observable;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
@@ -315,18 +317,17 @@ public class EntityCollectionManagerIT {
@Test
- public void writeAndGetField2X() {
-
-
+ public void writeAndGetField2X() throws InterruptedException {
ApplicationScope collectionScope1 = new ApplicationScopeImpl( new SimpleId( "organization" ) );
- Entity newEntity = new Entity( new SimpleId( "test" ) );
- Field field = new StringField( "testField", "unique", true );
- newEntity.setField( field );
+ final Id entityId = new SimpleId( "test" );
+ Entity firstInstance = new Entity( entityId );
+ Field firstField = new StringField( "testField", "unique", true );
+ firstInstance.setField( firstField );
EntityCollectionManager manager = factory.createCollectionManager( collectionScope1 );
- Observable<Entity> observable = manager.write( newEntity );
+ Observable<Entity> observable = manager.write( firstInstance );
Entity createReturned = observable.toBlocking().lastOrDefault( null );
@@ -334,21 +335,22 @@ public class EntityCollectionManagerIT {
assertNotNull( "Id was assigned", createReturned.getId() );
assertNotNull( "Version was assigned", createReturned.getVersion() );
- Id id = manager.getIdField( newEntity.getId().getType(), field ).toBlocking().lastOrDefault( null );
- assertNotNull( id );
- assertEquals( newEntity.getId(), id );
+ final Id existingId = manager.getIdField( firstInstance.getId().getType(), firstField ).toBlocking().lastOrDefault( null );
+ assertNotNull( existingId );
+ assertEquals( firstInstance.getId(), existingId );
Field fieldNull = new StringField( "testFieldNotThere", "uniquely", true );
- id = manager.getIdField( newEntity.getId().getType(), fieldNull ).toBlocking().lastOrDefault( null );
- assertNull( id );
+ final Id noId = manager.getIdField( firstInstance.getId().getType(), fieldNull ).toBlocking().lastOrDefault( null );
+ assertNull( noId );
//ensure we clean up
- Field fieldSecond = new StringField( "testField", "unique2", true );
- newEntity.setField( fieldSecond );
+ Entity secondInstance = new Entity( entityId );
+ Field secondField = new StringField( firstField.getName(), "unique2", true );
+ secondInstance.setField( secondField );
- Observable<Entity> observableSecond = manager.write( newEntity );
+ Observable<Entity> observableSecond = manager.write( secondInstance );
Entity createReturnedSecond = observableSecond.toBlocking().lastOrDefault( null );
@@ -356,16 +358,27 @@ public class EntityCollectionManagerIT {
assertNotNull( "Id was assigned", createReturnedSecond.getId() );
assertNotNull( "Version was assigned", createReturnedSecond.getVersion() );
- Id idFirst = manager.getIdField( newEntity.getId().getType(), field ).toBlocking().lastOrDefault( null );
+ assertNotEquals( "Versions should not be equal", createReturned.getVersion(), createReturnedSecond.getVersion() );
- assertNull(idFirst);
+ //sanity check, get the entity to ensure it's the right version
- Id idSecond = manager.getIdField( newEntity.getId().getType(), fieldSecond ).toBlocking().lastOrDefault( null );
+ final Entity loadedVersion = manager.load( entityId ).toBlocking().last();
- assertNotNull( idSecond );
- assertEquals( newEntity.getId(), idSecond );
+ assertEquals(entityId, loadedVersion.getId());
+ assertEquals(createReturnedSecond.getVersion(), loadedVersion.getVersion());
+ //give clean time to run. need to finish the todo below
+ Thread.sleep( 2000 );
+ //TODO, we need to implement verify and repair on this
+ final Id idFirst = manager.getIdField( firstInstance.getId().getType(), firstField ).toBlocking().lastOrDefault( null );
+ assertNull(idFirst);
+
+
+ final Id idSecond = manager.getIdField( secondInstance.getId().getType(), secondField ).toBlocking().lastOrDefault( null );
+
+ assertNotNull( idSecond );
+ assertEquals( secondInstance.getId(), idSecond );
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/executor/TaskExecutorFactory.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/executor/TaskExecutorFactory.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/executor/TaskExecutorFactory.java
index 3c6a750..bd3d3e9 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/executor/TaskExecutorFactory.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/executor/TaskExecutorFactory.java
@@ -20,30 +20,45 @@
package org.apache.usergrid.persistence.core.executor;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.RejectedExecutionHandler;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.AtomicLong;
-
/**
* A task executor that allows you to submit tasks
*/
public class TaskExecutorFactory {
- private static final Logger log = LoggerFactory.getLogger(TaskExecutorFactory.class);
+ private static final Logger log = LoggerFactory.getLogger( TaskExecutorFactory.class );
+
public enum RejectionAction {
+ /**
+ * If there is no capacity left, throw an exception
+ */
ABORT,
- CALLERRUNS
+ /**
+ * If there is no capacity left, the caller runs the callable
+ */
+ CALLERRUNS,
+
+ /**
+ * If there is no capacity left, the request is logged and then silently dropped
+ */
+ DROP
}
+
+
/**
* Create a task executor
- * @param schedulerName
- * @param maxThreadCount
- * @param maxQueueSize
- * @return
*/
public static ThreadPoolExecutor createTaskExecutor( final String schedulerName, final int maxThreadCount,
final int maxQueueSize, RejectionAction rejectionAction ) {
@@ -52,22 +67,22 @@ public class TaskExecutorFactory {
final BlockingQueue<Runnable> queue = new ArrayBlockingQueue<Runnable>( maxQueueSize );
- if(rejectionAction.equals(RejectionAction.ABORT)){
-
+ if ( rejectionAction == RejectionAction.ABORT ) {
return new MaxSizeThreadPool( queue, schedulerName, maxThreadCount );
-
}
- else if(rejectionAction.equals(RejectionAction.CALLERRUNS)){
+ else if ( rejectionAction == RejectionAction.CALLERRUNS ) {
return new MaxSizeThreadPoolCallerRuns( queue, schedulerName, maxThreadCount );
-
- }else{
- //default to the thread pool with ABORT policy
- return new MaxSizeThreadPool( queue, schedulerName, maxThreadCount );
}
-
+ else if ( rejectionAction == RejectionAction.DROP ) {
+ return new MaxSizeThreadPoolDrops( queue, schedulerName, maxThreadCount );
+ }
+ else {
+ throw new IllegalArgumentException( "Unable to create a scheduler with the arguments provided" );
+ }
}
+
/**
* Create a thread pool that will reject work if our audit tasks become overwhelmed
*/
@@ -78,14 +93,29 @@ public class TaskExecutorFactory {
}
}
+
/**
* Create a thread pool that will implement CallerRunsPolicy if our tasks become overwhelmed
*/
private static final class MaxSizeThreadPoolCallerRuns extends ThreadPoolExecutor {
- public MaxSizeThreadPoolCallerRuns( final BlockingQueue<Runnable> queue, final String poolName, final int maxPoolSize ) {
- super( maxPoolSize, maxPoolSize, 30, TimeUnit.SECONDS, queue,
- new CountingThreadFactory( poolName ), new RejectedHandler(poolName) );
+ public MaxSizeThreadPoolCallerRuns( final BlockingQueue<Runnable> queue, final String poolName,
+ final int maxPoolSize ) {
+ super( maxPoolSize, maxPoolSize, 30, TimeUnit.SECONDS, queue, new CountingThreadFactory( poolName ),
+ new CallerRunsHandler( poolName ) );
+ }
+ }
+
+
+ /**
+ * Create a thread pool that will implement CallerRunsPolicy if our tasks become overwhelmed
+ */
+ private static final class MaxSizeThreadPoolDrops extends ThreadPoolExecutor {
+
+ public MaxSizeThreadPoolDrops( final BlockingQueue<Runnable> queue, final String poolName,
+ final int maxPoolSize ) {
+ super( maxPoolSize, maxPoolSize, 30, TimeUnit.SECONDS, queue, new CountingThreadFactory( poolName ),
+ new DropHandler( poolName ) );
}
}
@@ -111,29 +141,50 @@ public class TaskExecutorFactory {
Thread t = new Thread( r, threadName );
//set it to be a daemon thread so it doesn't block shutdown
- t.setDaemon(true);
+ t.setDaemon( true );
return t;
}
}
+
/**
* The handler that will handle rejected executions and signal the interface
*/
- private static final class RejectedHandler implements RejectedExecutionHandler {
+ private static final class CallerRunsHandler implements RejectedExecutionHandler {
private final String poolName;
- private RejectedHandler (final String poolName) {this.poolName = poolName;}
+
+ private CallerRunsHandler( final String poolName ) {this.poolName = poolName;}
+
@Override
public void rejectedExecution( final Runnable r, final ThreadPoolExecutor executor ) {
- log.warn( "{} task queue full, rejecting task {} and running in thread {}", poolName, r, Thread.currentThread().getName() );
+ log.warn( "{} task queue full, rejecting task {} and running in thread {}", poolName, r,
+ Thread.currentThread().getName() );
//We've decided we want to have a "caller runs" policy, to just invoke the task when rejected
r.run();
}
+ }
+
+
+ /**
+ * The handler that will handle rejected executions and signal the interface
+ */
+ private static final class DropHandler implements RejectedExecutionHandler {
+
+ private final String poolName;
+
+ private DropHandler( final String poolName ) {this.poolName = poolName;}
+
+
+ @Override
+ public void rejectedExecution( final Runnable r, final ThreadPoolExecutor executor ) {
+ log.warn( "{} task queue full, dropping task {}", poolName, r );
+ }
}
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
index b93ba76..75e2b29 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/guice/CommonModule.java
@@ -19,11 +19,6 @@
package org.apache.usergrid.persistence.core.guice;
-import org.apache.usergrid.persistence.core.guicyfig.ClusterFig;
-import org.apache.usergrid.persistence.core.metrics.MetricsFactory;
-import org.apache.usergrid.persistence.core.metrics.MetricsFactoryImpl;
-import org.apache.usergrid.persistence.core.metrics.MetricsFig;
-import org.apache.usergrid.persistence.core.migration.data.*;
import org.safehaus.guicyfig.GuicyFigModule;
import org.apache.usergrid.persistence.core.astyanax.AstyanaxKeyspaceProvider;
@@ -32,14 +27,21 @@ import org.apache.usergrid.persistence.core.astyanax.CassandraConfigImpl;
import org.apache.usergrid.persistence.core.astyanax.CassandraFig;
import org.apache.usergrid.persistence.core.consistency.TimeService;
import org.apache.usergrid.persistence.core.consistency.TimeServiceImpl;
+import org.apache.usergrid.persistence.core.guicyfig.ClusterFig;
+import org.apache.usergrid.persistence.core.metrics.MetricsFactory;
+import org.apache.usergrid.persistence.core.metrics.MetricsFactoryImpl;
+import org.apache.usergrid.persistence.core.metrics.MetricsFig;
+import org.apache.usergrid.persistence.core.migration.data.DataMigrationManager;
+import org.apache.usergrid.persistence.core.migration.data.DataMigrationManagerImpl;
+import org.apache.usergrid.persistence.core.migration.data.MigrationInfoCache;
+import org.apache.usergrid.persistence.core.migration.data.MigrationInfoCacheImpl;
+import org.apache.usergrid.persistence.core.migration.data.MigrationInfoSerialization;
+import org.apache.usergrid.persistence.core.migration.data.MigrationInfoSerializationImpl;
import org.apache.usergrid.persistence.core.migration.data.MigrationPlugin;
import org.apache.usergrid.persistence.core.migration.schema.Migration;
import org.apache.usergrid.persistence.core.migration.schema.MigrationManager;
import org.apache.usergrid.persistence.core.migration.schema.MigrationManagerFig;
import org.apache.usergrid.persistence.core.migration.schema.MigrationManagerImpl;
-import org.apache.usergrid.persistence.core.rx.RxSchedulerFig;
-import org.apache.usergrid.persistence.core.rx.RxTaskScheduler;
-import org.apache.usergrid.persistence.core.rx.RxTaskSchedulerImpl;
import com.google.inject.AbstractModule;
import com.google.inject.Key;
@@ -91,16 +93,11 @@ public class CommonModule extends AbstractModule {
Multibinder.newSetBinder(binder(), MigrationPlugin.class);
- /**
- * RX java scheduler configuration
- */
-
- install(new GuicyFigModule(RxSchedulerFig.class));
install(new GuicyFigModule(ClusterFig.class));
bind(SettingsValidationCluster.class).asEagerSingleton(); //validate props from ClusterFig on startup
- bind(RxTaskScheduler.class).to(RxTaskSchedulerImpl.class);
+
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/RxSchedulerFig.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/RxSchedulerFig.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/RxSchedulerFig.java
deleted file mode 100644
index 4511518..0000000
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/RxSchedulerFig.java
+++ /dev/null
@@ -1,71 +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.persistence.core.rx;
-
-
-import org.safehaus.guicyfig.Default;
-import org.safehaus.guicyfig.FigSingleton;
-import org.safehaus.guicyfig.GuicyFig;
-import org.safehaus.guicyfig.Key;
-
-
-/**
- *
- */
-@FigSingleton
-public interface RxSchedulerFig extends GuicyFig {
-
-
- /**
- * Amount of time in milliseconds to wait when ES rejects our request before retrying. Provides simple
- * backpressure
- */
- String IO_SCHEDULER_THREADS = "scheduler.io.threads";
-
-
- /**
- * Amount of time in milliseconds to wait when ES rejects our request before retrying. Provides simple
- * backpressure
- */
- String IO_SCHEDULER_NAME = "scheduler.io.poolName";
-
- /**
- * The number of threads to use when importing entities into result sets
- */
- String IO_IMPORT_THREADS = "scheduler.import.threads";
-
-
-
-
- @Default( "100" )
- @Key( IO_SCHEDULER_THREADS )
- int getMaxIoThreads();
-
- @Default( "Usergrid-RxIOPool" )
- @Key(IO_SCHEDULER_NAME)
- String getIoSchedulerName();
-
- @Default("20")
- @Key( IO_IMPORT_THREADS)
- int getImportThreads();
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/RxTaskSchedulerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/RxTaskSchedulerImpl.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/RxTaskSchedulerImpl.java
index dce46cb..261cbeb 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/RxTaskSchedulerImpl.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/rx/RxTaskSchedulerImpl.java
@@ -20,18 +20,9 @@
package org.apache.usergrid.persistence.core.rx;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.RejectedExecutionHandler;
-import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.google.common.base.Preconditions;
import com.google.inject.Inject;
import com.google.inject.Singleton;
@@ -42,29 +33,17 @@ import rx.schedulers.Schedulers;
/**
* An implementation of the task scheduler that allows us to control the number of I/O threads
*/
-@Singleton
public class RxTaskSchedulerImpl implements RxTaskScheduler {
- private static final Logger log = LoggerFactory.getLogger( RxTaskSchedulerImpl.class );
-
private final Scheduler scheduler;
- private final String poolName;
@Inject
- public RxTaskSchedulerImpl(final RxSchedulerFig schedulerFig){
-
- this.poolName = schedulerFig.getIoSchedulerName();
-
- final int poolSize = schedulerFig.getMaxIoThreads();
-
-
- final BlockingQueue<Runnable> queue = new ArrayBlockingQueue<Runnable>(poolSize);
-
+ public RxTaskSchedulerImpl(final ThreadPoolExecutor executor){
- final MaxSizeThreadPool threadPool = new MaxSizeThreadPool( queue, poolSize );
+ Preconditions.checkNotNull( executor , "executor must not be null");
- this.scheduler = Schedulers.from(threadPool);
+ this.scheduler = Schedulers.from(executor);
}
@@ -76,56 +55,4 @@ public class RxTaskSchedulerImpl implements RxTaskScheduler {
}
- /**
- * Create a thread pool that will reject work if our audit tasks become overwhelmed
- */
- private final class MaxSizeThreadPool extends ThreadPoolExecutor {
-
- public MaxSizeThreadPool( final BlockingQueue<Runnable> queue, final int maxPoolSize ) {
-
- super( maxPoolSize, maxPoolSize, 30, TimeUnit.SECONDS, queue, new CountingThreadFactory( ), new RejectedHandler() );
- }
- }
-
-
- /**
- * Thread factory that will name and count threads for easier debugging
- */
- private final class CountingThreadFactory implements ThreadFactory {
-
- private final AtomicLong threadCounter = new AtomicLong();
-
-
- @Override
- public Thread newThread( final Runnable r ) {
- final long newValue = threadCounter.incrementAndGet();
-
- final String threadName = poolName + "-" + newValue;
-
- Thread t = new Thread( r, threadName );
-
- //set it to be a daemon thread so it doesn't block shutdown
- t.setDaemon( true );
-
- return t;
- }
- }
-
-
- /**
- * The handler that will handle rejected executions and signal the interface
- */
- private final class RejectedHandler implements RejectedExecutionHandler {
-
-
- @Override
- public void rejectedExecution( final Runnable r, final ThreadPoolExecutor executor ) {
- log.warn( "{} task queue full, rejecting task {} and running in thread {}", poolName, r, Thread.currentThread().getName() );
-
- //We've decided we want to have a "caller runs" policy, to just invoke the task when rejected
-
- r.run();
- }
-
- }
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/0e1f0e64/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 d032589..662370f 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
@@ -27,6 +27,10 @@ import java.util.Set;
import java.util.UUID;
import com.codahale.metrics.Timer;
+
+import org.apache.usergrid.corepersistence.rx.impl.AsyncRepair;
+import org.apache.usergrid.corepersistence.rx.impl.ImportRepair;
+import org.apache.usergrid.corepersistence.service.ServiceSchedulerFig;
import org.apache.usergrid.persistence.core.metrics.MetricsFactory;
import org.apache.usergrid.persistence.core.metrics.ObservableTimer;
import org.slf4j.Logger;
@@ -42,7 +46,6 @@ import org.apache.usergrid.persistence.EntityRef;
import org.apache.usergrid.persistence.Query;
import org.apache.usergrid.persistence.Results;
import org.apache.usergrid.persistence.Schema;
-import org.apache.usergrid.persistence.core.rx.RxSchedulerFig;
import org.apache.usergrid.persistence.core.rx.RxTaskScheduler;
import org.apache.usergrid.security.shiro.utils.SubjectUtils;
import org.apache.usergrid.services.ServiceParameter.IdParameter;
@@ -54,6 +57,7 @@ import org.apache.usergrid.services.exceptions.ServiceResourceNotFoundException;
import org.apache.usergrid.services.exceptions.UnsupportedServiceOperationException;
import com.google.inject.Injector;
+import com.google.inject.Key;
import rx.Observable;
import rx.Scheduler;
@@ -100,7 +104,7 @@ public abstract class AbstractService implements Service {
protected Map<String, Object> defaultEntityMetadata;
private Scheduler rxScheduler;
- private RxSchedulerFig rxSchedulerFig;
+ private ServiceSchedulerFig rxSchedulerFig;
private MetricsFactory metricsFactory;
private Timer entityGetTimer;
private Timer entitiesGetTimer;
@@ -117,8 +121,8 @@ public abstract class AbstractService implements Service {
this.sm = sm;
em = sm.getEntityManager();
final Injector injector = sm.getApplicationContext().getBean( Injector.class );
- rxScheduler = injector.getInstance( RxTaskScheduler.class ).getAsyncIOScheduler();
- rxSchedulerFig = injector.getInstance(RxSchedulerFig.class);
+ rxScheduler = injector.getInstance( Key.get(RxTaskScheduler.class, ImportRepair.class)).getAsyncIOScheduler();
+ rxSchedulerFig = injector.getInstance(ServiceSchedulerFig.class );
metricsFactory = injector.getInstance(MetricsFactory.class);
this.entityGetTimer = metricsFactory.getTimer(this.getClass(), "importEntity.get");
this.entitiesGetTimer = metricsFactory.getTimer(this.getClass(), "importEntities.get");