Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/5514#discussion_r28445180
--- Diff: core/src/main/scala/org/apache/spark/SparkConf.scala ---
@@ -400,19 +397,40 @@ class SparkConf(loadDefaults: Boolean) extends
Cloneable with Logging {
private[spark] object SparkConf extends Logging {
- private val deprecatedConfigs: Map[String, DeprecatedConfig] = {
- val configs = Seq(
- DeprecatedConfig("spark.files.userClassPathFirst",
"spark.executor.userClassPathFirst",
- "1.3"),
- DeprecatedConfig("spark.yarn.user.classpath.first", null, "1.3",
- "Use spark.{driver,executor}.userClassPathFirst instead."),
- DeprecatedConfig("spark.history.fs.updateInterval",
- "spark.history.fs.update.interval.seconds",
- "1.3", "Use spark.history.fs.update.interval.seconds instead"),
- DeprecatedConfig("spark.history.updateInterval",
- "spark.history.fs.update.interval.seconds",
- "1.3", "Use spark.history.fs.update.interval.seconds instead"))
- configs.map { x => (x.oldName, x) }.toMap
+ /**
+ * Maps deprecated config keys to information about the deprecation.
+ *
+ * The extra information is logged as a warning when the config is
present in the user's
+ * configuration.
+ */
+ private val deprecatedConfigs = Map[String, DeprecatedConfig](
+ "spark.yarn.user.classpath.first" ->
+ DeprecatedConfig("1.3", "Please use
spark.{driver,executor}.userClassPathFirst instead.")
+ )
+
+ /**
+ * Maps a current config key to alternate keys that were used in
previous version of Spark.
+ *
+ * The alternates are used in the order defined in this map. If
deprecated configs are
+ * present in the user's configuration, a warning is logged.
+ */
+ private val configsWithAlternatives = Map[String, Seq[AlternateConfig]](
+ "spark.executor.userClassPathFirst" -> Seq(
+ AlternateConfig("spark.files.userClassPathFirst", "1.3")),
+ "spark.history.fs.update.interval" -> Seq(
+ AlternateConfig("spark.history.fs.update.interval.seconds", "1.4"),
+ AlternateConfig("spark.history.fs.updateInterval", "1.3"),
+ AlternateConfig("spark.history.updateInterval", "1.3"))
+ )
+
+ /**
+ * A view of `configsWithAlternatives` that makes it more efficient to
look up deprecated
+ * config keys.
+ */
+ private val allAlternatives: Map[String, (String, AlternateConfig)] = {
--- End diff --
can you add a description of what the respective strings represent
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]