Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

Commit

Permalink
Rename the 'addr' field in 'server' in clusters configuration (for co…
Browse files Browse the repository at this point in the history
…nsistency)
  • Loading branch information
pvcnt committed Mar 30, 2018
1 parent 442a767 commit 603b079
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}
Expand Down
27 changes: 27 additions & 0 deletions accio/java/fr/cnrs/liris/accio/tools/cli/config/Cluster.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Accio is a platform to launch computer science experiments.
* Copyright (C) 2016-2018 Vincent Primault <v.primault@ucl.ac.uk>
*
* 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 <http://www.gnu.org/licenses/>.
*/

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)
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
6 changes: 3 additions & 3 deletions docs/_docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}]
```

Expand All @@ -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}
2 changes: 1 addition & 1 deletion docs/_docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}]
```

Expand Down
2 changes: 1 addition & 1 deletion etc/vagrant/clusters.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"name": "devcluster",
"addr": "192.168.50.4:9999"
"server": "192.168.50.4:9999"
}
]

0 comments on commit 603b079

Please sign in to comment.