ifesdjeen commented on code in PR #3689:
URL: https://github.com/apache/cassandra/pull/3689#discussion_r1850380949


##########
test/harry/main/org/apache/cassandra/harry/gen/Generators.java:
##########
@@ -18,20 +18,338 @@
 
 package org.apache.cassandra.harry.gen;
 
+import java.math.BigDecimal;
+import java.math.BigInteger;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
+import java.util.UUID;
 import java.util.function.Supplier;
 
-import accord.utils.Gen;
+import org.apache.cassandra.harry.gen.rng.JdkRandomEntropySource;
+import org.apache.cassandra.harry.util.BitSet;
 import org.apache.cassandra.locator.InetAddressAndPort;
+import org.apache.cassandra.utils.TimeUUID;
 
 public class Generators
 {
+    /**
+     * Create a generator that will produce _at most_ N values.
+     *
+     * Since type T may contain less entropy than requested population, it is
+     * not guaranteed to produce exactly N values.
+     */
+    public static <T> Generator<T> population(Generator<T> gen, int population)
+    {
+        return new Generator<T>()
+        {
+            final long[] seeds = new long[population];
+            final EntropySource local = new JdkRandomEntropySource(0L);
+            boolean initialized = false;
+            @Override
+            public T generate(EntropySource rng)
+            {
+                // Generate a fixed number of seeds
+                if (!initialized)
+                {
+                    for (int i = 0; i < population; i++)
+                        seeds[i] = rng.next();

Review Comment:
   removed this method



-- 
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]

Reply via email to