From 20ef394318f5e389996b3205e8f2958ed0ca2a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Sat, 11 Jan 2020 19:18:51 +0100 Subject: Add flags to configure udup server addr --- build.gradle | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 66c50d1..9d91539 100644 --- a/build.gradle +++ b/build.gradle @@ -30,19 +30,19 @@ ext.gossipPeriod = { return System.getProperty("gossipPeriod") ?: 5 * 1000 } -ext.UDUPHostname = { +ext.UDUPServerHostname = { return System.getProperty("hostname") ?: "localhost" } -ext.port = { +ext.UDUPServerPort = { return System.getProperty("port") ?: 5999; } -ext.timeout = { +ext.UDUPServerTimeout = { return System.getProperty("timeout") ?: 5000; } -ext.bufsize = { +ext.UDUPServerBufsize = { return System.getProperty("bufsize") ?: 512; } @@ -89,10 +89,10 @@ task runAgent(type: JavaExec) { systemProperty 'freshness_period', freshnessPeriod() systemProperty 'query_period', queryPeriod() systemProperty 'gossip_period', gossipPeriod() - systemProperty 'UDUPServer.hostname', UDUPHostname() - systemProperty 'UDUPServer.port', port() - systemProperty 'UDUPServer.timeout', port() - systemProperty 'UDUPServer.bufsize', port() + systemProperty 'UDUPServer.hostname', UDUPServerHostname() + systemProperty 'UDUPServer.port', UDUPServerPort() + systemProperty 'UDUPServer.timeout', UDUPServerTimeout() + systemProperty 'UDUPServer.bufsize', UDUPServerBufsize() } task runClient(type: JavaExec) { -- cgit v1.2.3 From 22ec12d762db07b6ecc65462b1e7cb38c8ca1578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magdalena=20Grodzi=C5=84ska?= Date: Sat, 11 Jan 2020 20:06:14 +0100 Subject: Refactor agent configs nicely --- build.gradle | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 9d91539..13be045 100644 --- a/build.gradle +++ b/build.gradle @@ -46,6 +46,21 @@ ext.UDUPServerBufsize = { return System.getProperty("bufsize") ?: 512; } +/* +Possible options: +RoundRobinExp +RoundRobinUniform +RandomExp +RandomUniform + */ +ext.zoneSelectionStrategy = { + return System.getProperty("zoneStrategy") ?: "RandomUniform" +} + +ext.zonePath = { + return System.getProperty("zonePath") ?: "/uw/violet07" +} + repositories { // Use jcenter for resolving dependencies. // You can declare any Maven/Ivy/file repository here. @@ -93,6 +108,8 @@ task runAgent(type: JavaExec) { systemProperty 'UDUPServer.port', UDUPServerPort() systemProperty 'UDUPServer.timeout', UDUPServerTimeout() systemProperty 'UDUPServer.bufsize', UDUPServerBufsize() + systemProperty 'Gossip.zone_strategy', zoneSelectionStrategy() + systemProperty 'zone_path', zonePath() } task runClient(type: JavaExec) { -- cgit v1.2.3