Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/10812 )

Change subject: [rebalance-test] fix running the test on Ubuntu 18.04
......................................................................


Patch Set 3:

(1 comment)

Thank you for the review.

http://gerrit.cloudera.org:8080/#/c/10812/3//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/10812/3//COMMIT_MSG@17
PS3, Line 17: The motivation for this change is the fact that the test fails on
            : Ubuntu 18.04 without this patch.  Implicitly, the reference 
results
            : relied on the order of elements in hash dictionary container used 
in
            : the implementation of the 
Rebalancer::KsckResultsToClusterBalanceInfo()
            : method.  It seems the implementation of std::unordered_map in 
libstdc++
            : shipped with Ubuntu 18.04 has changed compared with older Linux 
distro
            : versions.
> FWIW, I changed all of the unordered_maps and unordered_sets in the tools/
Yep, I also did that change in the tools/ directory.  In addition to that 
change it's necessary to change the reference results in the rebalance-test.cc 
so the strings for every integer key would be ordered appropriately.  I didn't 
change the ordering of corresponding keys in the reference results because a) 
with this change the custom comparison operator 'normalizes' the input anyway 
b) the essence of this patch would not less obvious.

I think it's better to use hashed dictionaries vs tree dictionaries because of 
faster lookup speed: O(1) instead of O(log(n)) since number of tablets might be 
high enough.  I didn't evaluate how much gain it gives us in real world 
scenarios, but I suspect there is some.  As for the iterating over those maps, 
the order of elements there is not crucial except for the reference results 
comparison.  We talked about that with Will and decided to keep hashed maps.  
If we find the regular tree maps are better, we can easily switch at any point.



--
To view, visit http://gerrit.cloudera.org:8080/10812
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie4dc5d22bab86f6ab61f18f05e45a063bbf38eba
Gerrit-Change-Number: 10812
Gerrit-PatchSet: 3
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Tidy Bot
Gerrit-Reviewer: Will Berkeley <[email protected]>
Gerrit-Comment-Date: Wed, 27 Jun 2018 17:16:28 +0000
Gerrit-HasComments: Yes

Reply via email to