nsivabalan commented on code in PR #18417:
URL: https://github.com/apache/hudi/pull/18417#discussion_r3095452353


##########
hudi-common/src/main/java/org/apache/hudi/BaseHoodieTableFileIndex.java:
##########
@@ -355,6 +357,11 @@ private Map<PartitionPath, List<FileSlice>> 
filterFiles(List<PartitionPath> part
                       .orElseGet(() -> 
finalFileSystemView.getLatestFileSlices(partitionPath.path))
                       .collect(Collectors.toList())
           ));
+    } finally {
+      long elapsedMs = timer.endTimer();
+      log.debug("On {} with query instant as {}, time spent in filterFiles 
attempt was {}ms for {} files across {} partitions",

Review Comment:
   `...time spend in HoodieFileIndex.filterFiles is {}ms ...` 



##########
hudi-common/src/main/java/org/apache/hudi/BaseHoodieTableFileIndex.java:
##########
@@ -363,11 +370,16 @@ protected List<PartitionPath> 
listPartitionPaths(List<String> relativePartitionP
                                                    Expression 
partitionColumnPredicates,
                                                    List<Object> 
partitionPredicateExpressions) {
     List<String> matchedPartitionPaths;
+    HoodieTimer timer = HoodieTimer.start();
     try {
       matchedPartitionPaths = 
tableMetadata.getPartitionPathWithPathPrefixUsingFilterExpression(relativePartitionPaths,
           partitionFields, partitionColumnPredicates, 
partitionPredicateExpressions);
     } catch (IOException e) {
-      throw new HoodieIOException("Error fetching partition paths", e);
+      throw new HoodieIOException("On " + 
metaClient.getTableConfig().getTableName() + " Error fetching partition paths", 
e);
+    } finally {
+      long elapsedMs = timer.endTimer();
+      log.debug("On {}, it took {} ms to list partition paths with {} 
relativePartitionPaths using partition predicate filtering",

Review Comment:
   lets try to follow same pattern for logging. 
   
    For consistency and grepability, I'd suggest a uniform template like:       
                                                              
                                                                                
                                                               
     "[table={}] <operation> completed in {} ms (<context>)"                    
                                                               
                                                                                
                                                               
     For example:                                                               
                                                             
     "[table={}] listPartitionPathFiles completed in {} ms ({} partitions, {} 
uncached)"                                                       
     "[table={}] filterFiles completed in {} ms ({} partitions, {} files)"      
                                                               
     "[table={}] listPartitionPaths completed in {} ms ({} paths, predicate 
filtering)" 



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

Reply via email to