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/29 22:46:54 UTC

[GitHub] [incubator-yunikorn-k8shim] yangwwei commented on a change in pull request #203: [YUNIKORN-453] add taskGroup info to apps/tasks

yangwwei commented on a change in pull request #203:
URL: https://github.com/apache/incubator-yunikorn-k8shim/pull/203#discussion_r514610276



##########
File path: pkg/cache/application.go
##########
@@ -28,25 +28,29 @@ import (
 	v1 "k8s.io/api/core/v1"
 
 	"github.com/apache/incubator-yunikorn-core/pkg/api"
+	"github.com/apache/incubator-yunikorn-k8shim/pkg/apis/yunikorn.apache.org/v1alpha1"
 	"github.com/apache/incubator-yunikorn-k8shim/pkg/appmgmt/interfaces"
 	"github.com/apache/incubator-yunikorn-k8shim/pkg/common/constants"
 	"github.com/apache/incubator-yunikorn-k8shim/pkg/common/events"
+	"github.com/apache/incubator-yunikorn-k8shim/pkg/common/utils"
 	"github.com/apache/incubator-yunikorn-k8shim/pkg/conf"
 	"github.com/apache/incubator-yunikorn-k8shim/pkg/dispatcher"
 	"github.com/apache/incubator-yunikorn-k8shim/pkg/log"
 	"github.com/apache/incubator-yunikorn-scheduler-interface/lib/go/si"
 )
 
 type Application struct {
-	applicationID string
-	queue         string
-	partition     string
-	user          string
-	taskMap       map[string]*Task
-	tags          map[string]string
-	sm            *fsm.FSM
-	lock          *sync.RWMutex
-	schedulerAPI  api.SchedulerAPI
+	applicationID    string
+	queue            string
+	partition        string
+	user             string
+	taskMap          map[string]*Task
+	tags             map[string]string
+	schedulingPolicy *v1alpha1.SchedulingPolicy
+	taskGroups       []*v1alpha1.TaskGroup

Review comment:
       Hi @kingamarton I think we should depend on the CRD types. The CRD types are defined in the API package, they are supposed to represent some high-level common fields for YK. TaskGroups is one of them. Having intermittent structs for them seems not necessary for me.




----------------------------------------------------------------
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