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


##########
project/SparkBuild.scala:
##########
@@ -265,7 +265,10 @@ object SparkBuild extends PomBuild {
         // Or use `-Wconf:msg=legacy-binding:s` to silence this warning. 
[quickfixable]"
         "-Wconf:msg=legacy-binding:s",
         // SPARK-45627 Symbol literals are deprecated in Scala 2.13 and it's a 
compile error in Scala 3.
-        "-Wconf:cat=deprecation&msg=symbol literal is deprecated:e"
+        "-Wconf:cat=deprecation&msg=symbol literal is deprecated:e",
+        // SPARK-45645 FileSystem.isFile and FileSystem.isDirectory is 
deprecated
+        "-Wconf:cat=deprecation&msg=method isFile in class FileSystem is 
deprecated:e",

Review Comment:
   I think we don't need to turn this rule into a compile error.
   
   



##########
core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala:
##########
@@ -858,7 +858,7 @@ private[history] class FsHistoryProvider(conf: SparkConf, 
clock: Clock)
           try {
             // Fetch the entry first to avoid an RPC when it's already removed.
             listing.read(classOf[LogInfo], inProgressLog)
-            if (!fs.isFile(new Path(inProgressLog))) {
+            if (!fs.getFileStatus(new Path(inProgressLog)).isFile) {

Review Comment:
   ```
       @Deprecated
       public boolean isFile(Path f) throws IOException {
           try {
               return this.getFileStatus(f).isFile();
           } catch (FileNotFoundException var3) {
               return false;
           }
       }
   ```
   
   hmm... It seems like this would cause some semantic differences. For the 
original API, if the `Path` does not exist, `isFile` would return false. But 
now it throws a `FileNotFoundException`.
   
   



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