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/06/01 18:20:58 UTC

[GitHub] [incubator-yunikorn-core] yangwwei commented on a change in pull request #163: [YUNIKORN-195] Set unmanaged queue sort policy

yangwwei commented on a change in pull request #163:
URL: https://github.com/apache/incubator-yunikorn-core/pull/163#discussion_r433407525



##########
File path: pkg/cache/queue_info.go
##########
@@ -350,6 +353,40 @@ func (qi *QueueInfo) MarkQueueForRemoval() {
 	}
 }
 
+// Return a copy of the properties for this queue
+func (qi *QueueInfo) GetProperties() map[string]string {
+	qi.Lock()
+	defer qi.Unlock()
+	props := make(map[string]string)
+	for key, value := range qi.properties {
+		props[key] = value
+	}
+	return props
+}
+
+// Set the properties that the unmanaged child queue inherits from the parent
+// only called on create of a new unmanaged queue
+// This currently only sets the sort policy as it is set on the parent
+// Further implementation is part of YUNIKORN-193
+func (qi *QueueInfo) setTemplateProperties() {
+	qi.Lock()
+	defer qi.Unlock()
+	// for a leaf queue pull out all values from the template and set each of them
+	// See YUNIKORN-193: for now just copy one attr from parent
+	if qi.isLeaf {

Review comment:
       It looks like this is limiting to a 2 level setup.
   I wonder why it is not just inheriting the properties from its parent, no matter it is a leaf queue or not.




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