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/04 05:15:13 UTC

[GitHub] [incubator-yunikorn-core] yangwwei commented on a change in pull request #165: [YUNIKORN-203] Set unmanaged queue max resource

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



##########
File path: pkg/common/resources/resources.go
##########
@@ -66,6 +67,16 @@ func NewResourceFromMap(m map[string]Quantity) *Resource {
 	return &Resource{Resources: m}
 }
 
+// Create a new resource from a string.
+// The string must be a json marshalled list of map[string]string.
+func NewResourceFromString(str string) (*Resource, error) {
+	var resMap map[string]string

Review comment:
       can we directly unmarshal the string to `*si.Resource`?




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