Logging improvements, fix to CassandraConfig
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/a254ee67 Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/a254ee67 Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/a254ee67 Branch: refs/heads/usergrid-1318-queue Commit: a254ee67c5f3f3a2383ea2417e0e6d8ea88576a9 Parents: fbce160 Author: Dave Johnson <[email protected]> Authored: Thu Oct 6 10:56:02 2016 -0400 Committer: Dave Johnson <[email protected]> Committed: Thu Oct 6 10:56:02 2016 -0400 ---------------------------------------------------------------------- .../apache/usergrid/persistence/core/CassandraConfig.java | 2 -- .../usergrid/persistence/core/CassandraConfigImpl.java | 2 +- .../persistence/core/datastax/impl/DataStaxClusterImpl.java | 9 ++++----- 3 files changed, 5 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/usergrid/blob/a254ee67/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfig.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfig.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfig.java index 499561e..7bd2a74 100644 --- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfig.java +++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfig.java @@ -20,8 +20,6 @@ package org.apache.usergrid.persistence.core; import com.netflix.astyanax.model.ConsistencyLevel; -import org.apache.cassandra.db.marshal.AbstractCompositeType; -import org.apache.log4j.lf5.viewer.categoryexplorer.CategoryPath; /** http://git-wip-us.apache.org/repos/asf/usergrid/blob/a254ee67/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfigImpl.java ---------------------------------------------------------------------- diff --git a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfigImpl.java b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfigImpl.java index 9cdec95..1503093 100644 --- a/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfigImpl.java +++ b/stack/corepersistence/common/src/main/java/org/apache/usergrid/persistence/core/CassandraConfigImpl.java @@ -205,7 +205,7 @@ public class CassandraConfigImpl implements CassandraConfig { @Override public String getStrategy() { - return cassandraFig.getStrategyLocal(); + return cassandraFig.getStrategy(); } @Override http://git-wip-us.apache.org/repos/asf/usergrid/blob/a254ee67/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 67f6123..b36adab 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 @@ -48,15 +48,13 @@ public class DataStaxClusterImpl implements DataStaxCluster { this.cassandraConfig = cassandraFig; this.cluster = buildCluster(); - // always initialize the keyspaces - this.createApplicationKeyspace(); - logger.info("Initialized datastax cluster client. Hosts={}, Idle Timeout={}s, Pool Timeout={}s", cluster.getMetadata().getAllHosts().toString(), cluster.getConfiguration().getPoolingOptions().getIdleTimeoutSeconds(), cluster.getConfiguration().getPoolingOptions().getPoolTimeoutMillis() / 1000); - + // always initialize the keyspaces + this.createApplicationKeyspace(); } @Override @@ -149,7 +147,8 @@ public class DataStaxClusterImpl implements DataStaxCluster { final String createQueueMessageKeyspace = String.format( "CREATE KEYSPACE IF NOT EXISTS %s WITH replication = %s", CQLUtils.quote( cassandraConfig.getApplicationLocalKeyspace()), - CQLUtils.getFormattedReplication( cassandraConfig.getStrategyLocal(), cassandraConfig.getStrategyOptionsLocal()) + CQLUtils.getFormattedReplication( + cassandraConfig.getStrategyLocal(), cassandraConfig.getStrategyOptionsLocal()) );
