You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2020/10/24 14:38:43 UTC

[GitHub] [incubator-yunikorn-k8shim] HuangTing-Yao opened a new pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

HuangTing-Yao opened a new pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201


   The simple web client and server to simulate  gang in application level.
   Also include the deploy shell script.
   Please review @yangwwei 
   Thanks.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201#issuecomment-715942347


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=h1) Report
   > Merging [#201](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=desc) into [YUNIKORN-2](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/c2106761cea7109beec15efb321baa1ee19a5658?el=desc) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           YUNIKORN-2     #201   +/-   ##
   ===========================================
     Coverage       58.29%   58.29%           
   ===========================================
     Files              33       33           
     Lines            2928     2928           
   ===========================================
     Hits             1707     1707           
     Misses           1149     1149           
     Partials           72       72           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=footer). Last update [c210676...b8861be](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] yangwwei merged pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
yangwwei merged pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201#issuecomment-715942347


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=h1) Report
   > Merging [#201](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=desc) into [YUNIKORN-2](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/c2106761cea7109beec15efb321baa1ee19a5658?el=desc) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           YUNIKORN-2     #201   +/-   ##
   ===========================================
     Coverage       58.29%   58.29%           
   ===========================================
     Files              33       33           
     Lines            2928     2928           
   ===========================================
     Hits             1707     1707           
     Misses           1149     1149           
     Partials           72       72           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=footer). Last update [c210676...8b28cf3](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] HuangTing-Yao commented on a change in pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
HuangTing-Yao commented on a change in pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201#discussion_r513181165



##########
File path: Makefile
##########
@@ -153,6 +156,32 @@ adm_image: admission
 	docker build ./deployments/image/admission -t ${REGISTRY}/yunikorn:admission-${VERSION}
 	@rm -f ./deployments/image/admission/${POD_ADMISSION_CONTROLLER_BINARY}
 
+# Build gang web server and client binary in a production ready version
+.PHONY: gang
+gang:

Review comment:
       done

##########
File path: Makefile
##########
@@ -153,6 +156,32 @@ adm_image: admission
 	docker build ./deployments/image/admission -t ${REGISTRY}/yunikorn:admission-${VERSION}
 	@rm -f ./deployments/image/admission/${POD_ADMISSION_CONTROLLER_BINARY}
 
+# Build gang web server and client binary in a production ready version
+.PHONY: gang
+gang:
+	@echo "building gang web client binary"
+	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
+	go build -a -o=${GANG_BIN_DIR}/${GANG_CLIENT_BINARY} -ldflags \
+	'-extldflags "-static" -X main.version=${VERSION} -X main.date=${DATE}' \
+	-tags netgo -installsuffix netgo \
+	./pkg/gang/gangclient
+	@echo "building gang web server binary"
+	go build -a -o=${GANG_BIN_DIR}/${GANG_SERVER_BINARY} -ldflags \
+	'-extldflags "-static" -X main.version=${VERSION} -X main.date=${DATE}' \
+	-tags netgo -installsuffix netgo \
+	./pkg/gang/webserver
+
+# Build gang test images based on the production ready version
+.PHONY: gang_image

Review comment:
       done

