summaryrefslogtreecommitdiffstats
path: root/clustercontroller-apps
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@yahoo-inc.com>2016-06-27 10:28:06 +0200
committerGitHub <noreply@github.com>2016-06-27 10:28:06 +0200
commitdb780d3a9fd7a12ea034b379dc230850061460d8 (patch)
tree9c90b012444eabfc29af83610cd581125939b7d9 /clustercontroller-apps
parent6b6bef8526c6c6ce1dd8e5d1bcf832cba2dc1ef4 (diff)
parent594a017b330b5b13c374fb8a4785651d7da2d26a (diff)
Merge pull request #56 from yahoo/vekterli/configurable-group-auto-takedown
Add configurable automatic group up/down feature based on node availability
Diffstat (limited to 'clustercontroller-apps')
-rw-r--r--clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java1
-rw-r--r--clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java7
2 files changed, 7 insertions, 1 deletions
diff --git a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java
index 07b0a68520b..6b02debc182 100644
--- a/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java
+++ b/clustercontroller-apps/src/main/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurer.java
@@ -69,6 +69,7 @@ public class ClusterControllerClusterConfigurer {
options.minTimeBetweenNewSystemStates = config.min_time_between_new_systemstates();
options.maxSlobrokDisconnectGracePeriod = (int) (config.max_slobrok_disconnect_grace_period() * 1000);
options.distributionBits = config.ideal_distribution_bits();
+ options.minNodeRatioPerGroup = config.min_node_ratio_per_group();
}
private void configure(SlobroksConfig config) {
diff --git a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java
index 6cf4f962c9f..79da2574dbc 100644
--- a/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java
+++ b/clustercontroller-apps/src/test/java/com/yahoo/vespa/clustercontroller/apps/clustercontroller/ClusterControllerClusterConfigurerTest.java
@@ -22,7 +22,11 @@ public class ClusterControllerClusterConfigurerTest extends TestCase {
group.nodes.add(node);
distributionConfig.group.add(group);
FleetcontrollerConfig.Builder fleetcontrollerConfig = new FleetcontrollerConfig.Builder();
- fleetcontrollerConfig.cluster_name("storage").index(0).zookeeper_server("zoo");
+ fleetcontrollerConfig
+ .cluster_name("storage")
+ .index(0)
+ .zookeeper_server("zoo")
+ .min_node_ratio_per_group(0.123);
SlobroksConfig.Builder slobroksConfig = new SlobroksConfig.Builder();
SlobroksConfig.Slobrok.Builder slobrok = new SlobroksConfig.Slobrok.Builder();
slobrok.connectionspec("foo");
@@ -47,6 +51,7 @@ public class ClusterControllerClusterConfigurerTest extends TestCase {
metric
);
assertTrue(configurer.getOptions() != null);
+ assertEquals(0.123, configurer.getOptions().minNodeRatioPerGroup, 0.01);
// Oki with no zookeeper if one node
zookeepersConfig.zookeeperserverlist("");