xushiyan commented on a change in pull request #4866:
URL: https://github.com/apache/hudi/pull/4866#discussion_r815258027



##########
File path: 
hudi-common/src/test/java/org/apache/hudi/common/testutils/HoodieTestDataGenerator.java
##########
@@ -269,25 +300,25 @@ public static GenericRecord generateGenericRecord(String 
rowKey, String partitio
     rec.put("partition_path", partitionPath);
     rec.put("rider", riderName);
     rec.put("driver", driverName);
-    rec.put("begin_lat", RAND.nextDouble());
-    rec.put("begin_lon", RAND.nextDouble());
-    rec.put("end_lat", RAND.nextDouble());
-    rec.put("end_lon", RAND.nextDouble());
+    rec.put("begin_lat", r.nextDouble());
+    rec.put("begin_lon", r.nextDouble());
+    rec.put("end_lat", r.nextDouble());
+    rec.put("end_lon", r.nextDouble());
     if (isFlattened) {
-      rec.put("fare", RAND.nextDouble() * 100);
+      rec.put("fare", r.nextDouble() * 100);
       rec.put("currency", "USD");
     } else {
-      rec.put("distance_in_meters", RAND.nextInt());
-      rec.put("seconds_since_epoch", RAND.nextLong());
-      rec.put("weight", RAND.nextFloat());
+      rec.put("distance_in_meters", r.nextInt());
+      rec.put("seconds_since_epoch", r.nextLong());
+      rec.put("weight", r.nextFloat());
       byte[] bytes = "Canada".getBytes();
       rec.put("nation", ByteBuffer.wrap(bytes));
-      long currentTimeMillis = System.currentTimeMillis();
-      Date date = new Date(currentTimeMillis);
+      long randomMillis = genRandomTimeMillis(r);
+      Date date = new Date(randomMillis);

Review comment:
       It's probably LocalDate we need




-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to