diff --git a/accio/java/fr/cnrs/liris/accio/tools/cli/commands/ClusterClientProvider.scala b/accio/java/fr/cnrs/liris/accio/tools/cli/commands/ClusterClientProvider.scala index 7ec3312f..38db7b32 100644 --- a/accio/java/fr/cnrs/liris/accio/tools/cli/commands/ClusterClientProvider.scala +++ b/accio/java/fr/cnrs/liris/accio/tools/cli/commands/ClusterClientProvider.scala @@ -79,7 +79,7 @@ final class ClusterClientProvider(parser: ConfigParser) { private def getOrCreate(config: Cluster) = { clients.getOrElseUpdate(config.name, { val params = RichClientParam() - val service = Thrift.newService(config.addr) + val service = Thrift.newService(config.server) new AgentService.FinagledClient(service, params) }) } diff --git a/accio/java/fr/cnrs/liris/accio/tools/cli/config/Cluster.scala b/accio/java/fr/cnrs/liris/accio/tools/cli/config/Cluster.scala new file mode 100644 index 00000000..13c3b940 --- /dev/null +++ b/accio/java/fr/cnrs/liris/accio/tools/cli/config/Cluster.scala @@ -0,0 +1,27 @@ +/* + * Accio is a platform to launch computer science experiments. + * Copyright (C) 2016-2018 Vincent Primault + * + * Accio is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Accio is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Accio. If not, see . + */ + +package fr.cnrs.liris.accio.tools.cli.config + +/** + * Configuration of a single Accio cluster. It specifies how the client should contact it. + * + * @param name Cluster name. + * @param server Cluster address (as a Finagle name). + */ +case class Cluster(name: String, server: String) \ No newline at end of file diff --git a/accio/java/fr/cnrs/liris/accio/tools/cli/config/ClusterConfig.scala b/accio/java/fr/cnrs/liris/accio/tools/cli/config/ClusterConfig.scala index 114ab1af..e2abbcce 100644 --- a/accio/java/fr/cnrs/liris/accio/tools/cli/config/ClusterConfig.scala +++ b/accio/java/fr/cnrs/liris/accio/tools/cli/config/ClusterConfig.scala @@ -71,12 +71,4 @@ case class ClusterConfig(clusters: Seq[Cluster]) extends WrappedValue[Seq[Cluste } ClusterConfig(mergedClusters) } -} - -/** - * Configuration of a single Accio cluster. It specifies how the client should contact it. - * - * @param name Cluster name. - * @param addr Cluster address (as a Finagle name). - */ -case class Cluster(name: String, addr: String) \ No newline at end of file +} \ No newline at end of file diff --git a/docs/_docs/configuration.md b/docs/_docs/configuration.md index 375ace20..ba6dc366 100644 --- a/docs/_docs/configuration.md +++ b/docs/_docs/configuration.md @@ -19,7 +19,7 @@ A simple configuration file looks like this: ```json [{ "name": "default", - "addr": "192.168.50.4:9999" + "server": "192.168.50.4:9999" }] ``` @@ -28,5 +28,5 @@ Each cluster is a JSON object formed of the following fields. | Name | Type | Description | |:-----|:-----|:------------| | name | string; required | Cluster name, that will be referenced later in commands. | -| addr | string; required | Address to contact one of the masters of this cluster, specified as a [Finagle name](https://twitter.github.io/finagle/guide/Names.html). | -{: class="table table-striped"} +| server | string; required | Address to contact one of the masters of this cluster, specified as a [Finagle name](https://twitter.github.io/finagle/guide/Names.html). | +{: .table .table-striped} diff --git a/docs/_docs/install.md b/docs/_docs/install.md index 7794438d..6793871d 100644 --- a/docs/_docs/install.md +++ b/docs/_docs/install.md @@ -90,7 +90,7 @@ A simple configuration file looks like this: ```json [{ "name": "default", - "addr": "192.168.50.4:9999" + "server": "192.168.50.4:9999" }] ``` diff --git a/etc/vagrant/clusters.json b/etc/vagrant/clusters.json index 0304ac22..5cd2325d 100644 --- a/etc/vagrant/clusters.json +++ b/etc/vagrant/clusters.json @@ -1,6 +1,6 @@ [ { "name": "devcluster", - "addr": "192.168.50.4:9999" + "server": "192.168.50.4:9999" } ] \ No newline at end of file