You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2016/12/12 07:39:28 UTC
[kudu-CR] random: add a Rand64() variant which uses all bits
Todd Lipcon has uploaded a new change for review.
http://gerrit.cloudera.org:8080/5474
Change subject: random: add a Rand64() variant which uses all bits
......................................................................
random: add a Rand64() variant which uses all bits
Rand64() currently fills only 62 bits of the result. This adds a new
Random::Rand64FullRange() which fills all bits of the result. This is
useful in testing encodings which may have edge cases when the MSB is
set.
Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
---
M src/kudu/cfile/encoding-test.cc
M src/kudu/tools/data_gen_util.cc
M src/kudu/tools/tool_action_test.cc
M src/kudu/util/memcmpable_varint-test.cc
M src/kudu/util/random-test.cc
M src/kudu/util/random.h
6 files changed, 37 insertions(+), 11 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/74/5474/1
--
To view, visit http://gerrit.cloudera.org:8080/5474
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
[kudu-CR] random: add a Rand64() variant which uses all bits
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/5474
to look at the new patch set (#3).
Change subject: random: add a Rand64() variant which uses all bits
......................................................................
random: add a Rand64() variant which uses all bits
Rand64() currently fills only 62 bits of the result. This adds a new
Random::Rand64FullRange() which fills all bits of the result. This is
useful in testing encodings which may have edge cases when the MSB is
set.
Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
---
M src/kudu/cfile/encoding-test.cc
M src/kudu/tools/data_gen_util.cc
M src/kudu/tools/tool_action_test.cc
M src/kudu/util/memcmpable_varint-test.cc
M src/kudu/util/random-test.cc
M src/kudu/util/random.h
6 files changed, 37 insertions(+), 11 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/74/5474/3
--
To view, visit http://gerrit.cloudera.org:8080/5474
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins
[kudu-CR] random: change Rand64() to use all bits
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Hello Adar Dembo, Kudu Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/5474
to look at the new patch set (#4).
Change subject: random: change Rand64() to use all bits
......................................................................
random: change Rand64() to use all bits
Rand64() currently fills only 62 bits of the result. This changes the
function to randomize all 64 bits at the cost of a bit of performance.
This is useful in testing encodings which may have edge cases when the
MSB is set.
Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
---
M src/kudu/util/random-test.cc
M src/kudu/util/random.h
2 files changed, 11 insertions(+), 13 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/74/5474/4
--
To view, visit http://gerrit.cloudera.org:8080/5474
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
[kudu-CR] random: add a Rand64() variant which uses all bits
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.
Change subject: random: add a Rand64() variant which uses all bits
......................................................................
Patch Set 3: Code-Review+2
(1 comment)
http://gerrit.cloudera.org:8080/#/c/5474/3/src/kudu/util/random.h
File src/kudu/util/random.h:
Line 93: // This is 1.5x slower than 'Next64()' above, but randomizes all bits.
Do we care so much about the speed of Next64() that we shouldn't just extend it to cover all 64 bits? The number of non-test instances of Next64() is very low. The most prominent one is the block manager, where I'd expect the cost of the RNG to be dwarfed by the system calls opening/creating files.
In other cases, we're going through ThreadSafeRandom so we are already okay with the possible slowdown of a spin-wait.
--
To view, visit http://gerrit.cloudera.org:8080/5474
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-HasComments: Yes
[kudu-CR] random: change Rand64() to use all bits
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has posted comments on this change.
Change subject: random: change Rand64() to use all bits
......................................................................
Patch Set 4: Code-Review+2
--
To view, visit http://gerrit.cloudera.org:8080/5474
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: No
[kudu-CR] random: change Rand64() to use all bits
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change.
Change subject: random: change Rand64() to use all bits
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/5474/3/src/kudu/util/random.h
File src/kudu/util/random.h:
Line 93: // This is 1.5x slower than 'Next64()' above, but randomizes all bits.
> Do we care so much about the speed of Next64() that we shouldn't just exten
Done
--
To view, visit http://gerrit.cloudera.org:8080/5474
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
Gerrit-PatchSet: 3
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-HasComments: Yes
[kudu-CR] random: change Rand64() to use all bits
Posted by "Adar Dembo (Code Review)" <ge...@cloudera.org>.
Adar Dembo has submitted this change and it was merged.
Change subject: random: change Rand64() to use all bits
......................................................................
random: change Rand64() to use all bits
Rand64() currently fills only 62 bits of the result. This changes the
function to randomize all 64 bits at the cost of a bit of performance.
This is useful in testing encodings which may have edge cases when the
MSB is set.
Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
Reviewed-on: http://gerrit.cloudera.org:8080/5474
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <ad...@cloudera.com>
---
M src/kudu/util/random-test.cc
M src/kudu/util/random.h
2 files changed, 11 insertions(+), 13 deletions(-)
Approvals:
Adar Dembo: Looks good to me, approved
Kudu Jenkins: Verified
--
To view, visit http://gerrit.cloudera.org:8080/5474
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
Gerrit-PatchSet: 5
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Adar Dembo <ad...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
[kudu-CR] random: add a Rand64() variant which uses all bits
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has uploaded a new patch set (#2).
Change subject: random: add a Rand64() variant which uses all bits
......................................................................
random: add a Rand64() variant which uses all bits
Rand64() currently fills only 62 bits of the result. This adds a new
Random::Rand64FullRange() which fills all bits of the result. This is
useful in testing encodings which may have edge cases when the MSB is
set.
Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
---
M src/kudu/cfile/encoding-test.cc
M src/kudu/tools/data_gen_util.cc
M src/kudu/tools/tool_action_test.cc
M src/kudu/util/memcmpable_varint-test.cc
M src/kudu/util/random-test.cc
M src/kudu/util/random.h
6 files changed, 37 insertions(+), 11 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/74/5474/2
--
To view, visit http://gerrit.cloudera.org:8080/5474
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6064ae18532bc32f24086e232200f1f0966d6b2a
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Kudu Jenkins