You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Vinod Kone <vi...@gmail.com> on 2013/08/10 10:17:06 UTC

Review Request 13464: Implemented a linkedhashmap that preserves the insertion order of keys of a hashmap.

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

Review request for mesos, Benjamin Hindman and Ben Mahler.


Repository: mesos-git


Description
-------

See summary.


Diffs
-----

  3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
  3rdparty/libprocess/3rdparty/stout/Makefile.am 770378d11d30e1e222e418c1839affd9d4ffe8d3 
  3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/13464/diff/


Testing
-------

make check


Thanks,

Vinod Kone


Re: Review Request 13464: Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.

Posted by Vinod Kone <vi...@gmail.com>.

> On Aug. 12, 2013, 8:43 p.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp, line 12
> > <https://reviews.apache.org/r/13464/diff/4/?file=340073#file340073line12>
> >
> >     Can this extend from stout hashmap?
> >     
> >     s/Map/map/

I looked into extending hashmap, but it is a bit complicated. I would have to override all modifying members of stout::hashmap and boost:unordered_map to ensure that link pointers are properly maintained.


Why s/Map/map/ ? FWIW, I followed Java's convention for capitalization.


- Vinod


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


On Aug. 12, 2013, 5:49 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13464/
> -----------------------------------------------------------
> 
> (Updated Aug. 12, 2013, 5:49 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am 770378d11d30e1e222e418c1839affd9d4ffe8d3 
>   3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/13464/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>


Re: Review Request 13464: Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13464/#review25032
-----------------------------------------------------------



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49190>

    Can this extend from stout hashmap?
    
    s/Map/map/


- Ben Mahler


On Aug. 12, 2013, 5:49 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13464/
> -----------------------------------------------------------
> 
> (Updated Aug. 12, 2013, 5:49 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am 770378d11d30e1e222e418c1839affd9d4ffe8d3 
>   3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/13464/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>


Re: Review Request 13464: Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.

Posted by Vinod Kone <vi...@gmail.com>.

> On Aug. 13, 2013, 2:15 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp, line 8
> > <https://reviews.apache.org/r/13464/diff/4/?file=340073#file340073line8>
> >
> >     s/hashmap/HashMap/ then? ;)
> >     
> >     Eventually we can rename stout's data structures to use CamelCase.

yup, from talking to BenH that was the plan. we can do the renaming of hashmap (if necessary) then.


> On Aug. 13, 2013, 2:15 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp, lines 15-16
> > <https://reviews.apache.org/r/13464/diff/4/?file=340073#file340073line15>
> >
> >     Can you move these typedefs down into the private block where they are used?

They are used in the public methods. FWIW, this is the sytle followed by stout::cache and boost.


> On Aug. 13, 2013, 2:15 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp, line 12
> > <https://reviews.apache.org/r/13464/diff/4/?file=340073#file340073line12>
> >
> >     The advantage would be that LinkedHashMap could be used as a drop-in replacement for hashmap or map, since it would conform to the map interface.
> >     
> >     Extending from hashmap would require overriding the element access and modifier functions:
> >     
> >     [], insert, erase, swap, clear
> >     
> >     However, you would not need to implement many access operations:
> >     
> >     empty, size, max_size, find, count, lower_bound, upper_bound, equal_range, get_allocator, key_comp, value_comp
> >     
> >     The one scary bit would be that this will break when C++11 support is added so we would possibly want to #ifdef in the C++11 map functions.
> >     
> >     At the very least, can you implement the iteration operations since they were the whole point of adding this?
> >     
> >     begin(), end(), rbegin(), rend()
> >     
> >     These would let us do foreachvalue and foreachkey, which would be awesome! No copying of values needed :)

In the interest of time, I've added a TODO for extending from hashmap and adding iterators.


> On Aug. 13, 2013, 2:15 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp, lines 27-37
> > <https://reviews.apache.org/r/13464/diff/4/?file=340073#file340073line27>
> >
> >     Why does LinkedHashMap contain put(), whereas hashmap does not contain put()?
> >     
> >     What does put provide vs the [] operator?
> >     
> >     map.put(key, value)
> >     map[key] = value

i added that before i added []. killed 'put' since i never really used it outside tests.


