[
https://issues.apache.org/jira/browse/MESOS-1974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14217620#comment-14217620
]
Jie Yu commented on MESOS-1974:
-------------------------------
commit 0966e6ec4a101702388c1331f7af5ce35f26e4da
Author: Jie Yu <[email protected]>
Date: Mon Nov 17 17:33:14 2014 -0800
Eliminated the copying in Resource addition and subtraction.
Review: https://reviews.apache.org/r/28143
commit 550f5fcd9579edc1546bcd342b170d333b2b8a44
Author: Jie Yu <[email protected]>
Date: Mon Nov 17 14:26:38 2014 -0800
Fixed a bug in operator -= for Value::Set.
Review: https://reviews.apache.org/r/28142
commit 5fbc6264aab8370925793aecb29d6d1f54d37cba
Author: Jie Yu <[email protected]>
Date: Fri Nov 14 22:33:28 2014 -0800
Replaced <= with contains() in C++ Resources.
Review: https://reviews.apache.org/r/28094
commit 7fa02175c5dd4c0a72193ea4089bf9a20633e543
Author: Jie Yu <[email protected]>
Date: Fri Nov 14 21:59:16 2014 -0800
Replaced size() with empty() in C++ Resources.
Review: https://reviews.apache.org/r/28093
commit a8d0244b20313e3deb2d3b8483353555a8147ac3
Author: Jie Yu <[email protected]>
Date: Fri Nov 14 14:45:05 2014 -0800
Always store validated and combined Resource objects in C++ Resources.
Review: https://reviews.apache.org/r/28091
commit 85728f85afaf6db0fd2e55cd8d7b2135a4941310
Author: Jie Yu <[email protected]>
Date: Tue Nov 18 21:35:54 2014 -0800
Killed ports allocation in C++ Resources.
Review: https://reviews.apache.org/r/28090
commit a01773b5fae7a434d508e04217aa3285e71fdc0a
Author: Jie Yu <[email protected]>
Date: Fri Nov 14 14:20:45 2014 -0800
Refactored operators for Resource object and made them private.
Review: https://reviews.apache.org/r/28089
commit 05b5ffa43c7e6b5178c1946162cd10d5984acfbe
Author: Jie Yu <[email protected]>
Date: Fri Nov 14 11:46:15 2014 -0800
A few style fixes for C++ Resources and tests.
Review: https://reviews.apache.org/r/28088
commit bdf2d9d410aeda6733a3d1ccdcd61ae7e89dac4a
Author: Jie Yu <[email protected]>
Date: Fri Nov 14 10:14:24 2014 -0800
Re-organized the functions in C++ Resources.
Review: https://reviews.apache.org/r/28078
> Update the C++ Resources abstraction for DiskInfo
> -------------------------------------------------
>
> Key: MESOS-1974
> URL: https://issues.apache.org/jira/browse/MESOS-1974
> Project: Mesos
> Issue Type: Improvement
> Reporter: Jie Yu
> Assignee: Jie Yu
> Fix For: 0.22.0
>
>
> As we introduce DiskInfo and reservation for Resource. We need to change the
> C++ Resources abstraction to properly deal with merge/split of resources with
> those additional fields.
> Also, the existing C++ 'Resources' interfaces are poorly designed. Some of
> them are confusing and unintuitive. Some of them are overloaded with too many
> functionalities. For instance,
> {noformat}
> bool operator <= (const Resource& left, const Resource& right);
> {noformat}
> This interface in non-intuitive because A <= B doesn't imply !(B <= A).
> {noformat}
> Resource operator + (const Resource& left, const Resource& right);
> {noformat}
> This one is also non-intuitive because if 'left' is not compatible with
> 'right', the result is 'left' (why not right???). Similar for operator '-'.
> {noformat}
> Option<Resource> Resources::get(const Resource& r) const;
> {noformat}
> This one assume Resources is flattened, but it might not be.
> As we start to introduce persistent disk resources (MESOS-1554), things will
> get more complicated. For example, one may want to get two types of 'disk()'
> functions: one returns the ephemeral disk bytes (with no disk info), one
> returns the total disk bytes (including ones that have disk info). We may
> wanna introduce a concept about Resource that indicates that a resource
> cannot be merged or split (e.g., atomic?).
> Since we need to change this class anyway. I wanna take this chance to
> refactor it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)