-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-26482][CORE] Use ConfigEntry for hardcoded configs for ui categories #23423
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
Conversation
c9af5ec to
016ebe0
Compare
|
Test build #100619 has finished for PR 23423 at commit
|
|
Test build #100621 has finished for PR 23423 at commit
|
|
Test build #100622 has finished for PR 23423 at commit
|
5973c59 to
8d8721d
Compare
|
Test build #100624 has finished for PR 23423 at commit
|
8d8721d to
6dc46aa
Compare
|
Test build #100626 has finished for PR 23423 at commit
|
6dc46aa to
15a8955
Compare
|
Test build #100627 has finished for PR 23423 at commit
|
|
Strange error occurred after rebasing. Changed to WIP. Will fix the error and change the title back. |
|
Test build #100638 has finished for PR 23423 at commit
|
|
Test build #100646 has finished for PR 23423 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you put UI-related options in a new file (e.g. UI.scala)?
I was going to suggest WebUI.scala but that already exists (albeit in a different place).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the nice suggestion. Will address.
|
Test build #100667 has finished for PR 23423 at commit
|
|
Test build #100671 has finished for PR 23423 at commit
|
|
retest this, please |
|
Test build #100678 has finished for PR 23423 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In spite of the name, all of these ACL-related options are UI options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought these options are common thing between UI and History, but looks like History has its own ACL configurations. Will move to UI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm leaning a bit on the side of removing the UI_ prefix here, and always referencing these as UI.foo in other code.
But don't really feel strongly either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds nice. I'd also like to ensure "how to use configurations" be consistent though: breaking down config package object into multiple (like what we do with UI, History, Kafka, etc) and referring configuration as <object name>.<configuration name> all the cases.
Would it make sense to file issues for cleanup (more groups, change the way to refer configurations) as part of SPARK-26442?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone filed SPARK-22194 a while ago that is in that same spirit.
As for consistency, it may be better to be even more explicit (e.g. config.Blah.CONSTANT) but that is pretty verbose. Some parts of the code already do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're replacing them with the constant anyway, I'd rather have the tests use the new constant.
Then this backwards compatibility could be added to the deprecated stuff in the SparkConf object. But really, given the comment in SecurityManager, maybe we could even drop it altogether.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to drop it, since it's for backward compatibility with 1.x and target version of this patch is 3.0 (new major version). Will drop it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can SparkUI.DEFAULT_PORT go away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is only used for default value on configuration for UI_PORT at least in Spark codebase, so I guess it can be removed once UI_PORT has default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These could be in a Standalone object, but since they're few, probably ok to have them here for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK in either way. I might miss some more configurations on standalone mode so we may have chance to move them in future.
|
Test build #100721 has finished for PR 23423 at commit
|
|
retest this, please |
|
Test build #100725 has finished for PR 23423 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about config.set(ACLS_ENABLE, false)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice finding! Will address.
6bb772d to
6edcc6f
Compare
|
@vanzin @kiszk |
|
Test build #100855 has finished for PR 23423 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could use .toSequence too and clean up call sites a little bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion. Looks like others which are used along with stringToSet can be applied. I'll see which configurations can be applied and make changes.
|
Just wanted to check, could you merge the master? |
6edcc6f to
a3f06e8
Compare
|
Just rebased (with addressing config changes to the new code), still need to reflect @vanzin's latest comment. |
|
Applied |
|
Test build #100993 has finished for PR 23423 at commit
|
2942c32 to
8d61242
Compare
|
Test build #100987 has finished for PR 23423 at commit
|
|
Test build #100990 has finished for PR 23423 at commit
|
|
Test build #100994 has finished for PR 23423 at commit
|
…gories * Rename conflicted configuration field names * Move out UI related configurations to separate object * Address review comments from @vanzin
8d61242 to
f5a5772
Compare
|
Just rebased again. |
|
Test build #101022 has finished for PR 23423 at commit
|
|
retest this, please |
|
Looks good pending tests. |
|
Test build #101036 has finished for PR 23423 at commit
|
|
Merging to master. |
| .set("spark.ui.enabled", "true") | ||
| .set(IS_TESTING.key, "false") | ||
| .set(IS_TESTING, false) | ||
| .set(UI_ENABLED, true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, all. This breaks the K8S integration test.
I'll make a followup PR.
…gories ## What changes were proposed in this pull request? The PR makes hardcoded configs below to use `ConfigEntry`. * spark.ui * spark.ssl * spark.authenticate * spark.master.rest * spark.master.ui * spark.metrics * spark.admin * spark.modify.acl This patch doesn't change configs which are not relevant to SparkConf (e.g. system properties). ## How was this patch tested? Existing tests. Closes apache#23423 from HeartSaVioR/SPARK-26466. Authored-by: Jungtaek Lim (HeartSaVioR) <[email protected]> Signed-off-by: Marcelo Vanzin <[email protected]>
## What changes were proposed in this pull request? This fixes K8S integration test compilation failure introduced by apache#23423 . ```scala $ build/sbt -Pkubernetes-integration-tests test:package ... [error] /Users/dongjoon/APACHE/spark/resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/KubernetesTestComponents.scala:71: type mismatch; [error] found : org.apache.spark.internal.config.OptionalConfigEntry[Boolean] [error] required: String [error] .set(IS_TESTING, false) [error] ^ [error] /Users/dongjoon/APACHE/spark/resource-managers/kubernetes/integration-tests/src/test/scala/org/apache/spark/deploy/k8s/integrationtest/KubernetesTestComponents.scala:71: type mismatch; [error] found : Boolean(false) [error] required: String [error] .set(IS_TESTING, false) [error] ^ [error] two errors found ``` ## How was this patch tested? Pass the K8S integration test. Closes apache#23527 from dongjoon-hyun/SPARK-26482. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
The PR makes hardcoded configs below to use
ConfigEntry.This patch doesn't change configs which are not relevant to SparkConf (e.g. system properties).
How was this patch tested?
Existing tests.