shounakmk219 commented on code in PR #10905:
URL: https://github.com/apache/pinot/pull/10905#discussion_r1238641093


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/startree/v2/builder/MultipleTreesBuilder.java:
##########
@@ -148,9 +180,54 @@ public void build()
       StarTreeIndexMapUtils
           .storeToFile(indexMaps, new File(_segmentDirectory, 
StarTreeV2Constants.INDEX_MAP_FILE_NAME));
       FileUtils.forceDelete(starTreeIndexDir);
+      _existingStarTrees.cleanOutputDirectory();
     }
 
-    LOGGER.info("Finished building {} star-trees in {}ms", numStarTrees, 
System.currentTimeMillis() - startTime);
+    LOGGER.info("Newly built start-trees {}.\n Reused star-trees {}.", 
numStarTrees - reusedStarTrees, reusedStarTrees);
+    LOGGER.info("Finished building star-trees in {}ms", 
System.currentTimeMillis() - startTime);
+  }
+
+  /**
+   * Extracts the individual star-trees from the combined index file and 
returns {@link SeparatedStarTreesMetadata}
+   * which contains the information about the output directory where the 
extracted star-trees are located and also
+   * has the builder configs of each of the star-tree.
+   */
+  private SeparatedStarTreesMetadata extractStarTrees()
+      throws Exception {
+    SeparatedStarTreesMetadata metadata = new 
SeparatedStarTreesMetadata(_segmentDirectory);
+    if (_metadataProperties.containsKey(MetadataKey.STAR_TREE_COUNT)) {

Review Comment:
   Nice catch, removed it.



-- 
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...@pinot.apache.org

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