##########
File path: pkg/gang/webserver/handlers.go
##########
@@ -0,0 +1,56 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"log"
+	"net/http"
+
+	"github.com/gorilla/mux"
+)
+
+func writeHeader(w http.ResponseWriter) {
+	w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+	w.Header().Set("Access-Control-Allow-Origin", "*")
+	w.Header().Set("Access-Control-Allow-Credentials", "true")
+	w.Header().Set("Access-Control-Allow-Methods", "GET,POST,HEAD,OPTIONS")
+	w.Header().Set("Access-Control-Allow-Headers", "X-Requested-With,Content-Type,Accept,Origin")
+}
+
+func setTaskReady(w http.ResponseWriter, r *http.Request) {
+	writeHeader(w)
+	lock.Lock()
+	defer lock.Unlock()
+	vars := mux.Vars(r)
+	jobName := vars["jobName"]
+	jobMember[jobName]++
+	if err := json.NewEncoder(w).Encode(jobMember); err != nil {
+		log.Printf("Add task %s fail.", jobName)

Review comment:
       done

##########
File path: pkg/gang/webserver/handlers.go
##########
@@ -0,0 +1,56 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"log"
+	"net/http"
+
+	"github.com/gorilla/mux"
+)
+
+func writeHeader(w http.ResponseWriter) {
+	w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+	w.Header().Set("Access-Control-Allow-Origin", "*")
+	w.Header().Set("Access-Control-Allow-Credentials", "true")
+	w.Header().Set("Access-Control-Allow-Methods", "GET,POST,HEAD,OPTIONS")
+	w.Header().Set("Access-Control-Allow-Headers", "X-Requested-With,Content-Type,Accept,Origin")
+}
+
+func setTaskReady(w http.ResponseWriter, r *http.Request) {
+	writeHeader(w)
+	lock.Lock()
+	defer lock.Unlock()
+	vars := mux.Vars(r)
+	jobName := vars["jobName"]
+	jobMember[jobName]++
+	if err := json.NewEncoder(w).Encode(jobMember); err != nil {
+		log.Printf("Add task %s fail.", jobName)
+	}
+}
+
+func checkJobReady(w http.ResponseWriter, r *http.Request) {
+	writeHeader(w)
+	vars := mux.Vars(r)
+	jobName := vars["jobName"]
+	if err := json.NewEncoder(w).Encode(jobMember[jobName]); err != nil {
+		log.Printf("Check job %s Member fail", jobName)

Review comment:
       done

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)
+	addRequest(serviceIP, jobName)
+	// Check if we satisfy gang minMember or not every 2 second
+	for {
+		number := checkRequest(serviceIP, jobName)
+		if number >= memberAmount {
+			fmt.Println("satisfy gang minMember.")
+			fmt.Println("start to run job.")
+			time.Sleep(time.Duration(runtimeMin) * time.Minute) // means the application start running job
+			break
+		}
+		time.Sleep(2 * time.Second)

Review comment:
       done

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")

Review comment:
       done

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10

Review comment:
       done

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1

Review comment:
       done

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)
+	addRequest(serviceIP, jobName)
+	// Check if we satisfy gang minMember or not every 2 second
+	for {
+		number := checkRequest(serviceIP, jobName)
+		if number >= memberAmount {
+			fmt.Println("satisfy gang minMember.")
+			fmt.Println("start to run job.")
+			time.Sleep(time.Duration(runtimeMin) * time.Minute) // means the application start running job
+			break
+		}
+		time.Sleep(2 * time.Second)
+	}
+}
+
+func addRequest(ip string, jobName string) {
+	resp, err := http.Get("http://" + ip + ":8863" + "/ws/v1/add/" + jobName)
+	if err != nil {
+		fmt.Println(err)
+	}
+	defer resp.Body.Close()
+	body, err := ioutil.ReadAll(resp.Body)
+	if err != nil {
+		fmt.Println("Get request body fail.")

Review comment:
       done

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)
+	addRequest(serviceIP, jobName)
+	// Check if we satisfy gang minMember or not every 2 second
+	for {
+		number := checkRequest(serviceIP, jobName)
+		if number >= memberAmount {
+			fmt.Println("satisfy gang minMember.")
+			fmt.Println("start to run job.")
+			time.Sleep(time.Duration(runtimeMin) * time.Minute) // means the application start running job
+			break
+		}
+		time.Sleep(2 * time.Second)
+	}
+}
+
+func addRequest(ip string, jobName string) {
+	resp, err := http.Get("http://" + ip + ":8863" + "/ws/v1/add/" + jobName)
+	if err != nil {
+		fmt.Println(err)
+	}
+	defer resp.Body.Close()
+	body, err := ioutil.ReadAll(resp.Body)
+	if err != nil {
+		fmt.Println("Get request body fail.")
+	}
+	fmt.Println(string(body))
+}
+
+func checkRequest(ip string, jobName string) int {
+	resp, err := http.Get("http://" + ip + ":8863" + "/ws/v1/check/" + jobName)
+	var value int
+	if err != nil {
+		fmt.Println("Check jobMember fail.")

Review comment:
       done

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)
+	addRequest(serviceIP, jobName)
+	// Check if we satisfy gang minMember or not every 2 second
+	for {
+		number := checkRequest(serviceIP, jobName)
+		if number >= memberAmount {
+			fmt.Println("satisfy gang minMember.")
+			fmt.Println("start to run job.")
+			time.Sleep(time.Duration(runtimeMin) * time.Minute) // means the application start running job
+			break
+		}
+		time.Sleep(2 * time.Second)
+	}
+}
+
+func addRequest(ip string, jobName string) {
+	resp, err := http.Get("http://" + ip + ":8863" + "/ws/v1/add/" + jobName)
+	if err != nil {
+		fmt.Println(err)
+	}
+	defer resp.Body.Close()
+	body, err := ioutil.ReadAll(resp.Body)
+	if err != nil {
+		fmt.Println("Get request body fail.")
+	}
+	fmt.Println(string(body))
+}
+
+func checkRequest(ip string, jobName string) int {
+	resp, err := http.Get("http://" + ip + ":8863" + "/ws/v1/check/" + jobName)
+	var value int
+	if err != nil {
+		fmt.Println("Check jobMember fail.")
+	}
+	defer resp.Body.Close()
+	err = json.NewDecoder(resp.Body).Decode(&value)
+	if err != nil {
+		fmt.Println("Decode fail.")

Review comment:
       done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201#issuecomment-715942347


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=h1) Report
   > Merging [#201](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=desc) into [YUNIKORN-2](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/c2106761cea7109beec15efb321baa1ee19a5658?el=desc) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           YUNIKORN-2     #201   +/-   ##
   ===========================================
     Coverage       58.29%   58.29%           
   ===========================================
     Files              33       33           
     Lines            2928     2928           
   ===========================================
     Hits             1707     1707           
     Misses           1149     1149           
     Partials           72       72           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=footer). Last update [c210676...8f56d4e](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] HuangTing-Yao commented on a change in pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
HuangTing-Yao commented on a change in pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201#discussion_r513181040



##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)

Review comment:
       done

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1

Review comment:
       done

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)
+	addRequest(serviceIP, jobName)
+	// Check if we satisfy gang minMember or not every 2 second
+	for {
+		number := checkRequest(serviceIP, jobName)
+		if number >= memberAmount {
+			fmt.Println("satisfy gang minMember.")
+			fmt.Println("start to run job.")

Review comment:
       done

##########
File path: Makefile
##########
@@ -30,6 +30,9 @@ OUTPUT=_output
 RELEASE_BIN_DIR=${OUTPUT}/bin
 ADMISSION_CONTROLLER_BIN_DIR=${OUTPUT}/admission-controllers/
 POD_ADMISSION_CONTROLLER_BINARY=scheduler-admission-controller
+GANG_BIN_DIR=${OUTPUT}/gang
+GANG_CLIENT_BINARY=gangclient
+GANG_SERVER_BINARY=gangweb

Review comment:
       done

##########
File path: Makefile
##########
@@ -30,6 +30,9 @@ OUTPUT=_output
 RELEASE_BIN_DIR=${OUTPUT}/bin
 ADMISSION_CONTROLLER_BIN_DIR=${OUTPUT}/admission-controllers/
 POD_ADMISSION_CONTROLLER_BINARY=scheduler-admission-controller
+GANG_BIN_DIR=${OUTPUT}/gang
+GANG_CLIENT_BINARY=gangclient

Review comment:
       done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] codecov[bot] commented on pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201#issuecomment-715942347


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=h1) Report
   > Merging [#201](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=desc) into [YUNIKORN-2](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/c2106761cea7109beec15efb321baa1ee19a5658?el=desc) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           YUNIKORN-2     #201   +/-   ##
   ===========================================
     Coverage       58.29%   58.29%           
   ===========================================
     Files              33       33           
     Lines            2928     2928           
   ===========================================
     Hits             1707     1707           
     Misses           1149     1149           
     Partials           72       72           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=footer). Last update [c210676...b8861be](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] codecov[bot] edited a comment on pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201#issuecomment-715942347


   # [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=h1) Report
   > Merging [#201](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=desc) into [YUNIKORN-2](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/commit/c2106761cea7109beec15efb321baa1ee19a5658?el=desc) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201/graphs/tree.svg?width=650&height=150&src=pr&token=LZImIuvleR)](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff             @@
   ##           YUNIKORN-2     #201   +/-   ##
   ===========================================
     Coverage       58.29%   58.29%           
   ===========================================
     Files              33       33           
     Lines            2928     2928           
   ===========================================
     Hits             1707     1707           
     Misses           1149     1149           
     Partials           72       72           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=footer). Last update [c210676...8b28cf3](https://codecov.io/gh/apache/incubator-yunikorn-k8shim/pull/201?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] yangwwei commented on a change in pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
yangwwei commented on a change in pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201#discussion_r513230065



##########
File path: deployments/examples/gang/README.md
##########
@@ -0,0 +1,28 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
+# Gang in application level
+
+To run the `gangDeploy.sh` script with parameter:
+
+```shell script
+./cmd/gangDeploy.sh <job number> <pod amount> <gang member> <task run time(sec)>

Review comment:
       yes, I meant to say: let's remove `<pod amount>` : )




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] yangwwei commented on a change in pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
yangwwei commented on a change in pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201#discussion_r512266110



##########
File path: Makefile
##########
@@ -153,6 +156,32 @@ adm_image: admission
 	docker build ./deployments/image/admission -t ${REGISTRY}/yunikorn:admission-${VERSION}
 	@rm -f ./deployments/image/admission/${POD_ADMISSION_CONTROLLER_BINARY}
 
+# Build gang web server and client binary in a production ready version
+.PHONY: gang
+gang:

Review comment:
       rename this target to `simulation`

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)
+	addRequest(serviceIP, jobName)
+	// Check if we satisfy gang minMember or not every 2 second
+	for {
+		number := checkRequest(serviceIP, jobName)
+		if number >= memberAmount {
+			fmt.Println("satisfy gang minMember.")
+			fmt.Println("start to run job.")

Review comment:
       Not the job, this should be logged as "start to run the task".
   Also, we need some log to say "the task will run for XX minutes"

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)

Review comment:
       These ENV vars are required, I think we should do some check to make sure they present.
   Otherwise, the cmd should fail directly and give users some explicit error.
   Another thing is, all ENV vars should be using capital letters, e.g JOB_ID

##########
File path: Makefile
##########
@@ -30,6 +30,9 @@ OUTPUT=_output
 RELEASE_BIN_DIR=${OUTPUT}/bin
 ADMISSION_CONTROLLER_BIN_DIR=${OUTPUT}/admission-controllers/
 POD_ADMISSION_CONTROLLER_BINARY=scheduler-admission-controller
+GANG_BIN_DIR=${OUTPUT}/gang
+GANG_CLIENT_BINARY=gangclient
+GANG_SERVER_BINARY=gangweb

Review comment:
       instead of `gangweb`, let's rename it to  `simulation-gang-coordinator`

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1

Review comment:
       do not set a default value when the error is not nil, this can cover some issues up.
   directly log this error and fail the execution

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)
+	addRequest(serviceIP, jobName)
+	// Check if we satisfy gang minMember or not every 2 second
+	for {
+		number := checkRequest(serviceIP, jobName)
+		if number >= memberAmount {
+			fmt.Println("satisfy gang minMember.")
+			fmt.Println("start to run job.")
+			time.Sleep(time.Duration(runtimeMin) * time.Minute) // means the application start running job
+			break
+		}
+		time.Sleep(2 * time.Second)
+	}
+}
+
+func addRequest(ip string, jobName string) {
+	resp, err := http.Get("http://" + ip + ":8863" + "/ws/v1/add/" + jobName)
+	if err != nil {
+		fmt.Println(err)
+	}
+	defer resp.Body.Close()
+	body, err := ioutil.ReadAll(resp.Body)
+	if err != nil {
+		fmt.Println("Get request body fail.")
+	}
+	fmt.Println(string(body))
+}
+
+func checkRequest(ip string, jobName string) int {
+	resp, err := http.Get("http://" + ip + ":8863" + "/ws/v1/check/" + jobName)
+	var value int
+	if err != nil {
+		fmt.Println("Check jobMember fail.")

Review comment:
       return the error

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)
+	addRequest(serviceIP, jobName)
+	// Check if we satisfy gang minMember or not every 2 second
+	for {
+		number := checkRequest(serviceIP, jobName)
+		if number >= memberAmount {
+			fmt.Println("satisfy gang minMember.")
+			fmt.Println("start to run job.")
+			time.Sleep(time.Duration(runtimeMin) * time.Minute) // means the application start running job
+			break
+		}
+		time.Sleep(2 * time.Second)
+	}
+}
+
+func addRequest(ip string, jobName string) {
+	resp, err := http.Get("http://" + ip + ":8863" + "/ws/v1/add/" + jobName)
+	if err != nil {
+		fmt.Println(err)
+	}
+	defer resp.Body.Close()
+	body, err := ioutil.ReadAll(resp.Body)
+	if err != nil {
+		fmt.Println("Get request body fail.")
+	}
+	fmt.Println(string(body))
+}
+
+func checkRequest(ip string, jobName string) int {
+	resp, err := http.Get("http://" + ip + ":8863" + "/ws/v1/check/" + jobName)
+	var value int
+	if err != nil {
+		fmt.Println("Check jobMember fail.")
+	}
+	defer resp.Body.Close()
+	err = json.NewDecoder(resp.Body).Decode(&value)
+	if err != nil {
+		fmt.Println("Decode fail.")

Review comment:
       return the error

##########
File path: Makefile
##########
@@ -30,6 +30,9 @@ OUTPUT=_output
 RELEASE_BIN_DIR=${OUTPUT}/bin
 ADMISSION_CONTROLLER_BIN_DIR=${OUTPUT}/admission-controllers/
 POD_ADMISSION_CONTROLLER_BINARY=scheduler-admission-controller
+GANG_BIN_DIR=${OUTPUT}/gang
+GANG_CLIENT_BINARY=gangclient

Review comment:
       rename `gangclient` to `simulation-gang-worker`

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1

Review comment:
       `rumtimeMin` --->  `taskExecutionSeconds`
   We'd prefer to use seconds, that is more flexible to configure

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)
+	addRequest(serviceIP, jobName)
+	// Check if we satisfy gang minMember or not every 2 second
+	for {
+		number := checkRequest(serviceIP, jobName)
+		if number >= memberAmount {
+			fmt.Println("satisfy gang minMember.")
+			fmt.Println("start to run job.")
+			time.Sleep(time.Duration(runtimeMin) * time.Minute) // means the application start running job
+			break
+		}
+		time.Sleep(2 * time.Second)
+	}
+}
+
+func addRequest(ip string, jobName string) {
+	resp, err := http.Get("http://" + ip + ":8863" + "/ws/v1/add/" + jobName)
+	if err != nil {
+		fmt.Println(err)
+	}
+	defer resp.Body.Close()
+	body, err := ioutil.ReadAll(resp.Body)
+	if err != nil {
+		fmt.Println("Get request body fail.")

Review comment:
       return an error, instead of just printing the log

##########
File path: pkg/gang/webserver/handlers.go
##########
@@ -0,0 +1,56 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"log"
+	"net/http"
+
+	"github.com/gorilla/mux"
+)
+
+func writeHeader(w http.ResponseWriter) {
+	w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+	w.Header().Set("Access-Control-Allow-Origin", "*")
+	w.Header().Set("Access-Control-Allow-Credentials", "true")
+	w.Header().Set("Access-Control-Allow-Methods", "GET,POST,HEAD,OPTIONS")
+	w.Header().Set("Access-Control-Allow-Headers", "X-Requested-With,Content-Type,Accept,Origin")
+}
+
+func setTaskReady(w http.ResponseWriter, r *http.Request) {
+	writeHeader(w)
+	lock.Lock()
+	defer lock.Unlock()
+	vars := mux.Vars(r)
+	jobName := vars["jobName"]
+	jobMember[jobName]++
+	if err := json.NewEncoder(w).Encode(jobMember); err != nil {
+		log.Printf("Add task %s fail.", jobName)

Review comment:
       this should return the client an error, not just a server-side log
   you can refer to, e.g https://github.com/apache/incubator-yunikorn-core/blob/e9ab51a96afc6a9ce9a320db800f514cf5e7ab50/pkg/webservice/handlers.go#L56

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10
+	}
+	runtimeMin, err := strconv.Atoi(os.Getenv("runtimeMin"))
+	if err != nil {
+		runtimeMin = 1
+	}
+	serviceName = strings.ToUpper(serviceName) + "_SERVICE_HOST"
+	serviceIP := os.Getenv(serviceName)
+	addRequest(serviceIP, jobName)
+	// Check if we satisfy gang minMember or not every 2 second
+	for {
+		number := checkRequest(serviceIP, jobName)
+		if number >= memberAmount {
+			fmt.Println("satisfy gang minMember.")
+			fmt.Println("start to run job.")
+			time.Sleep(time.Duration(runtimeMin) * time.Minute) // means the application start running job
+			break
+		}
+		time.Sleep(2 * time.Second)

Review comment:
       if the condition is not met, we need to print some logs as well.
   E.g how many members are running out there, and what is the minMember, can you add that log as well?

##########
File path: Makefile
##########
@@ -153,6 +156,32 @@ adm_image: admission
 	docker build ./deployments/image/admission -t ${REGISTRY}/yunikorn:admission-${VERSION}
 	@rm -f ./deployments/image/admission/${POD_ADMISSION_CONTROLLER_BINARY}
 
+# Build gang web server and client binary in a production ready version
+.PHONY: gang
+gang:
+	@echo "building gang web client binary"
+	CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
+	go build -a -o=${GANG_BIN_DIR}/${GANG_CLIENT_BINARY} -ldflags \
+	'-extldflags "-static" -X main.version=${VERSION} -X main.date=${DATE}' \
+	-tags netgo -installsuffix netgo \
+	./pkg/gang/gangclient
+	@echo "building gang web server binary"
+	go build -a -o=${GANG_BIN_DIR}/${GANG_SERVER_BINARY} -ldflags \
+	'-extldflags "-static" -X main.version=${VERSION} -X main.date=${DATE}' \
+	-tags netgo -installsuffix netgo \
+	./pkg/gang/webserver
+
+# Build gang test images based on the production ready version
+.PHONY: gang_image

Review comment:
       rename this to `simulation_image`

##########
File path: pkg/gang/webserver/handlers.go
##########
@@ -0,0 +1,56 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"log"
+	"net/http"
+
+	"github.com/gorilla/mux"
+)
+
+func writeHeader(w http.ResponseWriter) {
+	w.Header().Set("Content-Type", "application/json; charset=UTF-8")
+	w.Header().Set("Access-Control-Allow-Origin", "*")
+	w.Header().Set("Access-Control-Allow-Credentials", "true")
+	w.Header().Set("Access-Control-Allow-Methods", "GET,POST,HEAD,OPTIONS")
+	w.Header().Set("Access-Control-Allow-Headers", "X-Requested-With,Content-Type,Accept,Origin")
+}
+
+func setTaskReady(w http.ResponseWriter, r *http.Request) {
+	writeHeader(w)
+	lock.Lock()
+	defer lock.Unlock()
+	vars := mux.Vars(r)
+	jobName := vars["jobName"]
+	jobMember[jobName]++
+	if err := json.NewEncoder(w).Encode(jobMember); err != nil {
+		log.Printf("Add task %s fail.", jobName)
+	}
+}
+
+func checkJobReady(w http.ResponseWriter, r *http.Request) {
+	writeHeader(w)
+	vars := mux.Vars(r)
+	jobName := vars["jobName"]
+	if err := json.NewEncoder(w).Encode(jobMember[jobName]); err != nil {
+		log.Printf("Check job %s Member fail", jobName)

Review comment:
       return an error, see comment above

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")

Review comment:
       instead of calling it `jobName`, let's be consistent to use `jobID`

##########
File path: pkg/gang/gangclient/gangclient.go
##########
@@ -0,0 +1,84 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+
+package main
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"strconv"
+	"strings"
+	"time"
+)
+
+func main() {
+	jobName := os.Getenv("jobName")
+	serviceName := os.Getenv("serviceName")
+	memberAmount, err := strconv.Atoi(os.Getenv("memberAmount"))
+	if err != nil {
+		memberAmount = 10

Review comment:
       do not set a default value when the error is not nil, this can cover some issues up.
   directly log this error and fail the execution




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] HuangTing-Yao commented on a change in pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
HuangTing-Yao commented on a change in pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201#discussion_r513229378



##########
File path: deployments/examples/gang/README.md
##########
@@ -0,0 +1,28 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
+# Gang in application level
+
+To run the `gangDeploy.sh` script with parameter:
+
+```shell script
+./cmd/gangDeploy.sh <job number> <pod amount> <gang member> <task run time(sec)>

Review comment:
       So, it should be `./cmd/gangDeploy.sh <job number> <gang member> <task run time(sec)>` , right?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-yunikorn-k8shim] yangwwei commented on a change in pull request #201: [YUNIKORN-448] Create a docker image to simulate app that requires gang scheduling

Posted by GitBox <gi...@apache.org>.
yangwwei commented on a change in pull request #201:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/201#discussion_r513222075



##########
File path: deployments/examples/gang/gangweb.yaml
##########
@@ -0,0 +1,32 @@
+#

Review comment:
       rename to `gang-coordinator.yaml`

##########
File path: deployments/examples/gang/service.yaml
##########
@@ -0,0 +1,31 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1

Review comment:
       I don't think we need a separate file for this. this can be part of the `gang-coordinator.yaml`.

##########
File path: deployments/examples/gang/README.md
##########
@@ -0,0 +1,28 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
+# Gang in application level
+
+To run the `gangDeploy.sh` script with parameter:
+
+```shell script
+./cmd/gangDeploy.sh <job number> <pod amount> <gang member> <task run time(sec)>

Review comment:
       Where is a `podAmount` and a `gangMember`? 
   To simplify this, I think we can only have 1 parameter, `gangMember`.

##########
File path: deployments/examples/gang/README.md
##########
@@ -0,0 +1,28 @@
+<!--
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+-->
+
+# Gang in application level

Review comment:
       > Can we change the text to the following:
   
   Gang scheduling simulation
   
   The following script runs a given number of jobs, and each one is a simulated job that requires gang scheduling support. Where the job only starts to execute its tasks when the cluster has the min member of instances running. 
   
   ```shell script
   ./cmd/gangDeploy.sh <job number> <pod amount> <gang member> <task run time(sec)>
   ```
   
   Note, if you prefer to manually launch such jobs, please refer to the `gang-coordinator.yaml`, `gang-job.yaml`. Where:
   
   1. `gang-coordinator.yaml`: the coordinator service used to coordinate the execution of each job's tasks
   2. `gang-job.yaml`: the simulated job that requires gang members to be started before executing its tasks




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org