pbacsko commented on code in PR #897:
URL: https://github.com/apache/yunikorn-core/pull/897#discussion_r1697211204
##########
pkg/common/resources/tracked_resources.go:
##########
@@ -103,3 +103,46 @@ func (tr *TrackedResource)
AggregateTrackedResource(instType string,
}
tr.TrackedResourceMap[instType] = aggregatedResourceTime
}
+
+func EqualsTracked(left, right *TrackedResource) bool {
+ if left == right {
+ return true
+ }
+
+ if left == nil || right == nil {
+ return false
+ }
+
+ equals := true
+ for k, v := range left.TrackedResourceMap {
+ inner, ok := right.TrackedResourceMap[k]
+ if !ok {
+ return false
+ }
+
+ equals = equals && equalsMapContents(v, inner)
+ }
+
+ return equals
+}
+
+// basically the same as Equals()
Review Comment:
comment can be deleted
--
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]