panbingkun commented on code in PR #43505:
URL: https://github.com/apache/spark/pull/43505#discussion_r1399914846


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSink.scala:
##########
@@ -51,7 +51,7 @@ object FileStreamSink extends Logging {
         val hdfsPath = new Path(singlePath)
         try {
           val fs = hdfsPath.getFileSystem(hadoopConf)
-          if (fs.isDirectory(hdfsPath)) {
+          if (fs.getFileStatus(hdfsPath).isDirectory) {

Review Comment:
   from "Assume no metadata directory. Error while looking for metadata 
directory in the path: $singlePath."
   
   Because its parent directory does not exist in this case, it seems 
reasonable to log that the subdirectory does not exist.
   Of course, if we want to add special explanations for this situation, it is 
also possible.



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