yangwwei commented on a change in pull request #49:
URL:
https://github.com/apache/incubator-yunikorn-web/pull/49#discussion_r529817857
##########
File path: src/app/utils/common.util.ts
##########
@@ -33,18 +33,18 @@ export class CommonUtil {
let unit = 'MB';
let toValue = +value;
- if (toValue / 1024 >= 0.9) {
- toValue = toValue / 1024;
+ if (toValue / 1000 >= 1) {
+ toValue = toValue / 1000;
Review comment:
Here is the code to parse the resources:
https://github.com/apache/incubator-yunikorn-k8shim/blob/03f36354820033a22556f1c82d7be8ef815a99f4/pkg/common/resource.go#L89-L118.
We are calling the K8s utility `resource.ParseQuantity()`, so it supports both
MB, and MiB. When sending to the core, the shim uses the `MB` as the
convention. So this looks good.
----------------------------------------------------------------
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]