pan3793 commented on code in PR #36485:
URL: https://github.com/apache/spark/pull/36485#discussion_r868751869


##########
sql/hive/src/main/scala/org/apache/spark/sql/hive/TableReader.scala:
##########
@@ -175,7 +175,8 @@ class HadoopTableReader(
             def updateExistPathSetByPathPattern(pathPatternStr: String): Unit 
= {
               val pathPattern = new Path(pathPatternStr)
               val fs = pathPattern.getFileSystem(hadoopConf)
-              val matches = fs.globStatus(pathPattern)
+              val (matches, timeCost) = 
Utils.timeTakenMs(fs.globStatus(pathPattern))
+              logInfo(s"Get FileStatus for path '$pathPatternStr' costs 
$timeCost ms.")

Review Comment:
   Personally, I prefer to use logInfo, because 
   
   1) the message is not noisy, `pathPatternStr` matches the table path, which 
means if the query access 10 tables, just generate 10 messages. 
   
   2) the PR itself aims to give more information when the user's job is stuck 
on listing files, the most important information is `pathPatternStr`, and I 
suppose most users will not turn on debug level log on production, then users 
have less opportunity to this message.



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