You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2015/05/28 01:36:04 UTC
[1/2] incubator-usergrid git commit: removing spaces
Repository: incubator-usergrid
Updated Branches:
refs/heads/two-dot-o-dev 73e22925d -> 1b3f7d58b
removing spaces
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/2d0ba17c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/2d0ba17c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/2d0ba17c
Branch: refs/heads/two-dot-o-dev
Commit: 2d0ba17c1f44a1f48a7239583aaf7d0f760368a5
Parents: 5a88903
Author: Shawn Feldman <sf...@apache.org>
Authored: Wed May 27 17:35:22 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Wed May 27 17:35:22 2015 -0600
----------------------------------------------------------------------
.../corepersistence/CpEntityManagerFactory.java | 11 +-----
.../cassandra/EntityManagerFactoryImplIT.java | 40 ++++++++++----------
2 files changed, 22 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2d0ba17c/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
index a2306db..faee8a6 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
@@ -27,6 +27,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.usergrid.corepersistence.index.ReIndexRequestBuilder;
+import org.apache.usergrid.persistence.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeansException;
@@ -40,15 +41,6 @@ import org.apache.usergrid.corepersistence.index.ReIndexService;
import org.apache.usergrid.corepersistence.pipeline.builder.PipelineBuilderFactory;
import org.apache.usergrid.corepersistence.util.CpNamingUtils;
import org.apache.usergrid.exception.ConflictException;
-import org.apache.usergrid.persistence.AbstractEntity;
-import org.apache.usergrid.persistence.Entity;
-import org.apache.usergrid.persistence.EntityFactory;
-import org.apache.usergrid.persistence.EntityManager;
-import org.apache.usergrid.persistence.EntityManagerFactory;
-import org.apache.usergrid.persistence.EntityRef;
-import org.apache.usergrid.persistence.Query;
-import org.apache.usergrid.persistence.Results;
-import org.apache.usergrid.persistence.SimpleEntityRef;
import org.apache.usergrid.persistence.cassandra.CassandraService;
import org.apache.usergrid.persistence.cassandra.CounterUtils;
import org.apache.usergrid.persistence.cassandra.Setup;
@@ -368,6 +360,7 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
final Entity newAppEntity = managementEm.create(new SimpleId(applicationUUID,
collectionToName), oldAppEntity.getProperties());
+
// copy its connections too
final Set<String> connectionTypes = managementEm.getConnectionTypes(oldAppEntity);
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2d0ba17c/stack/core/src/test/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImplIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImplIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImplIT.java
index c42e250..5b09eac 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImplIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImplIT.java
@@ -144,30 +144,31 @@ public class EntityManagerFactoryImplIT extends AbstractCoreIT {
this.app.refreshIndex();
- // delete the application
-
- setup.getEmf().deleteApplication(deletedAppId);
- this.app.refreshIndex();
- this.app.refreshIndex();
// wait for it to appear in delete apps list
- Func2<UUID, Map<String, UUID> ,Boolean> findApps = new Func2<UUID,Map<String, UUID> ,Boolean>() {
- @Override
- public Boolean call(UUID applicationId, Map<String, UUID> apps) {
- boolean found = false;
- for (String appName : apps.keySet()) {
- UUID appId = apps.get(appName);
- if (appId.equals(applicationId)) {
- found = true;
- break;
- }
+ Func2<UUID, Map<String, UUID> ,Boolean> findApps = (applicationId, apps) -> {
+ boolean found = false;
+ for (String app : apps.keySet()) {
+ UUID appId = apps.get(app);
+ if (appId.equals(applicationId)) {
+ found = true;
+ break;
}
- return found;
}
+ return found;
};
- boolean found = findApps.call( deletedAppId, emf.getDeletedApplications() );
+ Map<String,UUID> apps = setup.getEmf().getApplications();
+ boolean found = findApps.call(deletedAppId, apps);
+ assertTrue("Restored app not found in apps collection", found);
+
+ // delete the application
+ setup.getEmf().deleteApplication(deletedAppId);
+
+ this.app.refreshIndex();
+
+ found = findApps.call( deletedAppId, emf.getDeletedApplications() );
assertTrue("Deleted app must be found in in deleted apps collection", found);
@@ -182,8 +183,7 @@ public class EntityManagerFactoryImplIT extends AbstractCoreIT {
// restore the app
emf.restoreApplication(deletedAppId);
- final ReIndexRequestBuilder builder =
- reIndexService.getBuilder().withApplicationId( deletedAppId );
+ final ReIndexRequestBuilder builder = reIndexService.getBuilder().withApplicationId( deletedAppId );
ReIndexService.ReIndexStatus status = reIndexService.rebuildIndex(builder);
int count = 0;
@@ -207,7 +207,7 @@ public class EntityManagerFactoryImplIT extends AbstractCoreIT {
assertFalse("Restored app found in deleted apps collection", found);
this.app.refreshIndex();
- Map<String,UUID> apps = setup.getEmf().getApplications();
+ apps = setup.getEmf().getApplications();
found = findApps.call(deletedAppId, apps);
assertTrue("Restored app not found in apps collection", found);
[2/2] incubator-usergrid git commit: merge
Posted by sf...@apache.org.
merge
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/1b3f7d58
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/1b3f7d58
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/1b3f7d58
Branch: refs/heads/two-dot-o-dev
Commit: 1b3f7d58b7a334f26ebef8c98e3f66ba9076b9ba
Parents: 2d0ba17 73e2292
Author: Shawn Feldman <sf...@apache.org>
Authored: Wed May 27 17:36:00 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Wed May 27 17:36:00 2015 -0600
----------------------------------------------------------------------
stack/pom.xml | 9 +++++----
.../org/apache/usergrid/services/ConnectionsServiceIT.java | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------