usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [50/50] git commit: Changed process to use files instead of memory. we run out of memory when running all tests in a suite.
Date Thu, 06 Nov 2014 00:15:36 GMT
Changed process to use files instead of memory.  we run out of memory when running all tests
in a suite.


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

Branch: refs/heads/two-dot-o
Commit: 795874e3789ac6d6ad11af964398ca618ebbbd94
Parents: f89d1fd
Author: Todd Nine <tnine@apigee.com>
Authored: Wed Nov 5 15:48:08 2014 -0700
Committer: Todd Nine <tnine@apigee.com>
Committed: Wed Nov 5 15:48:08 2014 -0700

----------------------------------------------------------------------
 .../usergrid/persistence/index/impl/EsEntityIndexImpl.java  | 9 +++++----
 .../persistence/index/impl/ElasticSearchResource.java       | 2 +-
 .../usergrid/persistence/index/impl/EntityIndexTest.java    | 2 ++
 3 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/795874e3/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
index 975960b..efefa8f 100644
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
+++ b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/impl/EsEntityIndexImpl.java
@@ -54,6 +54,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
+import org.apache.usergrid.persistence.core.util.Health;
 import org.apache.usergrid.persistence.core.util.ValidationUtils;
 import org.apache.usergrid.persistence.index.EntityIndex;
 import org.apache.usergrid.persistence.index.EntityIndexBatch;
@@ -183,14 +184,14 @@ public class EsEntityIndexImpl implements EntityIndex {
             public boolean doOp() {
                 final String tempId = UUIDGenerator.newTimeUUID().toString();
 
-                client.prepareIndex( indexName, VERIFY_TYPE, tempId )
+                esProvider.getClient().prepareIndex( indexName, VERIFY_TYPE, tempId )
                         .setSource( DEFAULT_PAYLOAD ).get();
 
                 logger.info( "Successfully created new document with docId {} in index {}
and type {}", 
                         tempId, indexName, VERIFY_TYPE );
 
                 // delete all types, this way if we miss one it will get cleaned up
-                client.prepareDeleteByQuery( indexName ).setTypes( VERIFY_TYPE )
+                esProvider.getClient().prepareDeleteByQuery( indexName ).setTypes( VERIFY_TYPE
)
                         .setQuery( MATCH_ALL_QUERY_BUILDER ).get();
 
                 logger.info( "Successfully deleted all documents in index {} and type {}",

@@ -437,7 +438,7 @@ public class EsEntityIndexImpl implements EntityIndex {
     public Health getClusterHealth() {
 
         try {
-            ClusterHealthResponse chr = client.admin().cluster()
+            ClusterHealthResponse chr = esProvider.getClient().admin().cluster()
                 .health( new ClusterHealthRequest() ).get();
             return Health.valueOf( chr.getStatus().name() );
         } 
@@ -457,7 +458,7 @@ public class EsEntityIndexImpl implements EntityIndex {
     public Health getIndexHealth() {
         
         try {
-            ClusterHealthResponse chr = client.admin().cluster()
+            ClusterHealthResponse chr = esProvider.getClient().admin().cluster()
                 .health( new ClusterHealthRequest( new String[] { indexName } ) ).get();
             return Health.valueOf( chr.getStatus().name() );
         } 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/795874e3/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/ElasticSearchResource.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/ElasticSearchResource.java
b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/ElasticSearchResource.java
index d9f6ca9..42ab652 100644
--- a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/ElasticSearchResource.java
+++ b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/ElasticSearchResource.java
@@ -108,7 +108,7 @@ public class ElasticSearchResource extends EnvironResource {
                 .put("node.http.enabled", false)
                 .put("path.logs", tempDir.toString())
                 .put("path.data", tempDir.toString())
-                .put("index.store.type", "memory")
+                .put("index.store.type", "default")
                 .put("index.number_of_shards", 1)
                 .put("index.number_of_replicas", 1)
                 .build();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/795874e3/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityIndexTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityIndexTest.java
b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityIndexTest.java
index 3f1d329..3be996e 100644
--- a/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityIndexTest.java
+++ b/stack/corepersistence/queryindex/src/test/java/org/apache/usergrid/persistence/index/impl/EntityIndexTest.java
@@ -40,6 +40,7 @@ import org.apache.usergrid.persistence.collection.util.EntityUtils;
 import org.apache.usergrid.persistence.core.cassandra.CassandraRule;
 import org.apache.usergrid.persistence.core.scope.ApplicationScope;
 import org.apache.usergrid.persistence.core.scope.ApplicationScopeImpl;
+import org.apache.usergrid.persistence.core.util.Health;
 import org.apache.usergrid.persistence.index.EntityIndex;
 import org.apache.usergrid.persistence.index.EntityIndexBatch;
 import org.apache.usergrid.persistence.index.EntityIndexFactory;
@@ -62,6 +63,7 @@ import java.util.ArrayList;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
 
 
 @RunWith(EsRunner.class)


Mime
View raw message