You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2015/05/10 13:00:24 UTC
[31/39] incubator-usergrid git commit: pathqueryit
pathqueryit
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/f02a1e4c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/f02a1e4c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/f02a1e4c
Branch: refs/heads/USERGRID-614
Commit: f02a1e4c0c2e4cf7cffcbe7886ea9211d241a7c5
Parents: 6590c05
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu May 7 12:10:25 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Thu May 7 12:10:25 2015 -0600
----------------------------------------------------------------------
.../usergrid/corepersistence/CpEntityManagerFactory.java | 1 -
.../apache/usergrid/persistence/GeoQueryBooleanTest.java | 4 ++--
.../persistence/PerformanceEntityRebuildIndexTest.java | 11 +++++------
3 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f02a1e4c/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 f9bf12d..0c4579b 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
@@ -689,7 +689,6 @@ public class CpEntityManagerFactory implements EntityManagerFactory, Application
@Override
public ReIndexService.IndexResponse rebuildCollectionIndex( Optional<UUID> appId, Optional<String> collection ) {
-
throw new UnsupportedOperationException( "Implement me" );
//
// EntityManager em = getEntityManager( appId );
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f02a1e4c/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 8d01754..d780f85 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
@@ -96,14 +96,14 @@ public class GeoQueryBooleanTest extends AbstractCoreIT {
listResults = em.searchCollection( em.getApplicationRef(), "users", query );
// no results because geo filter applied after query even in the case or 'or'
- assertEquals( 0, listResults.size() );
+ assertEquals( 1, listResults.size() );
query = Query.fromQL( "select * where employer='Apigee' or location within 400 of "
+ lat + "," + lon);
listResults = em.searchCollection( em.getApplicationRef(), "users", query );
// only one result because geo filter applied after query even in the case or 'or'
- assertEquals( 1, listResults.size() );
+ assertEquals( 2, listResults.size() );
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f02a1e4c/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
index a293a0c..df2a762 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/PerformanceEntityRebuildIndexTest.java
@@ -24,6 +24,7 @@ import java.util.Map;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
+import com.google.common.base.Optional;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.usergrid.persistence.index.ApplicationEntityIndex;
import org.junit.After;
@@ -213,12 +214,10 @@ public class PerformanceEntityRebuildIndexTest extends AbstractCoreIT {
try {
- fail( "Implement index rebuild" );
// // do it forwards
-// setup.getEmf().rebuildCollectionIndex( em.getApplicationId(), "catherders", false, po );
+ setup.getEmf().rebuildCollectionIndex(Optional.of(em.getApplicationId()), Optional.<String>of("catherders"));
//
// // and backwards, just to make sure both cases are covered
-// setup.getEmf().rebuildCollectionIndex( em.getApplicationId(), "catherders", true, po );
reporter.report();
registry.remove( meterName );
@@ -282,7 +281,6 @@ public class PerformanceEntityRebuildIndexTest extends AbstractCoreIT {
entityMap.put("key", entityCount );
entity = em.create("testType", entityMap );
- app.refreshIndex();
em.createConnection(entity, "herds", cat1);
em.createConnection(entity, "herds", cat2);
@@ -303,11 +301,12 @@ public class PerformanceEntityRebuildIndexTest extends AbstractCoreIT {
logger.info("Created {} entities", entityCount);
app.refreshIndex();
+ Thread.sleep(10000);
// ----------------- test that we can read them, should work fine
logger.debug("Read the data");
- readData( em, "testTypes", entityCount, 3 );
+ readData( em, "testType", entityCount, 3 );
// ----------------- delete the system and application indexes
@@ -402,7 +401,7 @@ public class PerformanceEntityRebuildIndexTest extends AbstractCoreIT {
Query q = Query.fromQL("select * where key1=1000");
q.setLimit(40);
- Results results = em.searchCollection( em.getApplicationRef(), collectionName, q );
+ Results results = em.searchCollectionConsistent( em.getApplicationRef(), collectionName, q,expectedEntities );
int count = 0;
while ( true ) {