mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominic Hamon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-2314) remove unnecessary constants
Date Mon, 02 Feb 2015 23:40:36 GMT

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

Dominic Hamon commented on MESOS-2314:
--------------------------------------

https://reviews.apache.org/r/30531

> remove unnecessary constants
> ----------------------------
>
>                 Key: MESOS-2314
>                 URL: https://issues.apache.org/jira/browse/MESOS-2314
>             Project: Mesos
>          Issue Type: Improvement
>          Components: slave, technical debt
>            Reporter: Dominic Hamon
>            Assignee: Dominic Hamon
>            Priority: Minor
>              Labels: newbie
>
> In {{src/slave/paths.cpp}} a number of string constants are defined to describe the formats
of various paths. However, given there is a 1:1 mapping between the string constant and the
functions that build the paths, the code would be more readable if the format strings were
inline in the functions.
> In the cases where one constant depends on another (see the {{EXECUTOR_INFO_PATH, EXECUTOR_PATH,
FRAMEWORK_PATH, SLAVE_PATH, ROOT_PATH}} chain, for example) the function calls can just be
chained together.
> This will have the added benefit of removing some statically constructed string constants,
which are dangerous.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message