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


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/startree/v2/builder/MultipleTreesBuilder.java:
##########
@@ -81,9 +84,10 @@ public MultipleTreesBuilder(List<StarTreeV2BuilderConfig> 
builderConfigs, File i
     _builderConfigs = builderConfigs;
     _buildMode = buildMode;
     _segmentDirectory = SegmentDirectoryPaths.findSegmentDirectory(indexDir);
+    _indexDirectory = indexDir;
     _metadataProperties =
         CommonsConfigurationUtils.fromFile(new File(_segmentDirectory, 
V1Constants.MetadataKeys.METADATA_FILE_NAME));
-    
Preconditions.checkState(!_metadataProperties.containsKey(MetadataKey.STAR_TREE_COUNT),
 "Star-tree already exists");
+    _existingStarTrees = getExistingStarTrees();

Review Comment:
   Once all the trees are extracted I am deleting the existing star-tree index 
files so that new index can be built. Even if we just extract the required tree 
on demand instead of separating all trees at the start, we need to copy the 
existing index files to a temp folder for the separator to operate. So we can't 
avoid the temp folder, but I can surely update the logic to only separate the 
required tree on demand if current logic feels like an overhead.



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