HuangTing-Yao commented on a change in pull request #192:
URL: 
https://github.com/apache/incubator-yunikorn-k8shim/pull/192#discussion_r494049518



##########
File path: pkg/apis/yunikorn.apache.org/v1alpha1/type.go
##########
@@ -33,15 +34,42 @@ type Application struct {
        Status ApplicationStatus `json:"status"`
 }
 
-//Spec part
+// Spec part
 
 type ApplicationSpec struct {
-       MinMember         int32  `json:"minMember"`
-       Queue             string `json:"queue"`
-       MaxPendingSeconds int32  `json:"maxPendingSeconds,omitempty"`
+       Policy    SchedulePolicy `json:"schedulingPolicy"`
+       Queue     string         `json:"queue"`
+       TaskGroup []Task         `json:"taskGroups"`
 }
 
-//Status part
+type SchedulePolicy struct {
+       Policy    SchedulingPolicy      `json:"name"`
+       Parameter map[PolicyParam]int32 `json:"parameter,omitempty"`

Review comment:
       done.

##########
File path: pkg/apis/yunikorn.apache.org/v1alpha1/type.go
##########
@@ -33,15 +34,42 @@ type Application struct {
        Status ApplicationStatus `json:"status"`
 }
 
-//Spec part
+// Spec part
 
 type ApplicationSpec struct {
-       MinMember         int32  `json:"minMember"`
-       Queue             string `json:"queue"`
-       MaxPendingSeconds int32  `json:"maxPendingSeconds,omitempty"`
+       Policy    SchedulePolicy `json:"schedulingPolicy"`
+       Queue     string         `json:"queue"`
+       TaskGroup []Task         `json:"taskGroups"`
 }
 
-//Status part
+type SchedulePolicy struct {
+       Policy    SchedulingPolicy      `json:"name"`
+       Parameter map[PolicyParam]int32 `json:"parameter,omitempty"`
+}
+
+type SchedulingPolicy string
+
+const (
+       TryOnce    SchedulingPolicy = "TryOnce"
+       MaxRetry   SchedulingPolicy = "MaxRetry"
+       TryReserve SchedulingPolicy = "TryReserve"
+       TryPreempt SchedulingPolicy = "TryPreempt"
+)
+
+type PolicyParam string
+
+const (
+       Timeout     PolicyParam = "Timeout"
+       RetrySecond PolicyParam = "RetrySecond"
+)

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:
[email protected]


Reply via email to