> On Aug. 13, 2013, 2:15 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp, lines 59-69
> > <https://reviews.apache.org/r/13464/diff/4/?file=340073#file340073line59>
> >
> >     Not yours but hashmap returns hashsets for keys and values, can you add a TODO or update hashmap to return lists? values() should definitely not be returning a hashset there (that's totally broken since hashmaps can contain duplicate values). Not sure how much you want to fix so TODO(vinod) or TODO(bmahler) is fine if you want to delegate. :)
> >     
> >     I like what you have here, we could optionally add the following to both LinkedHashMap and hashmap, akin to python:
> >     
> >     hashset<Key> keyset() const;
> >     
> >     This would also unbreak code that relies on hashmap.keys() returning a hashset.

Added a TODO in hashmap. I don't see a reason for returning hashsets in linkedhashmap because the whole point of it is get keys and values in the insertion order. If we need it later for some reason, I prefer to add it then.


> On Aug. 13, 2013, 2:15 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp, lines 65-66
> > <https://reviews.apache.org/r/13464/diff/4/?file=340073#file340073line65>
> >
> >     You could use foreachvalue if you have the iterator operations, which would avoid looking up each key in the map :)
> >     
> >     If not, then can you iterate over the values directly instead of the keys?

I can't iterate on values because 'keys' contains keys in the insertion order.


- Vinod


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


