You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by to...@apache.org on 2014/10/31 20:31:32 UTC

[10/10] git commit: Fixes shard allocation configuration in rest nodes

Fixes shard allocation configuration in rest nodes


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

Branch: refs/heads/es-client-changes
Commit: d9374bed0175f05e4971880553832439d67a5403
Parents: 5676bbf
Author: Todd Nine <tn...@apigee.com>
Authored: Fri Oct 31 13:31:14 2014 -0600
Committer: Todd Nine <tn...@apigee.com>
Committed: Fri Oct 31 13:31:14 2014 -0600

----------------------------------------------------------------------
 stack/awscluster/src/main/groovy/configure_usergrid.groovy | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d9374bed/stack/awscluster/src/main/groovy/configure_usergrid.groovy
----------------------------------------------------------------------
diff --git a/stack/awscluster/src/main/groovy/configure_usergrid.groovy b/stack/awscluster/src/main/groovy/configure_usergrid.groovy
index 7508f2e..65b82d0 100644
--- a/stack/awscluster/src/main/groovy/configure_usergrid.groovy
+++ b/stack/awscluster/src/main/groovy/configure_usergrid.groovy
@@ -40,6 +40,10 @@ def clusterName  = System.getenv().get("CASSANDRA_CLUSTER_NAME")
 def superUserEmail     = System.getenv().get("SUPER_USER_EMAIL")
 def testAdminUserEmail = System.getenv().get("TEST_ADMIN_USER_EMAIL")
 
+def numEsNodes = System.getenv().get("ES_NUM_SERVERS")
+def esShards = numEsNodes/2;
+def esReplicas = 2;
+
 def cassThreads = System.getenv().get("TOMCAT_THREADS")
 def hystrixThreads = Integer.parseInt(cassThreads) / 100
 
@@ -95,6 +99,8 @@ elasticsearch.cluster_name=${clusterName}
 elasticsearch.index_prefix=usergrid
 elasticsearch.hosts=${esnodes}
 elasticsearch.port=9300
+elasticsearch.number_shards=${esShards}
+elasticsearch.number_replicas=${esReplicas}
 
 ######################################################
 # Custom mail transport 
@@ -172,6 +178,7 @@ usergrid.metrics.graphite.host=${graphite}
 
 usergrid.queue.prefix=${clusterName}
 usergrid.queue.region=${ec2Region}
+
 """
 
 println usergridConfig