Skip to content

Commit

Permalink
Fixes a minor deprecation warning (#4223)
Browse files Browse the repository at this point in the history
Signed-off-by: Chong Gao <[email protected]>
  • Loading branch information
Chong Gao authored Nov 29, 2021
1 parent f2c9176 commit cd725b8
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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)
Expand Down

0 comments on commit cd725b8

Please sign in to comment.