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/08/18 22:14:53 UTC
usergrid git commit: Reduce load on Datastax driver's control
connection ( mainly b/c of our test framework ).
Repository: usergrid
Updated Branches:
refs/heads/master ba2d9850e -> 261af4870
Reduce load on Datastax driver's control connection ( mainly b/c of our test framework ).
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/261af487
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/261af487
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/261af487
Branch: refs/heads/master
Commit: 261af48708de11f6a71973c8630550ac5195e0d5
Parents: ba2d985
Author: Michael Russo <mr...@apigee.com>
Authored: Thu Aug 18 15:14:51 2016 -0700
Committer: Michael Russo <mr...@apigee.com>
Committed: Thu Aug 18 15:14:51 2016 -0700
----------------------------------------------------------------------
.../persistence/core/datastax/impl/DataStaxClusterImpl.java | 5 ++---
.../persistence/core/migration/schema/MigrationManagerImpl.java | 5 +++--
2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/261af487/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/datastax/impl/DataStaxClusterImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/datastax/impl/DataStaxClusterImpl.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/datastax/impl/DataStaxClusterImpl.java
index c7b736f..ceb5f33 100644
--- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/datastax/impl/DataStaxClusterImpl.java
+++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/datastax/impl/DataStaxClusterImpl.java
@@ -113,11 +113,10 @@ public class DataStaxClusterImpl implements DataStaxCluster {
);
clusterSession.execute(createApplicationKeyspace);
- clusterSession.executeAsync(updateApplicationKeyspace);
+ clusterSession.execute(updateApplicationKeyspace);
logger.info("Created/Updated keyspace: {}", cassandraFig.getApplicationKeyspace());
- waitForSchemaAgreement();
}
/**
@@ -128,7 +127,7 @@ public class DataStaxClusterImpl implements DataStaxCluster {
while ( true ) {
- if( this.cluster.getMetadata().checkSchemaAgreement() ){
+ if( getCluster().getMetadata().checkSchemaAgreement() ){
return;
}
http://git-wip-us.apache.org/repos/asf/usergrid/blob/261af487/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 f5f5d7b..e95c2ae 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
@@ -106,6 +106,9 @@ public class MigrationManagerImpl implements MigrationManager {
}
+
+ dataStaxCluster.waitForSchemaAgreement();
+
}
catch ( Throwable t ) {
logger.error( "Unable to perform migration", t );
@@ -132,7 +135,6 @@ public class MigrationManagerImpl implements MigrationManager {
logger.info( "Created column family {}", columnFamily.getColumnFamily().getName() );
- dataStaxCluster.waitForSchemaAgreement();
}
private void createTable(TableDefinition tableDefinition ) throws Exception {
@@ -146,7 +148,6 @@ public class MigrationManagerImpl implements MigrationManager {
logger.info("Created table: {}", tableDefinition.getTableName());
- dataStaxCluster.waitForSchemaAgreement();
}