Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Given the min and max parameter the ZipfianGenerator should not return *0*… #275

Merged
merged 2 commits into from
Jun 4, 2015
Merged

Given the min and max parameter the ZipfianGenerator should not return *0*… #275

merged 2 commits into from
Jun 4, 2015

Conversation

steffenfriedrich
Copy link
Contributor

if (uz < 1) nor 1 if (uz<1.0+Math.pow(0.5,theta)). The pseudo code in [1] (referenced by ycsb) assumes that only values between 1 and N are drawn from the distribution, but given a min parameter the min value should be returned if (uz < 1), resp. min + 1 if (uz<1.0+Math.pow(0.5,theta)).

[1] J. Gray et al. Quickly generating billion-record synthetic databases. In SIGMOD, 1994.

…if (uz < 1) nor 1 if (uz<1.0+Math.pow(0.5,theta)). Instead it should return the min value (base) or min + 1.
@@ -0,0 +1,23 @@
package com.yahoo.ycsb.generator;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file needs a license header.

@@ -0,0 +1,39 @@
/**
* Copyright (c) 2010 Yahoo! Inc. All rights reserved.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: the year here should be the year of authorship. I'm fine fixing this while doing a sanity check on license headers as a part of #266. Let me know if you want to fix it now instead. If I don't hear anything I'll merge this tonight.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for that. Please feel free to fix it as part of #266.

busbey added a commit that referenced this pull request Jun 4, 2015
[core] Given the min and max parameter the ZipfianGenerator should not return *0*…
@busbey busbey merged commit 6f9e3cf into brianfrankcooper:master Jun 4, 2015
@steffenfriedrich steffenfriedrich deleted the zipfianfix branch June 8, 2015 09:50
jaricftw pushed a commit to jaricftw/YCSB that referenced this pull request Jul 19, 2016
[core] Given the min and max parameter the ZipfianGenerator should not return *0*…
jaricftw pushed a commit to jaricftw/YCSB that referenced this pull request Jul 19, 2016
[core] Given the min and max parameter the ZipfianGenerator should not return *0*…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants