Jackie-Jiang commented on code in PR #13627:
URL: https://github.com/apache/pinot/pull/13627#discussion_r1705938930


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/startree/v2/builder/MultipleTreesBuilder.java:
##########
@@ -90,6 +90,13 @@ public MultipleTreesBuilder(List<StarTreeV2BuilderConfig> 
builderConfigs, File i
     _metadataProperties =
         CommonsConfigurationUtils.fromFile(new File(_segmentDirectory, 
V1Constants.MetadataKeys.METADATA_FILE_NAME));
     _separator = getSeparator();
+    // log the updated star-tree configs
+    StringBuilder logUpdatedStarTrees = new StringBuilder();
+    logUpdatedStarTrees.append("Updated star-tree configs :");
+    for (StarTreeV2BuilderConfig startree : _builderConfigs) {
+      logUpdatedStarTrees.append("\n").append(startree);
+    }
+    LOGGER.debug(logUpdatedStarTrees.toString());

Review Comment:
   Check whether debug log is enabled, then collect these info. Currently we 
always collect info even when debug log is disabled 



##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/startree/v2/builder/StarTreeIndexSeparator.java:
##########
@@ -57,10 +61,15 @@ public StarTreeIndexSeparator(File indexMapFile, File 
indexFile, List<StarTreeV2
     int numStarTrees = starTreeMetadataList.size();
     _builderConfigList = new ArrayList<>(numStarTrees);
     _numDocsList = new ArrayList<>(numStarTrees);
+    StringBuilder logExistingStarTrees = new StringBuilder();
+    logExistingStarTrees.append("Existing star-tree configs :");
     for (StarTreeV2Metadata starTreeMetadata : starTreeMetadataList) {
-      
_builderConfigList.add(StarTreeV2BuilderConfig.fromMetadata(starTreeMetadata));
+      StarTreeV2BuilderConfig config = 
StarTreeV2BuilderConfig.fromMetadata(starTreeMetadata);
+      _builderConfigList.add(config);
+      logExistingStarTrees.append("\n").append(config);
       _numDocsList.add(starTreeMetadata.getNumDocs());
     }
+    LOGGER.debug(logExistingStarTrees.toString());

Review Comment:
   Same here. Check whether debug log is enabled, and construct the log from 
`_builderConfigList` only when it is enabled



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

Reply via email to