HuangTing-Yao commented on a change in pull request #285:
URL:
https://github.com/apache/incubator-yunikorn-core/pull/285#discussion_r691797140
##########
File path: pkg/common/utils.go
##########
@@ -113,3 +114,19 @@ func ConvertSITimeout(millis int64) time.Duration {
}
return time.Duration(result)
}
+
+func GetIgnoreUnschedulable(tag map[string]string) bool {
+ var ignore bool
+ var err error
+ if ignoreUnschedulable, ok :=
tag[interfaceCommon.DomainYuniKorn+interfaceCommon.KeyIgnoreUnschedulable]; !ok
{
+ // if there isn't ignoreUnschedulable tag, set it to false
+ ignore = false
+ } else {
+ ignore, err = strconv.ParseBool(ignoreUnschedulable)
+ if err != nil {
+ log.Logger().Warn("Failed to convert allocationTag
ignoreUnschedulable from string to bool")
+ ignore = false
+ }
+ }
+ return ignore
+}
Review comment:
Sure, done.
--
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]