Skip to content
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

[SPARK-6046] Privatize SparkConf.translateConfKey #4797

Closed
wants to merge 1 commit into from

Conversation

andrewor14
Copy link
Contributor

The warning of deprecated configs is actually done when the configs are set, not when they are get. As a result we don't need to explicitly call translateConfKey outside of SparkConf just to print the warning again in vain.

@SparkQA
Copy link

SparkQA commented Feb 26, 2015

Test build #28026 has started for PR 4797 at commit 8fb43e6.

  • This patch merges cleanly.

@vanzin
Copy link
Contributor

vanzin commented Feb 26, 2015

LGTM.

.orElse(conf.getOption(SparkConf.translateConfKey("spark.history.fs.updateInterval", true)))
.orElse(conf.getOption(SparkConf.translateConfKey("spark.history.updateInterval", true)))
.orElse(conf.getOption("spark.history.fs.updateInterval"))
.orElse(conf.getOption("spark.history.updateInterval"))
Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, it's not necessary to call get with the old names here. The code in SparkConf will print the deprecation warning when the old option names are set, and internally translateKey will always ensure the new option name is used. So the two orElse here are basically reduntant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, with the existing code that is the case. However, there's an issue with translating the configs on conf.set that I outline in #4799. Once we fix that we'll still need the orElses here, but let's move the discussion to that PR instead.

@SparkQA
Copy link

SparkQA commented Feb 27, 2015

Test build #28026 has finished for PR 4797 at commit 8fb43e6.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/28026/
Test PASSed.

@andrewor14
Copy link
Contributor Author

Merging into master, thanks.

@asfgit asfgit closed this in 7c99a01 Feb 27, 2015
@andrewor14 andrewor14 deleted the warn-deprecated-config branch February 27, 2015 07:01
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