Skip to content

Conversation

@vanzin
Copy link
Contributor

@vanzin vanzin commented Aug 2, 2016

Both core and sql have slightly different code that does variable substitution
of config values. This change refactors that code and encapsulates the logic
of reading config values and expading variables in a new helper class, which
can be configured so that both core and sql can use it without losing existing
functionality, and allows for easier testing and makes it easier to add more
features in the future.

Tested with existing and new unit tests, and by running spark-shell with
some configs referencing variables and making sure it behaved as expected.

Both core and sql have slightly different code that does variable substitution
of config values. This change refactors that code and encapsulates the logic
of reading config values and expading variables in a new helper class, which
can be configured so that both core and sql can use it without losing existing
functionality, and allows for easier testing and makes it easier to add more
features in the future.

Tested with existing and new unit tests, and by running spark-shell with
some configs referencing variables and making sure it behaved as expected.
@SparkQA
Copy link

SparkQA commented Aug 3, 2016

Test build #63142 has finished for PR 14468 at commit 9d88d87.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • class ConfigReader(conf: ConfigProvider)

@SparkQA
Copy link

SparkQA commented Aug 3, 2016

Test build #63179 has finished for PR 14468 at commit 290c964.

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

@vanzin
Copy link
Contributor Author

vanzin commented Aug 3, 2016

@rxin want to take a look since you added VariableSubstitution? Also @srowen since he looked at my previous patch.

The depth config is not used anymore but I don't know if it's kosher to remove SQLConf constants; I saw some asserts in the code that I assume might be triggered by users. Also I assume that the circular reference check is enough so we don't need the depth check.

@SparkQA
Copy link

SparkQA commented Aug 3, 2016

Test build #63187 has finished for PR 14468 at commit eba7c6d.

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

@vanzin
Copy link
Contributor Author

vanzin commented Aug 9, 2016

Friendly ping.

@vanzin
Copy link
Contributor Author

vanzin commented Aug 15, 2016

Given the overwhelming amount of feedback, merging to master.

@asfgit asfgit closed this in 5da6c4b Aug 15, 2016
@vanzin vanzin deleted the SPARK-16671 branch August 15, 2016 23:14
ColZer pushed a commit to ColZer/spark that referenced this pull request Aug 16, 2016
Both core and sql have slightly different code that does variable substitution
of config values. This change refactors that code and encapsulates the logic
of reading config values and expading variables in a new helper class, which
can be configured so that both core and sql can use it without losing existing
functionality, and allows for easier testing and makes it easier to add more
features in the future.

Tested with existing and new unit tests, and by running spark-shell with
some configs referencing variables and making sure it behaved as expected.

Author: Marcelo Vanzin <vanzin@cloudera.com>

Closes apache#14468 from vanzin/SPARK-16671.
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.

2 participants