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

Michael Park commented on MESOS-8375:
-------------------------------------

{noformat}
commit e5bc824fbbc377f614b6e1d8a0be9b69c2af2c60
Author: Michael Park <mp...@apache.org>
Date:   Mon Jan 8 12:47:41 2018 -0800

    Replaced `convertResourceFormat` with `downgradeResources` accordingly.

    Review: https://reviews.apache.org/r/65031/
{noformat}
{noformat}
commit 15faeea9f369922b7ea623d87d8eb5e134a6a6c4
Author: Michael Park <mp...@apache.org>
Date:   Mon Jan 8 12:47:14 2018 -0800

    Replaced `convertResourceFormat` with `upgradeResources` accordingly.

    Review: https://reviews.apache.org/r/65030/
{noformat}
{noformat}
commit bc412f1094d19c51be92ca9f3d45f4f9003c75be
Author: Michael Park <mp...@apache.org>
Date:   Sat Jan 6 01:22:49 2018 -0800

    Replaced `ResourcesState::recoverResources` with `state::read`.

    We have 2 versions of `protobuf::(write|read)`. One that operates on
    a file descriptor, and another that works with file paths. The file
    descriptor version is used to open a file in append mode and appends
    to the file as events (e.g., status updates) arrive. We then read
    the messages back one at a time until we eventually read nothing,
    at which point `protobuf::read` returns a `None` indicating EOF.
    The path version on the other hand simply tries to read the full
    expected state, and returns an error if it's not able to.

    The existing `ResourcesState::recoverResources` used the file descriptor
    version of `protobuf::read`, reading one message at a time as described
    above. However, the resources being read back is written using
    `state::checkpoint`. `state::checkpoint` uses the path version of
    `protobuf::read`, and also provides atomic writes. We therefore do not
    need to deal with partial writes, and expect to read the full state.
    As such, we can now simply use `state::read` to read the resources back.

    Review: https://reviews.apache.org/r/65026
{noformat}

> Use protobuf reflection to simplify upgrading of resources.
> -----------------------------------------------------------
>
>                 Key: MESOS-8375
>                 URL: https://issues.apache.org/jira/browse/MESOS-8375
>             Project: Mesos
>          Issue Type: Task
>            Reporter: Michael Park
>            Assignee: Michael Park
>            Priority: Blocker
>
> This is the {{upgradeResources}} half of the protobuf-reflection-based 
> upgrade/downgrade of resources: 
> https://issues.apache.org/jira/browse/MESOS-8221
> We will also add {{state::read}} to complement {{state::checkpoint}} which 
> will be used to read protobufs from disk rather than {{protobuf::read}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to