This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new ceb7583ed394 Revert "[SPARK-50756][SQL] Use error class for exceptions
in SparkConf.validateSettings"
ceb7583ed394 is described below
commit ceb7583ed394989b8d1f14350bce58a2d291acd8
Author: Hyukjin Kwon <[email protected]>
AuthorDate: Wed Jan 8 17:40:08 2025 +0900
Revert "[SPARK-50756][SQL] Use error class for exceptions in
SparkConf.validateSettings"
This reverts commit cfb2e4054f77c80afe197ab85c51e12e79d5f821.
---
.../src/main/resources/error/error-conditions.json | 12 ------------
core/src/main/scala/org/apache/spark/SparkConf.scala | 18 ++++++------------
2 files changed, 6 insertions(+), 24 deletions(-)
diff --git a/common/utils/src/main/resources/error/error-conditions.json
b/common/utils/src/main/resources/error/error-conditions.json
index a8ff0809be73..f7ca1eae0ef2 100644
--- a/common/utils/src/main/resources/error/error-conditions.json
+++ b/common/utils/src/main/resources/error/error-conditions.json
@@ -2393,12 +2393,6 @@
],
"sqlState" : "42604"
},
- "INVALID_EXECUTOR_HEARTBEAT_INTERVAL" : {
- "message" : [
- "The value of <networkTimeoutKey>=<networkTimeoutValue>ms must be
greater than the value of
<executorHeartbeatIntervalKey>=<executorHeartbeatIntervalValue>ms."
- ],
- "sqlState" : "42616"
- },
"INVALID_EXECUTOR_MEMORY" : {
"message" : [
"Executor memory <executorMemory> must be at least <minSystemMemory>.",
@@ -3699,12 +3693,6 @@
],
"sqlState" : "07501"
},
- "NETWORK_AUTH_MUST_BE_ENABLED" : {
- "message" : [
- "<networkAuthEnabledConf> must be enabled when enabling encryption."
- ],
- "sqlState" : "42616"
- },
"NONEXISTENT_FIELD_NAME_IN_LIST" : {
"message" : [
"Field(s) <nonExistFields> do(es) not exist. Available fields:
<fieldNames>"
diff --git a/core/src/main/scala/org/apache/spark/SparkConf.scala
b/core/src/main/scala/org/apache/spark/SparkConf.scala
index aab636e8d812..ae6ef1ee5560 100644
--- a/core/src/main/scala/org/apache/spark/SparkConf.scala
+++ b/core/src/main/scala/org/apache/spark/SparkConf.scala
@@ -607,23 +607,17 @@ class SparkConf(loadDefaults: Boolean)
}
val encryptionEnabled = get(NETWORK_CRYPTO_ENABLED) ||
get(SASL_ENCRYPTION_ENABLED)
- SparkException.require(
- !encryptionEnabled || get(NETWORK_AUTH_ENABLED),
- "NETWORK_AUTH_MUST_BE_ENABLED",
- Map("networkAuthEnabledConf" -> NETWORK_AUTH_ENABLED.key))
+ require(!encryptionEnabled || get(NETWORK_AUTH_ENABLED),
+ s"${NETWORK_AUTH_ENABLED.key} must be enabled when enabling encryption.")
val executorTimeoutThresholdMs = get(NETWORK_TIMEOUT) * 1000
val executorHeartbeatIntervalMs = get(EXECUTOR_HEARTBEAT_INTERVAL)
+ val networkTimeout = NETWORK_TIMEOUT.key
// If spark.executor.heartbeatInterval bigger than spark.network.timeout,
// it will almost always cause ExecutorLostFailure. See SPARK-22754.
- SparkException.require(
- executorTimeoutThresholdMs > executorHeartbeatIntervalMs,
- "INVALID_EXECUTOR_HEARTBEAT_INTERVAL",
- Map(
- "networkTimeoutKey" -> NETWORK_TIMEOUT.key,
- "networkTimeoutValue" -> executorTimeoutThresholdMs.toString,
- "executorHeartbeatIntervalKey" -> EXECUTOR_HEARTBEAT_INTERVAL.key,
- "executorHeartbeatIntervalValue" ->
executorHeartbeatIntervalMs.toString))
+ require(executorTimeoutThresholdMs > executorHeartbeatIntervalMs, "The
value of " +
+ s"${networkTimeout}=${executorTimeoutThresholdMs}ms must be greater than
the value of " +
+ s"${EXECUTOR_HEARTBEAT_INTERVAL.key}=${executorHeartbeatIntervalMs}ms.")
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]