(node string)
| 180 | } |
| 181 | |
| 182 | func stopDatanodeInSpecificNode(node string) error { |
| 183 | config, err := readConfig() |
| 184 | if err != nil { |
| 185 | return err |
| 186 | } |
| 187 | for id, n := range config.DeployHostsList.DataNode { |
| 188 | if n.Hosts == node { |
| 189 | status, err := stopContainerOnNode(RemoteUser, node, DataNodeName+strconv.Itoa(id+1)) |
| 190 | if err != nil { |
| 191 | return err |
| 192 | } |
| 193 | log.Println(status) |
| 194 | status, err = rmContainerOnNode(RemoteUser, node, DataNodeName+strconv.Itoa(id+1)) |
| 195 | if err != nil { |
| 196 | return err |
| 197 | } |
| 198 | log.Println(status) |
| 199 | } |
| 200 | } |
| 201 | return nil |
| 202 | } |
| 203 | |
| 204 | func stopAllDataNode() error { |
| 205 | files, err := ioutil.ReadDir(ConfDir) |
no test coverage detected