kingamarton commented on a change in pull request #219:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/219#discussion_r542358608
##########
File path: pkg/common/resources/resources.go
##########
@@ -742,6 +743,37 @@ func ComponentWiseMin(left, right *Resource) *Resource {
return out
}
+// Returns a new Resource with the smallest value for each quantity in the
Resources
+// If either Resource passed in is nil the other Resource is returned
+// If a Resource type is missing from one of the Resource, it is considered
empty and the quantity from the other Resource is returned
+func ComponentWiseMinPermissive(left, right *Resource) *Resource {
+ out := NewResource()
+ if right == nil && left == nil {
+ return out
+ }
Review comment:
You are right! Changed to nil
----------------------------------------------------------------
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]