mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Mahler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-273) Add a Bytes abstraction akin to Duration
Date Mon, 28 Jan 2013 21:39:12 GMT

    [ https://issues.apache.org/jira/browse/MESOS-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13564709#comment-13564709
] 

Benjamin Mahler commented on MESOS-273:
---------------------------------------

Added a Bytes abstraction.
                
> Add a Bytes abstraction akin to Duration
> ----------------------------------------
>
>                 Key: MESOS-273
>                 URL: https://issues.apache.org/jira/browse/MESOS-273
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Benjamin Mahler
>            Assignee: Benjamin Mahler
>            Priority: Minor
>
> We've accumulated a lot of cruft around amount of memory/disk.
> via benh: "It's really time for a Bytes/Kilobytes/Megabytes/Gigabytes struct. Unlike
Duration, maybe it makes sense to just create a single Bytes class as the "base", or maybe
call it Bits? Not sure if Size or Data are descriptive enough."
> My thoughts:
> Size: typically refers to number of things (list::size, vector::size, map::size, ...)
> Data: typically refers to the data itself, rather than size (char* data, string data,
...)
> Bytes: although works fine at the unit level, like Seconds, seems odd as the base class
(makes me think of actual byte data, rather than # of bytes).
> Duration worked nicely to avoid doing Amount<Time>, however in this case it's tricker
to avoid Amount<Data> (  https://github.com/twitter/commons/tree/master/src/java/com/twitter/common/quantity
)
> I'd go with Bytes or Bits, preferably Bytes.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message