mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "haosdent (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (MESOS-5037) foreachkey behaviour is not expected in multimap
Date Sat, 26 Mar 2016 08:31:25 GMT

     [ https://issues.apache.org/jira/browse/MESOS-5037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

haosdent updated MESOS-5037:
----------------------------
    Labels: stout  (was: )

> foreachkey behaviour is not expected in multimap
> ------------------------------------------------
>
>                 Key: MESOS-5037
>                 URL: https://issues.apache.org/jira/browse/MESOS-5037
>             Project: Mesos
>          Issue Type: Bug
>          Components: stout
>            Reporter: haosdent
>              Labels: stout
>
> Currently the {{foreachkey}} implementation is 
> {code}
> #define foreachkey(VAR, COL)                    \
>   foreachpair (VAR, __foreach__::ignore, COL)
> {code}
> This works in most structures. But in multimap, one key may map to multi values. This
means there are multi pairs which have same key. So when call {{foreachkey}}, the {{key}}
would duplicated when iteration. My idea to solve this is we prefer call {{foreach}} on {{(COL).keys()}}
if {{keys()}} method exists in {{COL}}.



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

Mime
View raw message