You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by mr...@apache.org on 2016/11/11 23:45:36 UTC
[1/2] usergrid git commit: Revert "Increase test cassandra
connections per host as we test with only 1 host."
Repository: usergrid
Updated Branches:
refs/heads/master 1ef392033 -> cd7e803d1
Revert "Increase test cassandra connections per host as we test with only 1 host."
This reverts commit 1ef392033f6639e10fcdf9bfb97293f37559487a.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/91920959
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/91920959
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/91920959
Branch: refs/heads/master
Commit: 919209594079c4cd25e3ee22750e7f56f7603a9a
Parents: 1ef3920
Author: Michael Russo <mr...@apigee.com>
Authored: Fri Nov 11 15:20:39 2016 -0800
Committer: Michael Russo <mr...@apigee.com>
Committed: Fri Nov 11 15:20:39 2016 -0800
----------------------------------------------------------------------
stack/core/src/test/resources/usergrid-custom-test.properties | 2 +-
.../collection/src/test/resources/dynamic-test.properties | 2 +-
.../collection/src/test/resources/usergrid-CHOP.properties | 2 +-
.../collection/src/test/resources/usergrid-UNIT.properties | 2 +-
.../common/src/test/resources/usergrid-UNIT.properties | 2 +-
.../graph/src/test/resources/usergrid-AWS.properties | 2 +-
.../graph/src/test/resources/usergrid-CHOP.properties | 2 +-
.../graph/src/test/resources/usergrid-UNIT.properties | 2 +-
.../queryindex/src/test/resources/dynamic-test.properties | 2 +-
.../queryindex/src/test/resources/usergrid-CHOP.properties | 2 +-
.../queryindex/src/test/resources/usergrid-UNIT.properties | 2 +-
stack/corepersistence/queue/src/test/resources/qakka.properties | 2 --
stack/rest/src/test/resources/usergrid-custom-test.properties | 2 +-
stack/services/src/test/resources/usergrid-custom-test.properties | 2 +-
14 files changed, 13 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/core/src/test/resources/usergrid-custom-test.properties
----------------------------------------------------------------------
diff --git a/stack/core/src/test/resources/usergrid-custom-test.properties b/stack/core/src/test/resources/usergrid-custom-test.properties
index aaf33b1..9aeac82 100644
--- a/stack/core/src/test/resources/usergrid-custom-test.properties
+++ b/stack/core/src/test/resources/usergrid-custom-test.properties
@@ -14,7 +14,7 @@
# these settings allow tests to run and consistently pass on 16GB MacBook Pro
# with ug.heapmax=5000m and ug.heapmin=3000m (set in Maven settings.xml)
-cassandra.connections=200
+cassandra.connections=50
#Not a good number for real systems. Write shards should be 2x cluster size from our tests
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/corepersistence/collection/src/test/resources/dynamic-test.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/resources/dynamic-test.properties b/stack/corepersistence/collection/src/test/resources/dynamic-test.properties
index c2c5bf0..ca203f9 100644
--- a/stack/corepersistence/collection/src/test/resources/dynamic-test.properties
+++ b/stack/corepersistence/collection/src/test/resources/dynamic-test.properties
@@ -1,6 +1,6 @@
# The properties are not the actual configuration properties but
# safe dynamic property defaults for our testing via IDE or Maven
-cassandra.connections=200
+cassandra.connections=50
cassandra.port=9160
cassandra.hosts=localhost
cassandra.cluster_name=Usergrid
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
index fd7b3c9..e39b911 100644
--- a/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
+++ b/stack/corepersistence/collection/src/test/resources/usergrid-CHOP.properties
@@ -18,7 +18,7 @@
# These are for CHOP environment settings
-cassandra.connections=200
+cassandra.connections=30
cassandra.port=9160
# a comma delimited private IP address list to your chop cassandra cluster
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties b/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties
index 141d28f..ebb7679 100644
--- a/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties
+++ b/stack/corepersistence/collection/src/test/resources/usergrid-UNIT.properties
@@ -18,7 +18,7 @@
#
# Keep nothing but overriding test defaults in here
-cassandra.connections=200
+cassandra.connections=30
cassandra.port=9160
cassandra.hosts=localhost
cassandra.cluster_name=Usergrid
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/corepersistence/common/src/test/resources/usergrid-UNIT.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/test/resources/usergrid-UNIT.properties b/stack/corepersistence/common/src/test/resources/usergrid-UNIT.properties
index a26a46b..e31dad0 100644
--- a/stack/corepersistence/common/src/test/resources/usergrid-UNIT.properties
+++ b/stack/corepersistence/common/src/test/resources/usergrid-UNIT.properties
@@ -18,7 +18,7 @@
#
# Keep nothing but overriding test defaults in here
-cassandra.connections=200
+cassandra.connections=30
cassandra.port=9160
cassandra.hosts=localhost
cassandra.cluster_name=Usergrid
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/corepersistence/graph/src/test/resources/usergrid-AWS.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/resources/usergrid-AWS.properties b/stack/corepersistence/graph/src/test/resources/usergrid-AWS.properties
index eccfd34..e737815 100644
--- a/stack/corepersistence/graph/src/test/resources/usergrid-AWS.properties
+++ b/stack/corepersistence/graph/src/test/resources/usergrid-AWS.properties
@@ -1,5 +1,5 @@
# Keep nothing but overriding test defaults in here
-cassandra.connections=200
+cassandra.connections=50
cassandra.port=9160
cassandra.hosts=
#cassandra.hosts=localhost
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/corepersistence/graph/src/test/resources/usergrid-CHOP.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/resources/usergrid-CHOP.properties b/stack/corepersistence/graph/src/test/resources/usergrid-CHOP.properties
index e127c8e..92d0041 100644
--- a/stack/corepersistence/graph/src/test/resources/usergrid-CHOP.properties
+++ b/stack/corepersistence/graph/src/test/resources/usergrid-CHOP.properties
@@ -1,6 +1,6 @@
# These are for CHOP environment settings
-cassandra.connections=200
+cassandra.connections=50
cassandra.port=9160
# a comma delimited private IP address list to your chop cassandra cluster
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/corepersistence/graph/src/test/resources/usergrid-UNIT.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/graph/src/test/resources/usergrid-UNIT.properties b/stack/corepersistence/graph/src/test/resources/usergrid-UNIT.properties
index 71a98fc..6f8a7c5 100644
--- a/stack/corepersistence/graph/src/test/resources/usergrid-UNIT.properties
+++ b/stack/corepersistence/graph/src/test/resources/usergrid-UNIT.properties
@@ -1,5 +1,5 @@
# Keep nothing but overriding test defaults in here
-cassandra.connections=200
+cassandra.connections=50
cassandra.port=9160
cassandra.hosts=localhost
cassandra.cluster_name=Usergrid
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/corepersistence/queryindex/src/test/resources/dynamic-test.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/test/resources/dynamic-test.properties b/stack/corepersistence/queryindex/src/test/resources/dynamic-test.properties
index 7e25450..7b869af 100644
--- a/stack/corepersistence/queryindex/src/test/resources/dynamic-test.properties
+++ b/stack/corepersistence/queryindex/src/test/resources/dynamic-test.properties
@@ -1,6 +1,6 @@
# The properties are not the actual configuration properties but
# safe dynamic property defaults for our testing via IDE or Maven
-cassandra.connections=200
+cassandra.connections=50
cassandra.port=9160
cassandra.hosts=localhost
cassandra.cluster_name=Usergrid
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/corepersistence/queryindex/src/test/resources/usergrid-CHOP.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/test/resources/usergrid-CHOP.properties b/stack/corepersistence/queryindex/src/test/resources/usergrid-CHOP.properties
index f225f84..ff4f3bb 100644
--- a/stack/corepersistence/queryindex/src/test/resources/usergrid-CHOP.properties
+++ b/stack/corepersistence/queryindex/src/test/resources/usergrid-CHOP.properties
@@ -1,5 +1,5 @@
# These are for CHOP environment settings
-cassandra.connections=200
+cassandra.connections=50
cassandra.port=9160
# a comma delimited private IP address list to your chop cassandra cluster
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties b/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties
index 492de0f..3c853ac 100644
--- a/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties
+++ b/stack/corepersistence/queryindex/src/test/resources/usergrid-UNIT.properties
@@ -4,7 +4,7 @@ cassandra.embedded=true
cassandra.hosts=127.0.0.1
cassandra.port=9160
cassandra.cluster_name=Usergrid
-cassandra.connections=200
+cassandra.connections=50
collections.keyspace=Usergrid_Collections
collections.keyspace.strategy.options=replication_factor:1
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/corepersistence/queue/src/test/resources/qakka.properties
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queue/src/test/resources/qakka.properties b/stack/corepersistence/queue/src/test/resources/qakka.properties
index b95f3ca..3d1888e 100644
--- a/stack/corepersistence/queue/src/test/resources/qakka.properties
+++ b/stack/corepersistence/queue/src/test/resources/qakka.properties
@@ -58,8 +58,6 @@ queue.long.polling.time.millis=2000
cassandra.hosts=localhost
-cassandra.connections=200
-
cassandra.keyspace.application=qakka_test_application
cassandra.keyspace.queue-message=qakka_test_queue_messages
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/rest/src/test/resources/usergrid-custom-test.properties
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/resources/usergrid-custom-test.properties b/stack/rest/src/test/resources/usergrid-custom-test.properties
index 3fa776c..4b4b165 100644
--- a/stack/rest/src/test/resources/usergrid-custom-test.properties
+++ b/stack/rest/src/test/resources/usergrid-custom-test.properties
@@ -16,7 +16,7 @@
# REST module test properties
cassandra.startup=external
-cassandra.connections=200
+cassandra.connections=50
elasticsearch.startup=external
http://git-wip-us.apache.org/repos/asf/usergrid/blob/91920959/stack/services/src/test/resources/usergrid-custom-test.properties
----------------------------------------------------------------------
diff --git a/stack/services/src/test/resources/usergrid-custom-test.properties b/stack/services/src/test/resources/usergrid-custom-test.properties
index a949921..7524b1c 100644
--- a/stack/services/src/test/resources/usergrid-custom-test.properties
+++ b/stack/services/src/test/resources/usergrid-custom-test.properties
@@ -16,7 +16,7 @@
# with ug.heapmax=5000m and ug.heapmin=3000m (set in Maven settings.xml)
cassandra.startup=external
elasticsearch.startup=external
-cassandra.connections=200
+cassandra.connections=50
#Poll interval to check for new jobs in millseconds. 10 milliseconds for testing
usergrid.scheduler.job.interval=100
[2/2] usergrid git commit: Reduce load on datastax control connection
( mostly for tests because the interact with the schema A LOT).
Posted by mr...@apache.org.
Reduce load on datastax control connection ( mostly for tests because the interact with the schema A LOT).
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/cd7e803d
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/cd7e803d
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/cd7e803d
Branch: refs/heads/master
Commit: cd7e803d1a831a7801a5f7234c600b60517c62b7
Parents: 9192095
Author: Michael Russo <mr...@apigee.com>
Authored: Fri Nov 11 15:45:06 2016 -0800
Committer: Michael Russo <mr...@apigee.com>
Committed: Fri Nov 11 15:45:06 2016 -0800
----------------------------------------------------------------------
.../migration/schema/MigrationManagerImpl.java | 25 ++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/cd7e803d/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/schema/MigrationManagerImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/schema/MigrationManagerImpl.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/schema/MigrationManagerImpl.java
index 9178bde..2205e57 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/schema/MigrationManagerImpl.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/migration/schema/MigrationManagerImpl.java
@@ -35,6 +35,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Collection;
+import java.util.List;
+import java.util.Map;
import java.util.Set;
@@ -134,9 +136,8 @@ public class MigrationManagerImpl implements MigrationManager {
keyspace.createColumnFamily( columnFamily.getColumnFamily(), columnFamily.getOptions() );
- // creation of tables happens with the datastax driver and it auto checks schema on schema queries
// the CF def creation uses Asytanax, so manually check the schema agreement
- dataStaxCluster.waitForSchemaAgreement();
+ astyanaxWaitForSchemaAgreement();
logger.info( "Created column family {}", columnFamily.getColumnFamily().getName() );
@@ -170,6 +171,26 @@ public class MigrationManagerImpl implements MigrationManager {
}
+ private void astyanaxWaitForSchemaAgreement() throws ConnectionException {
+
+ while ( true ) {
+
+ final Map<String, List<String>> versions = keyspace.describeSchemaVersions();
+
+ if ( versions != null && versions.size() == 1 ) {
+ return;
+ }
+
+ //sleep and try it again
+ try {
+ Thread.sleep( 100 );
+ }
+ catch ( InterruptedException e ) {
+ //swallow
+ }
+ }
+ }
+
}