wilfred-s commented on code in PR #1088:
URL: https://github.com/apache/yunikorn-core/pull/1088#discussion_r3316179719


##########
pkg/scheduler/objects/queue.go:
##########
@@ -253,6 +253,22 @@ func (sq *Queue) getProperties() map[string]string {
        return props
 }
 
+// GetProperties returns a copy of the properties for this queue.
+// Will never return nil; can return an empty map.
+func (sq *Queue) GetProperties() map[string]string {
+       return sq.getProperties()
+}
+
+// MergeProperties merges the parent queue properties with config properties 
into this queue.
+// Config properties override parent properties. This should be called after 
ApplyConf during
+// config reload to re-apply inherited properties from the parent.
+// Lock protected.
+func (sq *Queue) MergeProperties(parent, config map[string]string) {

Review Comment:
   proposal for a different signature and implementation:
   ```
   func (sq *Queue) MergeProperties(config map[string]string) {
        parentProp := sq.parent.getProperties()
        sq.Lock()
        defer sq.Unlock()
        sq.mergeProperties(parentProp, config)
   }
   ```
   This saves us exposing the get properties in an exported function



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to