pull/42/head
Minh Doan 6 years ago
parent ca1d2083a1
commit 5fed2f231b
  1. 3
      aws-experiment-launch/experiment/commander/main.go
  2. 2
      aws-experiment-launch/utils/utils.py

@ -38,7 +38,6 @@ func readConfigFile() [][]string {
if err != nil { if err != nil {
log.Fatal("Failed to create local file", err) log.Fatal("Failed to create local file", err)
} }
defer out.Close()
// get remote config file // get remote config file
resp, err := http.Get(setting.configURL) resp, err := http.Get(setting.configURL)
@ -52,6 +51,7 @@ func readConfigFile() [][]string {
if err != nil { if err != nil {
log.Fatal("Failed to copy file") log.Fatal("Failed to copy file")
} }
out.Close()
// log config file // log config file
content, err := ioutil.ReadFile(configFile) content, err := ioutil.ReadFile(configFile)
@ -60,6 +60,7 @@ func readConfigFile() [][]string {
} }
log.Println("Successfully downloaded config") log.Println("Successfully downloaded config")
log.Println(string(content)) log.Println(string(content))
file, err := os.Open(configFile) file, err := os.Open(configFile)
defer file.Close() defer file.Close()
if err != nil { if err != nil {

@ -141,7 +141,7 @@ def generate_distribution_config(shard_number, client_number, ip_list, distribut
with open(distribution_config, "w") as fout: with open(distribution_config, "w") as fout:
for i in range(len(ip_list)): for i in range(len(ip_list)):
ip, node_name_tag = ip_list[i].split(" ") ip, node_name_tag = ip_list[i].split(" ")
elif leader_id < shard_number: if leader_id < shard_number:
fout.write("%s 9000 leader %d %s\n" % (ip, leader_id, node_name_tag)) fout.write("%s 9000 leader %d %s\n" % (ip, leader_id, node_name_tag))
leader_id = leader_id + 1 leader_id = leader_id + 1
elif validator_id < validator_number: elif validator_id < validator_number:

Loading…
Cancel
Save