usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject incubator-usergrid git commit: less records in search
Date Wed, 06 May 2015 21:31:14 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o-dev 738094b04 -> 362e7580c


less records in search


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

Branch: refs/heads/two-dot-o-dev
Commit: 362e7580cabd09eaa4df405b90c88a78abd04ceb
Parents: 738094b
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Wed May 6 15:29:49 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Wed May 6 15:29:49 2015 -0600

----------------------------------------------------------------------
 stack/core/pom.xml                              |  4 +-
 .../org/apache/usergrid/persistence/GeoIT.java  | 58 +++++++-------------
 .../index/impl/IndexRefreshCommandImpl.java     |  4 +-
 3 files changed, 24 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/362e7580/stack/core/pom.xml
----------------------------------------------------------------------
diff --git a/stack/core/pom.xml b/stack/core/pom.xml
index 99a7157..db403b3 100644
--- a/stack/core/pom.xml
+++ b/stack/core/pom.xml
@@ -86,8 +86,8 @@
                     <target.directory>${project.build.directory}</target.directory>
                 </systemPropertyVariables>
                 <parallel>methods</parallel>
-                <forkCount>${usergrid.it.forkCount}</forkCount>
-                <threadCount>${usergrid.it.threads}</threadCount>
+                <forkCount>1</forkCount>
+                <threadCount>1</threadCount>
                 <reuseForks>true</reuseForks>
                 <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} </argLine>
                 <!-- see this page for documentation on classloading issues http://maven.apache.org/surefire/maven-surefire-plugin/examples/class-loading.html
-->

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/362e7580/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
index f443201..7f19d3b 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/GeoIT.java
@@ -372,7 +372,7 @@ public class GeoIT extends AbstractCoreIT {
 
         // save objects in a diagonal line from -90 -180 to 90 180
 
-        int numEntities = 500;
+        int numEntities = 50;
 
         float minLattitude = -90;
         float maxLattitude = 90;
@@ -402,7 +402,7 @@ public class GeoIT extends AbstractCoreIT {
         // just to be save
         Query query = Query.fromQL("location within 50000000 of -90, -180" );
 
-        query.setLimit( 100 );
+        query.setLimit( 10 );
 
         int count = 0;
         Results results;
@@ -433,7 +433,7 @@ public class GeoIT extends AbstractCoreIT {
 
         // save objects in a diagonal line from -90 -180 to 90 180
 
-        int numEntities = 500;
+        int numEntities = 10;
 
         for (int i = 0; i < numEntities; i++) {
             Map<String, Object> data = new HashMap<String, Object>(2);
@@ -448,7 +448,7 @@ public class GeoIT extends AbstractCoreIT {
         // earth's circumference is 40,075 kilometers. Up it to 50,000kilometers
                 // just to be save
         Query query = Query.fromQL("location within 50000000 of 0, 0" );
-        query.setLimit( 100 );
+        query.setLimit( 5 );
 
         int count = 0;
         Results results;
@@ -479,7 +479,7 @@ public class GeoIT extends AbstractCoreIT {
 
         // save objects in a diagonal line from -90 -180 to 90 180
 
-        int numEntities = 100;
+        int numEntities = 10;
 
         float minLattitude = -90;
         float maxLattitude = 90;
@@ -509,7 +509,7 @@ public class GeoIT extends AbstractCoreIT {
         // just to be save
         Query query = Query.fromQL( "location within 50000000 of -90, -180" );
 
-        query.setLimit(100);
+        query.setLimit(10);
 
         int count = 0;
 
@@ -534,9 +534,9 @@ public class GeoIT extends AbstractCoreIT {
         EntityManager em = app.getEntityManager();
         assertNotNull( em );
 
-        int size = 100;
-        int min = 50;
-        int max = 90;
+        int size = 10;
+        int min = 5;
+        int max = 9;
 
         List<Entity> created = new ArrayList<Entity>(size);
 
@@ -593,7 +593,7 @@ public class GeoIT extends AbstractCoreIT {
 
         // save objects in a diagonal line from -90 -180 to 90 180
 
-        int numEntities = 250;
+        int numEntities = 25;
 
         float minLatitude = 48.32455f;
         float maxLatitude = 48.46481f;
@@ -609,7 +609,7 @@ public class GeoIT extends AbstractCoreIT {
             float longitude = minLongitude + longitudeDelta * i;
 
             Map<String, Float> location =
-                    MapUtils.hashMap("latitude", latitude).map("longitude", longitude);
+                MapUtils.hashMap("latitude", latitude).map("longitude", longitude);
 
             Map<String, Object> data = new HashMap<String, Object>(2);
             data.put("name", String.valueOf(i));
@@ -622,41 +622,23 @@ public class GeoIT extends AbstractCoreIT {
 
         //do a direct geo iterator test.  We need to make sure that we short circuit on the
correct tile.
 
-        float latitude = 48.38626f;
-        float longitude = 9.94175f;
-        int distance = 1000;
+
         int limit = 8;
 
-        {
-            // QuerySlice slice = new QuerySlice( "location", 0 );
-            // GeoIterator itr = new GeoIterator( new CollectionGeoSearch(
-            //     em, setup.getIbl(), setup.getCassSvc(), em.getApplicationRef(), "stores"
),
-            //     limit, slice, "location", new Point( lattitude, longitude ), distance
);
-            //
-            // // check we got back all 500 entities
-            // assertFalse( itr.hasNext() );
-            //
-            // List<String> cells = itr.getLastCellsSearched();
-            // assertEquals( 1, cells.size() );
-            // assertEquals( 4, cells.get( 0 ).length() );
 
-        }
+        long startTime = System.currentTimeMillis();
 
-        {
-            long startTime = System.currentTimeMillis();
+        //now test at the EM level, there should be 0 results.
+        Query query = Query.fromQL("location within 1000 of 48.38626, 9.94175");
+        query.setLimit(limit);
 
-            //now test at the EM level, there should be 0 results.
-            Query query = Query.fromQL( "location within 1000 of 48.38626, 9.94175");
-            query.setLimit(limit);
+        Results results = em.searchCollection(em.getApplicationRef(), "stores", query);
 
-            Results results = em.searchCollection(em.getApplicationRef(), "stores", query);
+        assertEquals(0, results.size());
 
-            assertEquals(0, results.size());
+        long endTime = System.currentTimeMillis();
 
-            long endTime = System.currentTimeMillis();
-
-            LOG.info("Runtime took {} milliseconds to search", endTime - startTime);
-        }
+        LOG.info("Runtime took {} milliseconds to search", endTime - startTime);
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/362e7580/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexRefreshCommandImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexRefreshCommandImpl.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexRefreshCommandImpl.java
index 5c79422..bb42d6a 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexRefreshCommandImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/IndexRefreshCommandImpl.java
@@ -84,7 +84,7 @@ public class IndexRefreshCommandImpl implements IndexRefreshCommand {
 
 
     @Override
-    public synchronized Observable<IndexRefreshCommandInfo> execute( String[] indexes
) {
+    public Observable<IndexRefreshCommandInfo> execute( String[] indexes ) {
 
         final long start = System.currentTimeMillis();
 
@@ -192,6 +192,6 @@ public class IndexRefreshCommandImpl implements IndexRefreshCommand {
             } );
 
 
-        return Async.start( () -> 1 ).flatMap( intValue -> ObservableTimer.time( refreshResults,
timer ) );
+        return ObservableTimer.time( refreshResults, timer ) ;
     }
 }


Mime
View raw message