sajjad-moradi commented on a change in pull request #6546:
URL: https://github.com/apache/incubator-pinot/pull/6546#discussion_r577251040



##########
File path: 
pinot-tools/src/main/java/org/apache/pinot/tools/realtime/provisioning/MemoryEstimator.java
##########
@@ -107,6 +129,15 @@ public MemoryEstimator(TableConfig tableConfig, File 
sampleCompletedSegment, int
     _tableDataDir.mkdir();
   }
 
+  public MemoryEstimator(TableConfig tableConfig, File 
dataCharacteristicsFile, File schemaFile, int ingestionRate,
+      long maxUsableHostMemory, int tableRetentionHours) {
+    this(tableConfig,
+        generateCompletedSegment(dataCharacteristicsFile, schemaFile, 
tableConfig),

Review comment:
       Why do we want to do that? We generate it in `java.io.tmpdir` so it gets 
deleted automatically.

##########
File path: 
pinot-tools/src/main/java/org/apache/pinot/tools/data/generator/NumberGenerator.java
##########
@@ -61,23 +66,23 @@ public void init() {
         final int start = rand.nextInt(cardinality);
         final int end = start + cardinality;
         for (int i = start; i < end; i++) {
-          intValues.add(new Integer(i));
+          intValues.add(i);
         }
         break;
       case LONG:
         longValues = new ArrayList<Long>();
         final long longStart = rand.nextInt(cardinality);
         final long longEnd = longStart + cardinality;
         for (long i = longStart; i < longEnd; i++) {
-          longValues.add(new Long(i));
+          longValues.add(i);
         }
         break;
       case FLOAT:
         floatValues = new ArrayList<Float>();
-        final float floatStart = rand.nextFloat() * rand.nextInt(1000);
+        final float floatStart = Math.round(rand.nextFloat()* 100.0f) / 100.0f;

Review comment:
       This makes the generated float numbers easier on the eye - with two 
decimal places.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to