|
1 | 1 | /* |
2 | | - Copyright 2016 GitHub Inc. |
| 2 | + Copyright 2021 GitHub Inc. |
3 | 3 | See https://github.com/github/gh-ost/blob/master/LICENSE |
4 | 4 | */ |
5 | 5 |
|
@@ -146,7 +146,8 @@ func (this *Server) applyServerCommand(command string, writer *bufio.Writer) (pr |
146 | 146 | fmt.Fprint(writer, `available commands: |
147 | 147 | status # Print a detailed status message |
148 | 148 | sup # Print a short status message |
149 | | -coordinates # Print the currently inspected coordinates |
| 149 | +coordinates # Print the currently inspected coordinates |
| 150 | +hosts # Print the list of hosts used to perform the migration (hostname, applier and migrator) |
150 | 151 | chunk-size=<newsize> # Set a new chunk-size |
151 | 152 | dml-batch-size=<newsize> # Set a new dml-batch-size |
152 | 153 | nice-ratio=<ratio> # Set a new nice-ratio, immediate sleep after each row-copy operation, float (examples: 0 is aggressive, 0.7 adds 70% runtime, 1.0 doubles runtime, 2.0 triples runtime, ...) |
@@ -177,6 +178,16 @@ help # This message |
177 | 178 | } |
178 | 179 | return NoPrintStatusRule, fmt.Errorf("coordinates are read-only") |
179 | 180 | } |
| 181 | + case "hosts": |
| 182 | + fields := map[string]interface{}{ |
| 183 | + "Applier": this.migrationContext.GetApplierHostname(), |
| 184 | + "Hostname": this.migrationContext.Hostname, |
| 185 | + "Inspector": this.migrationContext.GetInspectorHostname(), |
| 186 | + } |
| 187 | + for key, val := range fields { |
| 188 | + fmt.Fprintf(writer, "%s: %v", key, val) |
| 189 | + } |
| 190 | + return NoPrintStatusRule, nil |
180 | 191 | case "chunk-size": |
181 | 192 | { |
182 | 193 | if argIsQuestion { |
|
0 commit comments