diff options
author | Tor Brede Vekterli <vekterli@yahoo-inc.com> | 2016-06-27 10:28:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-27 10:28:06 +0200 |
commit | db780d3a9fd7a12ea034b379dc230850061460d8 (patch) | |
tree | 9c90b012444eabfc29af83610cd581125939b7d9 /clustercontroller-apps | |
parent | 6b6bef8526c6c6ce1dd8e5d1bcf832cba2dc1ef4 (diff) | |
parent | 594a017b330b5b13c374fb8a4785651d7da2d26a (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')
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(""); |