Ensure the hector cluster is created with credentials from the properties file.


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

Branch: refs/heads/master
Commit: c07cdb56c995cedfd776603c8c2ea97039cf7bfa
Parents: 2622690
Author: Michael Russo <mru...@apigee.com>
Authored: Tue Apr 26 17:00:08 2016 -0700
Committer: Michael Russo <mru...@apigee.com>
Committed: Tue Apr 26 17:00:08 2016 -0700

----------------------------------------------------------------------
 stack/core/src/main/resources/usergrid-core-context.xml | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/c07cdb56/stack/core/src/main/resources/usergrid-core-context.xml
----------------------------------------------------------------------
diff --git a/stack/core/src/main/resources/usergrid-core-context.xml 
b/stack/core/src/main/resources/usergrid-core-context.xml
index 1087f25..4a3e402 100644
--- a/stack/core/src/main/resources/usergrid-core-context.xml
+++ b/stack/core/src/main/resources/usergrid-core-context.xml
@@ -61,9 +61,15 @@
         <property name="loadBalancingPolicy" ref="loadBalancingPolicy"/>
        </bean>
 
+    <util:map id="cassandraCredentials" map-class="java.util.HashMap">
+        <entry key="username" value="${cassandra.username}" />
+        <entry key="password" value="${cassandra.password}" />
+    </util:map>
+
        <bean id="cassandraCluster" 
class="me.prettyprint.cassandra.service.ThriftCluster">
                <constructor-arg value="${cassandra.cluster}" />
                <constructor-arg ref="cassandraHostConfigurator" />
+        <constructor-arg ref="cassandraCredentials" />
        </bean>
 
     <bean id="loadBalancingPolicy" 
class="me.prettyprint.cassandra.connection.DynamicLoadBalancingPolicy"/>

Reply via email to