dcapwell commented on code in PR #2212:
URL: https://github.com/apache/cassandra/pull/2212#discussion_r1143663579
##########
test/simulator/main/org/apache/cassandra/simulator/debug/SelfReconcilingRandom.java:
##########
@@ -20,24 +20,29 @@
import java.util.function.Supplier;
+import org.agrona.collections.Long2LongHashMap;
import org.apache.cassandra.simulator.RandomSource;
-import org.hsqldb.lib.IntKeyLongValueHashMap;
import static org.apache.cassandra.simulator.SimulatorUtils.failWithOOM;
public class SelfReconcilingRandom implements Supplier<RandomSource>
{
- static class Map extends IntKeyLongValueHashMap
+ static class Map extends Long2LongHashMap
{
+ public Map(long missingValue)
+ {
+ super(missingValue);
+ }
+
public boolean put(int i, long v)
{
int size = this.size();
- super.addOrRemove((long)i, (long)v, (Object)null, (Object)null,
false);
+ super.put(i, v);
return size != this.size();
}
}
- final Map map = new Map();
- long[] tmp = new long[1];
+
+ final Map map = new Map(Long.MIN_VALUE);
Review Comment:
nit: this is an internal type, so can make this the default constructor and
do `super(Long.MIN_VALUE)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]