-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[core] Use longs instead of ints to support larger key spaces. #911
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mairbek Looks good just one line comment. The headers should be updated with the new year if necessary.
@@ -48,7 +48,8 @@ public UniformGenerator(Collection<String> values) | |||
@Override | |||
public String nextValue() | |||
{ | |||
_laststring = _values.get(_gen.nextValue()); | |||
int val = _gen.nextValue().intValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line necessary?
@@ -48,7 +48,7 @@ public UniformGenerator(Collection<String> values) | |||
@Override | |||
public String nextValue() | |||
{ | |||
_laststring = _values.get(_gen.nextValue()); | |||
_laststring = _values.get(_gen.nextValue().intValue()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason we are doing .intValue()? Sorry I wasn't clear earlier with my comment. Should we be using longs everywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The size of ArrayList is int, so limiting the value.
Also UniformGenerator doesn't seem to be used so maybe we can consider removing it.
@@ -1,5 +1,5 @@ | |||
/** | |||
* Copyright (c) 2015 YCSB contributors. All rights reserved. | |||
* Copyright (c) 2017 YCSB contributors. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be 2015-2017 and not a replacement. I should have been more clear.
Thanks for the review! Thanks for pointing me to #126, it seems to be very similar. I will update measurements related code too. Looking at OneMeasurementHistogram.java:60, number of operations is an Integer so that code could potentially go wrong. At this point we are not running more then 1B operations so I never saw it breaking before. |
668da1a
to
4ed3487
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor header fixes needed. The changes look good I'll pull it down later today or tomorrow and check it further.
@@ -1,5 +1,5 @@ | |||
/** | |||
* Copyright (c) 2015 YCSB contributors. All rights reserved. | |||
* Copyright (c) 2016-2017 YCSB contributors. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be 2015-2017
@@ -1,5 +1,5 @@ | |||
/** | |||
* Copyright (c) 2016 YCSB contributors. All rights reserved. | |||
* Copyright (c) 2017 YCSB contributors. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be 2016-2017
Updated the headers. Squashed all header related commits as well... |
# Conflicts: # core/src/main/java/com/yahoo/ycsb/generator/AcknowledgedCounterGenerator.java # core/src/main/java/com/yahoo/ycsb/generator/CounterGenerator.java # core/src/main/java/com/yahoo/ycsb/generator/HotspotIntegerGenerator.java # core/src/main/java/com/yahoo/ycsb/generator/SequentialGenerator.java # core/src/main/java/com/yahoo/ycsb/generator/UniformGenerator.java # core/src/main/java/com/yahoo/ycsb/generator/UniformLongGenerator.java # core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementHistogram.java # core/src/main/java/com/yahoo/ycsb/measurements/OneMeasurementTimeSeries.java # core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONArrayMeasurementsExporter.java # core/src/main/java/com/yahoo/ycsb/measurements/exporter/JSONMeasurementsExporter.java # core/src/main/java/com/yahoo/ycsb/measurements/exporter/MeasurementsExporter.java # core/src/main/java/com/yahoo/ycsb/measurements/exporter/TextMeasurementsExporter.java # core/src/main/java/com/yahoo/ycsb/workloads/CoreWorkload.java # core/src/main/java/com/yahoo/ycsb/workloads/RestWorkload.java
Merged formatting changes. |
@mairbek sorry for the delay in this. I'm taking a look. |
@risdenk ping, it would be nice to get this in to be able to run larger scale benchmarks |
Looked good, cleaned up the merge issues and committed in 59bc986. |
No description provided.