Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for 'g' as a common suffix for memory #155

Closed
sabbyanandan opened this issue Nov 14, 2016 · 9 comments
Closed

Add support for 'g' as a common suffix for memory #155

sabbyanandan opened this issue Nov 14, 2016 · 9 comments
Assignees
Milestone

Comments

@sabbyanandan
Copy link
Contributor

sabbyanandan commented Nov 14, 2016

No description provided.

@sabbyanandan sabbyanandan added this to the 1.1.0.RELEASE milestone Nov 14, 2016
@gregturn
Copy link
Contributor

You sure we don't want to make that GB?

@markfisher
Copy link
Contributor

+1 I think "mb" and "gb" (case-insensitive) would be better

@ericbottard
Copy link
Contributor

Agreed, although maybe not exactly what https://en.wikipedia.org/wiki/Gigabyte says (ie 1000 instead of 1024).
The thing is, though, that -Xmx and friends use m and g, so people may be used to it as well..

@gregturn
Copy link
Contributor

Perhaps, but I was thinking of consistency with Spring Boot's http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-multipart-file-upload-configuration

@trisberg
Copy link
Member

Since there doesn't seem to be a commonly used way of defining this - Kubernetes uses MiB/GiB BTW - maybe we should just drop any suffix and have the parameter specify memory in megabytes, without a suffix. Then implementations can convert the amount to whatever unit used by their platform as they see fit.

@ericbottard
Copy link
Contributor

I'd vote for supporting the official (as seen in wikipedia) suffixes. My intent was for deployer-core to expose functionality for implementors to get the amount in the unit that best fits their needs (ie kubernetes could ask for "get the amount in megabytes" and always append MiB).
I'll work on a PR

@trisberg
Copy link
Member

Wouldn't "MiB" be the wrong suffix for megabytes?

@ericbottard
Copy link
Contributor

Got tricked by the wrong common-day usage. I should have written "get the amount in _mebi_bytes" and happen MiB.
You get the idea :)

@trisberg
Copy link
Member

I do, maybe we should just use getAmountInBytes and let the platform impls figure out how to use it. K8s uses bytes internally BTW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants