Skip to content

Commit 442808a

Browse files
committed
Make deprecation warning less severe
Just a small change. I think it's good not to scare people who are using the old options. Author: Patrick Wendell <[email protected]> Closes apache#810 from pwendell/warnings and squashes the following commits: cb8a311 [Patrick Wendell] Make deprecation warning less severe
1 parent cf6cbe9 commit 442808a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

core/src/main/scala/org/apache/spark/SparkConf.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,18 +238,18 @@ class SparkConf(loadDefaults: Boolean) extends Cloneable with Logging {
238238

239239
// Check for legacy configs
240240
sys.env.get("SPARK_JAVA_OPTS").foreach { value =>
241-
val error =
241+
val warning =
242242
s"""
243243
|SPARK_JAVA_OPTS was detected (set to '$value').
244-
|This has undefined behavior when running on a cluster and is deprecated in Spark 1.0+.
244+
|This is deprecated in Spark 1.0+.
245245
|
246246
|Please instead use:
247247
| - ./spark-submit with conf/spark-defaults.conf to set defaults for an application
248248
| - ./spark-submit with --driver-java-options to set -X options for a driver
249249
| - spark.executor.extraJavaOptions to set -X options for executors
250250
| - SPARK_DAEMON_JAVA_OPTS to set java options for standalone daemons (master or worker)
251251
""".stripMargin
252-
logError(error)
252+
logWarning(warning)
253253

254254
for (key <- Seq(executorOptsKey, driverOptsKey)) {
255255
if (getOption(key).isDefined) {
@@ -262,16 +262,16 @@ class SparkConf(loadDefaults: Boolean) extends Cloneable with Logging {
262262
}
263263

264264
sys.env.get("SPARK_CLASSPATH").foreach { value =>
265-
val error =
265+
val warning =
266266
s"""
267267
|SPARK_CLASSPATH was detected (set to '$value').
268-
| This has undefined behavior when running on a cluster and is deprecated in Spark 1.0+.
268+
|This is deprecated in Spark 1.0+.
269269
|
270270
|Please instead use:
271271
| - ./spark-submit with --driver-class-path to augment the driver classpath
272272
| - spark.executor.extraClassPath to augment the executor classpath
273273
""".stripMargin
274-
logError(error)
274+
logWarning(warning)
275275

276276
for (key <- Seq(executorClasspathKey, driverClassPathKey)) {
277277
if (getOption(key).isDefined) {

0 commit comments

Comments
 (0)