shounakmk219 commented on code in PR #10905:
URL: https://github.com/apache/pinot/pull/10905#discussion_r1245114343
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/startree/v2/builder/MultipleTreesBuilder.java:
##########
@@ -115,13 +126,38 @@ public MultipleTreesBuilder(@Nullable
List<StarTreeIndexConfig> indexConfigs, bo
}
}
+ private StarTreeIndexSeparator getSeparator()
+ throws Exception {
+ if (!_metadataProperties.containsKey(MetadataKey.STAR_TREE_COUNT)) {
+ return null;
+ }
+ try {
+ _separatorTempDir = new File(_segmentDirectory,
StarTreeV2Constants.EXISTING_STAR_TREE_TEMP_DIR);
+ FileUtils.forceMkdir(_separatorTempDir);
+ FileUtils.copyFileToDirectory(
+ new File(_segmentDirectory, StarTreeV2Constants.INDEX_FILE_NAME),
_separatorTempDir, false);
+ FileUtils.copyFileToDirectory(
+ new File(_segmentDirectory,
StarTreeV2Constants.INDEX_MAP_FILE_NAME), _separatorTempDir, false);
Review Comment:
That's a valid point, but I didn't move the files as I wanted to use
`StarTreeBuilderUtils.removeStarTrees` (to avoid duplicating the startree index
cleanup logic), and that was throwing exception upon missing startree index
files. Let me know your thoughts on this.
--
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]