Skip to content

[SPARK-6046] [core] Reorganize deprecated config support in SparkConf. #5514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

vanzin
Copy link
Contributor

@vanzin vanzin commented Apr 14, 2015

This change tries to follow the chosen way for handling deprecated
configs in SparkConf: all values (old and new) are kept in the conf
object, and newer names take precedence over older ones when
retrieving the value.

Warnings are logged when config options are set, which generally happens
on the driver node (where the logs are most visible).

Marcelo Vanzin added 2 commits April 14, 2015 15:52
This change tries to follow the chosen way for handling deprecated
configs in SparkConf: all values (old and new) are kept in the conf
object, and newer names take precedence over older ones when
retrieving the value.

Warnings are logged when config options are set, which generally happens
on the driver node (where the logs are most visible).
In the process, deprecate the name that mentions the units
now that we can define the unit in the config value itself.

Also tweak a couple of messages.
@SparkQA
Copy link

SparkQA commented Apr 15, 2015

Test build #30282 has finished for PR 5514 at commit ab20351.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch adds the following new dependencies:
    • snappy-java-1.1.1.7.jar
  • This patch removes the following dependencies:
    • snappy-java-1.1.1.6.jar

@@ -86,11 +86,12 @@ follows:
</td>
</tr>
<tr>
<td>spark.history.fs.update.interval.seconds</td>
<td>10</td>
<td>spark.history.fs.update.interval</td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, good catch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, not a catch. I'm adding the new config name (dropping the ".seconds" suffix) since now that we can set the value with units, the suffix looks weird.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch in the sense that a previous PR #5236 missed this config. It's bad if we have documented time configs that can be set one way but not the other.

@@ -134,13 +135,16 @@ class SparkConf(loadDefaults: Boolean) extends Cloneable with Logging {

/** Set multiple parameters together */
def setAll(settings: Traversable[(String, String)]): SparkConf = {
settings.foreach { case (k, v) => logDeprecationWarning(k) }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not your change, but I wonder if this one should just keep calling set. This currently doesn't handle null keys or values

@andrewor14
Copy link
Contributor

This is great. I think this is mergeable as is aside from one functional comment, though I'd like to see the rest of the code style comments addressed as well.

@vanzin
Copy link
Contributor Author

vanzin commented Apr 15, 2015

yeah, let me fix those (especially the seconds vs. ms one).

@SparkQA
Copy link

SparkQA commented Apr 15, 2015

Test build #30355 has finished for PR 5514 at commit 2445d48.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@SparkQA
Copy link

SparkQA commented Apr 15, 2015

Test build #30367 has finished for PR 5514 at commit 9371529.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@SparkQA
Copy link

SparkQA commented Apr 15, 2015

Test build #30366 has finished for PR 5514 at commit 6cf3f11.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.
  • This patch does not change any dependencies.

@srowen
Copy link
Member

srowen commented Apr 16, 2015

LGTM

@asfgit asfgit closed this in 4527761 Apr 17, 2015
@vanzin vanzin deleted the SPARK-6046 branch April 20, 2015 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants