This is an automated email from the ASF dual-hosted git repository.

yangzy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 27c32f1b1 [VL] Prefer to use path.getFileSystem instead of 
FileSystem.get to create FileSystem (#6123)
27c32f1b1 is described below

commit 27c32f1b15d42a8cf98b20b0cb67c9de0c0edb7e
Author: Kaifei Yi <[email protected]>
AuthorDate: Thu Jun 20 00:06:01 2024 +0800

    [VL] Prefer to use path.getFileSystem instead of FileSystem.get to create 
FileSystem (#6123)
    
    Co-authored-by: yikaifei <[email protected]>
---
 .../sql/execution/datasources/velox/VeloxFormatWriterInjects.scala    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/backends-velox/src/main/scala/org/apache/spark/sql/execution/datasources/velox/VeloxFormatWriterInjects.scala
 
b/backends-velox/src/main/scala/org/apache/spark/sql/execution/datasources/velox/VeloxFormatWriterInjects.scala
index c358d6372..9f9d43326 100644
--- 
a/backends-velox/src/main/scala/org/apache/spark/sql/execution/datasources/velox/VeloxFormatWriterInjects.scala
+++ 
b/backends-velox/src/main/scala/org/apache/spark/sql/execution/datasources/velox/VeloxFormatWriterInjects.scala
@@ -34,7 +34,7 @@ import org.apache.spark.util.TaskResources
 
 import com.google.common.base.Preconditions
 import org.apache.arrow.c.ArrowSchema
-import org.apache.hadoop.fs.{FileStatus, FileSystem, Path}
+import org.apache.hadoop.fs.{FileStatus, Path}
 import org.apache.hadoop.mapreduce.TaskAttemptContext
 
 import java.io.IOException
@@ -48,8 +48,8 @@ trait VeloxFormatWriterInjects extends 
GlutenFormatWriterInjectsBase {
     // Create the hdfs path if not existed.
     val hdfsSchema = "hdfs://"
     if (filePath.startsWith(hdfsSchema)) {
-      val fs = FileSystem.get(context.getConfiguration)
       val hdfsPath = new Path(filePath)
+      val fs = hdfsPath.getFileSystem(context.getConfiguration)
       if (!fs.exists(hdfsPath.getParent)) {
         fs.mkdirs(hdfsPath.getParent)
       }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to