On Aug. 12, 2013, 5:49 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13464/
> -----------------------------------------------------------
> 
> (Updated Aug. 12, 2013, 5:49 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am 770378d11d30e1e222e418c1839affd9d4ffe8d3 
>   3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/13464/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>


Re: Review Request 13464: Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.

Posted by Ben Mahler <be...@gmail.com>.

> On Aug. 13, 2013, 2:15 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp, lines 15-16
> > <https://reviews.apache.org/r/13464/diff/4/?file=340073#file340073line15>
> >
> >     Can you move these typedefs down into the private block where they are used?
> 
> Vinod Kone wrote:
>     They are used in the public methods. FWIW, this is the sytle followed by stout::cache and boost.

Ah so they have to be here?


> On Aug. 13, 2013, 2:15 a.m., Ben Mahler wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp, lines 59-69
> > <https://reviews.apache.org/r/13464/diff/4/?file=340073#file340073line59>
> >
> >     Not yours but hashmap returns hashsets for keys and values, can you add a TODO or update hashmap to return lists? values() should definitely not be returning a hashset there (that's totally broken since hashmaps can contain duplicate values). Not sure how much you want to fix so TODO(vinod) or TODO(bmahler) is fine if you want to delegate. :)
> >     
> >     I like what you have here, we could optionally add the following to both LinkedHashMap and hashmap, akin to python:
> >     
> >     hashset<Key> keyset() const;
> >     
> >     This would also unbreak code that relies on hashmap.keys() returning a hashset.
> 
> Vinod Kone wrote:
>     Added a TODO in hashmap. I don't see a reason for returning hashsets in linkedhashmap because the whole point of it is get keys and values in the insertion order. If we need it later for some reason, I prefer to add it then.

Sounds good, if/when we add keyset() to hashmap, we should add it here as well. hashmap and LinkedHashMap should be compatible, with the only difference being that the iteration order / key order is different.


- Ben


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


On Aug. 13, 2013, 11:34 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13464/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2013, 11:34 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am e465fd1b7c22a649a59e69a29c0c7f3e9198188b 
>   3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 796cb505fe538d5f65c0f8ea1fa827155f2bb2c1 
>   3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/13464/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>


Re: Review Request 13464: Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13464/#review25049
-----------------------------------------------------------



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49207>

    #include <utility>



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49206>

    #include <stout/option.hpp>



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49205>

    s/hashmap/HashMap/ then? ;)
    
    Eventually we can rename stout's data structures to use CamelCase.



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49209>

    The advantage would be that LinkedHashMap could be used as a drop-in replacement for hashmap or map, since it would conform to the map interface.
    
    Extending from hashmap would require overriding the element access and modifier functions:
    
    [], insert, erase, swap, clear
    
    However, you would not need to implement many access operations:
    
    empty, size, max_size, find, count, lower_bound, upper_bound, equal_range, get_allocator, key_comp, value_comp
    
    The one scary bit would be that this will break when C++11 support is added so we would possibly want to #ifdef in the C++11 map functions.
    
    At the very least, can you implement the iteration operations since they were the whole point of adding this?
    
    begin(), end(), rbegin(), rend()
    
    These would let us do foreachvalue and foreachkey, which would be awesome! No copying of values needed :)



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49204>

    Can you move these typedefs down into the private block where they are used?



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49210>

    { on new line, ditto for the rest below



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49212>

    Why does LinkedHashMap contain put(), whereas hashmap does not contain put()?
    
    What does put provide vs the [] operator?
    
    map.put(key, value)
    map[key] = value



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49213>

    const



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49214>

    s/void/size_t to conform to std::map interface
    
    http://www.cplusplus.com/reference/map/map/erase/



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49215>

    return values_.erase(key) here and return 0 below



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49216>

    Not yours but hashmap returns hashsets for keys and values, can you add a TODO or update hashmap to return lists? values() should definitely not be returning a hashset there (that's totally broken since hashmaps can contain duplicate values). Not sure how much you want to fix so TODO(vinod) or TODO(bmahler) is fine if you want to delegate. :)
    
    I like what you have here, we could optionally add the following to both LinkedHashMap and hashmap, akin to python:
    
    hashset<Key> keyset() const;
    
    This would also unbreak code that relies on hashmap.keys() returning a hashset.



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49217>

    You could use foreachvalue if you have the iterator operations, which would avoid looking up each key in the map :)
    
    If not, then can you iterate over the values directly instead of the keys?



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49218>

    s/int/size_t/



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49208>

    How about keys_.empty()?



3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp
<https://reviews.apache.org/r/13464/#comment49219>

    Looks like there's no need for the fixture?



3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp
<https://reviews.apache.org/r/13464/#comment49220>

    expect erase to return 1 / 0 if present / missing.
    
    End comment with period.



3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp
<https://reviews.apache.org/r/13464/#comment49221>

    s/5/keys.size()/
    
    Also this check is redundant with the one below, no?


- Ben Mahler


On Aug. 12, 2013, 5:49 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13464/
> -----------------------------------------------------------
> 
> (Updated Aug. 12, 2013, 5:49 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am 770378d11d30e1e222e418c1839affd9d4ffe8d3 
>   3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/13464/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>


Re: Review Request 13464: Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13464/
-----------------------------------------------------------

(Updated Aug. 14, 2013, 6:03 p.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

benm's. nnfr.


Repository: mesos-git


Description
-------

See summary.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
  3rdparty/libprocess/3rdparty/stout/Makefile.am e465fd1b7c22a649a59e69a29c0c7f3e9198188b 
  3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 796cb505fe538d5f65c0f8ea1fa827155f2bb2c1 
  3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/13464/diff/


Testing
-------

make check


Thanks,

Vinod Kone


Re: Review Request 13464: Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.

Posted by Vinod Kone <vi...@gmail.com>.

> On Aug. 14, 2013, 12:15 a.m., Ben Mahler wrote:
> > Looks good, although there are a few things I find unfortunate:
> >  (1) Users will have to copy all keys / values if they want to iterate on the map.
> >  (2) LinkedHashMap and hashmap are incomatible (Different APIs w.r.t. to keys() and values()).
> >  (3) LinkedHashMap is not compatible with the map interface.
> > 
> > I can take these on after this is committed if you would like to punt in the interest of finishing up slave recovery :)

added a TODO(vinod/bmahler) for one of us to take this up later.


- Vinod


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


On Aug. 13, 2013, 11:34 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13464/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2013, 11:34 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am e465fd1b7c22a649a59e69a29c0c7f3e9198188b 
>   3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 796cb505fe538d5f65c0f8ea1fa827155f2bb2c1 
>   3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/13464/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>


Re: Review Request 13464: Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13464/#review25101
-----------------------------------------------------------

Ship it!


Looks good, although there are a few things I find unfortunate:
 (1) Users will have to copy all keys / values if they want to iterate on the map.
 (2) LinkedHashMap and hashmap are incomatible (Different APIs w.r.t. to keys() and values()).
 (3) LinkedHashMap is not compatible with the map interface.

I can take these on after this is committed if you would like to punt in the interest of finishing up slave recovery :)


3rdparty/libprocess/3rdparty/Makefile.am
<https://reviews.apache.org/r/13464/#comment49314>

    alphabetical



3rdparty/libprocess/3rdparty/stout/Makefile.am
<https://reviews.apache.org/r/13464/#comment49315>

    alphabetical



3rdparty/libprocess/3rdparty/stout/Makefile.am
<https://reviews.apache.org/r/13464/#comment49316>

    alphabetical



3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp
<https://reviews.apache.org/r/13464/#comment49317>

    thanks!



3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp
<https://reviews.apache.org/r/13464/#comment49320>

    It's ok not extending as well, so long as they are compatible :)
    
    Feel free to also assign this to me, the pedant in me will likely force me to make LinkedHashMap and hashmap compatible once this is committed. I'm ok with them being incompatible in the interest of unblocking you for your slave recovery changes :)


- Ben Mahler


On Aug. 13, 2013, 11:34 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13464/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2013, 11:34 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am e465fd1b7c22a649a59e69a29c0c7f3e9198188b 
>   3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 796cb505fe538d5f65c0f8ea1fa827155f2bb2c1 
>   3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
>   3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/13464/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>


Re: Review Request 13464: Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13464/
-----------------------------------------------------------

(Updated Aug. 13, 2013, 11:34 p.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

fixed bad rebase.


Repository: mesos-git


Description
-------

See summary.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
  3rdparty/libprocess/3rdparty/stout/Makefile.am e465fd1b7c22a649a59e69a29c0c7f3e9198188b 
  3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 796cb505fe538d5f65c0f8ea1fa827155f2bb2c1 
  3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/13464/diff/


Testing
-------

make check


Thanks,

Vinod Kone


Re: Review Request 13464: Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13464/
-----------------------------------------------------------

(Updated Aug. 13, 2013, 7:15 p.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

benm's.


Repository: mesos-git


Description
-------

See summary.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
  3rdparty/libprocess/3rdparty/stout/Makefile.am e465fd1b7c22a649a59e69a29c0c7f3e9198188b 
  3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/13464/diff/


Testing
-------

make check


Thanks,

Vinod Kone


Re: Review Request 13464: Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13464/
-----------------------------------------------------------

(Updated Aug. 12, 2013, 5:49 p.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

s/linkedhashmap/LinkedHashMap/


Summary (updated)
-----------------

Implemented a LinkedHashMap that preserves the insertion order of keys of a hashmap.


Repository: mesos-git


Description
-------

See summary.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
  3rdparty/libprocess/3rdparty/stout/Makefile.am 770378d11d30e1e222e418c1839affd9d4ffe8d3 
  3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/13464/diff/


Testing
-------

make check


Thanks,

Vinod Kone


Re: Review Request 13464: Implemented a linkedhashmap that preserves the insertion order of keys of a hashmap.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13464/
-----------------------------------------------------------

(Updated Aug. 12, 2013, 1:12 a.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

made values() const and added empty() and clear().


Repository: mesos-git


Description
-------

See summary.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
  3rdparty/libprocess/3rdparty/stout/Makefile.am 770378d11d30e1e222e418c1839affd9d4ffe8d3 
  3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/13464/diff/


Testing
-------

make check


Thanks,

Vinod Kone


Re: Review Request 13464: Implemented a linkedhashmap that preserves the insertion order of keys of a hashmap.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13464/
-----------------------------------------------------------

(Updated Aug. 11, 2013, 7:19 p.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

added array subscript operator, contains() and values().


Repository: mesos-git


Description
-------

See summary.


Diffs (updated)
-----

  3rdparty/libprocess/3rdparty/Makefile.am 0cd407cfbd3226ce610ef77cee3a16c0e198e144 
  3rdparty/libprocess/3rdparty/stout/Makefile.am 770378d11d30e1e222e418c1839affd9d4ffe8d3 
  3rdparty/libprocess/3rdparty/stout/include/stout/linkedhashmap.hpp PRE-CREATION 
  3rdparty/libprocess/3rdparty/stout/tests/linkedhashmap_tests.cpp PRE-CREATION 

Diff: https://reviews.apache.org/r/13464/diff/


Testing
-------

make check


Thanks,

Vinod Kone