From cd725b834bfbaccc3c4e25d943beec311ea737ff Mon Sep 17 00:00:00 2001 From: Chong Gao Date: Mon, 29 Nov 2021 13:24:10 +0800 Subject: [PATCH] Fixes a minor deprecation warning (#4223) Signed-off-by: Chong Gao --- .../execution/datasources/rapids/GpuPartitioningUtils.scala | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sql-plugin/src/main/scala/org/apache/spark/sql/execution/datasources/rapids/GpuPartitioningUtils.scala b/sql-plugin/src/main/scala/org/apache/spark/sql/execution/datasources/rapids/GpuPartitioningUtils.scala index 4c7f06eafe5..6bf6788b1a5 100644 --- a/sql-plugin/src/main/scala/org/apache/spark/sql/execution/datasources/rapids/GpuPartitioningUtils.scala +++ b/sql-plugin/src/main/scala/org/apache/spark/sql/execution/datasources/rapids/GpuPartitioningUtils.scala @@ -109,9 +109,6 @@ object GpuPartitioningUtils { * * mainly copied from PartitioningAwareFileIndex.basePaths */ - @scala.annotation.nowarn( - "msg=method isDirectory in class FileSystem is deprecated" - ) private def getBasePaths( hadoopConf: Configuration, basePathOption: Option[Path], @@ -121,7 +118,7 @@ object GpuPartitioningUtils { basePathOption match { case Some(userDefinedBasePath) => val fs = userDefinedBasePath.getFileSystem(hadoopConf) - if (!fs.isDirectory(userDefinedBasePath)) { + if (!fs.getFileStatus(userDefinedBasePath).isDirectory) { throw new IllegalArgumentException(s"Option '$BASE_PATH_PARAM' must be a directory") } val qualifiedBasePath = fs.makeQualified(userDefinedBasePath)