mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Mathiske" <be...@mesosphere.io>
Subject Re: Review Request 23911: multihashmap.getKey() method (useful for fixing MESOS-947)
Date Fri, 25 Jul 2014 04:57:45 GMT


> On July 24, 2014, 5:51 p.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/multihashmap.hpp, line 42
> > <https://reviews.apache.org/r/23911/diff/1/?file=641620#file641620line42>
> >
> >     Aren't there potentially multiple keys for a particular value?
> >     
> >     i.e. Option<hashset<K> > getKeys(const V& value) const;
> >     
> >     Or should the calling code just iterate through the map for now to find the
first key?
> 
> Ben Mahler wrote:
>     Sorry, the Option was unnecessary. :)

I could add the method that returns all keys for a given value, but I do not have a use case
for it.


- Bernd


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23911/#review48705
-----------------------------------------------------------


On July 24, 2014, 5:40 p.m., Bernd Mathiske wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23911/
> -----------------------------------------------------------
> 
> (Updated July 24, 2014, 5:40 p.m.)
> 
> 
> Review request for mesos.
> 
> 
> Bugs: MESOS-947
>     https://issues.apache.org/jira/browse/MESOS-947
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Small extension of stout that is useful for fixing MESOS-947, but also in general. adding
a getKey() method to multihashmap, which finds a key given a value in the map.
> 
> A dependent Mesos patch fixing MESOS-947 will follow promptly.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/multihashmap.hpp ecda6a9 
> 
> Diff: https://reviews.apache.org/r/23911/diff/
> 
> 
> Testing
> -------
> 
> The method behaves as expected in the unit test for MESOS-947. I did not create stout
unit tests for it. (There is no precedence for testing multihashmap and this particular piece
of code is very straightforward.)
> 
> 
> Thanks,
> 
> Bernd Mathiske
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message