Andrew Wong has posted comments on this change. ( http://gerrit.cloudera.org:8080/12918 )
Change subject: util: pull Random methods out from tests ...................................................................... Patch Set 4: (2 comments) http://gerrit.cloudera.org:8080/#/c/12918/3/src/kudu/util/random.h File src/kudu/util/random.h: http://gerrit.cloudera.org:8080/#/c/12918/3/src/kudu/util/random.h@149 PS3, Line 149: > I wonder if we should move these methods as well as the other "utility" met The trouble with ThreadSafeRandom.ReservoirSample as a template is that it's not really doing the exact same thing as Random.ReservoirSample on account of it taking a lock. That said, the utilities based on top of it are, so those are fair game. http://gerrit.cloudera.org:8080/#/c/12918/3/src/kudu/util/random.h@152 PS3, Line 152: public: > Maybe rename these a bit to emphasize their similarity? Like, OneFromContai Went with SelectRandomSubset and SelectRandomElement. -- To view, visit http://gerrit.cloudera.org:8080/12918 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ie74eca50d770b9470f6cfb400cf632381a20bd93 Gerrit-Change-Number: 12918 Gerrit-PatchSet: 4 Gerrit-Owner: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-Comment-Date: Wed, 03 Apr 2019 23:19:39 +0000 Gerrit-HasComments: Yes