Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ private[spark] trait SparkSystemUtils {
*/
val javaVersion = JavaUtils.javaVersion

/**
* Whether the underlying Java version is at most 17.
*/
val isJavaVersionAtMost17 = Runtime.version().feature() <= 17

/**
* Whether the underlying Java version is at least 21.
*/
val isJavaVersionAtLeast21 = Runtime.version().feature() >= 21

/**
* Whether the underlying operating system is Windows.
*/
Expand All @@ -63,6 +73,7 @@ private[spark] trait SparkSystemUtils {
* Whether the underlying operating system is UNIX.
*/
val isUnix = JavaUtils.isUnix

}

object SparkSystemUtils extends SparkSystemUtils
10 changes: 0 additions & 10 deletions core/src/main/scala/org/apache/spark/util/Utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1855,16 +1855,6 @@ private[spark] object Utils
getHadoopFileSystem(new URI(path), conf)
}

/**
* Whether the underlying Java version is at most 17.
*/
val isJavaVersionAtMost17 = Runtime.version().feature() <= 17

/**
* Whether the underlying Java version is at least 21.
*/
val isJavaVersionAtLeast21 = Runtime.version().feature() >= 21

/**
* Whether the underlying JVM prefer IPv6 addresses.
*/
Expand Down