Skip to content

Conversation

@HeartSaVioR
Copy link
Contributor

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.

@SparkQA
Copy link

SparkQA commented Jan 1, 2019

Test build #100619 has finished for PR 23423 at commit 016ebe0.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • .doc(\"Comma separated list of filter class names to apply to the Spark Web UI.\")
  • .doc(\"Comma-separated list of class names for \"plugins\" implementing \" +

@SparkQA
Copy link

SparkQA commented Jan 1, 2019

Test build #100621 has finished for PR 23423 at commit 1c9ee36.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 1, 2019

Test build #100622 has finished for PR 23423 at commit 5973c59.

  • This patch fails to build.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 1, 2019

Test build #100624 has finished for PR 23423 at commit 8d8721d.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 1, 2019

Test build #100626 has finished for PR 23423 at commit 6dc46aa.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 2, 2019

Test build #100627 has finished for PR 23423 at commit 15a8955.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR HeartSaVioR changed the title [SPARK-26482][CORE] Use ConfigEntry for hardcoded configs for ui categories [WIP][SPARK-26482][CORE] Use ConfigEntry for hardcoded configs for ui categories Jan 2, 2019
@HeartSaVioR
Copy link
Contributor Author

Strange error occurred after rebasing. Changed to WIP. Will fix the error and change the title back.

@SparkQA
Copy link

SparkQA commented Jan 2, 2019

Test build #100638 has finished for PR 23423 at commit caa79d1.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR HeartSaVioR changed the title [WIP][SPARK-26482][CORE] Use ConfigEntry for hardcoded configs for ui categories [SPARK-26482][CORE] Use ConfigEntry for hardcoded configs for ui categories Jan 2, 2019
@SparkQA
Copy link

SparkQA commented Jan 2, 2019

Test build #100646 has finished for PR 23423 at commit 2569a75.

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

Copy link
Contributor

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).

Copy link
Contributor Author

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.

@SparkQA
Copy link

SparkQA commented Jan 3, 2019

Test build #100667 has finished for PR 23423 at commit 31ba1d6.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • .doc(\"Comma separated list of filter class names to apply to the Spark Web UI.\")

@SparkQA
Copy link

SparkQA commented Jan 3, 2019

Test build #100671 has finished for PR 23423 at commit 38dc7be.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor Author

retest this, please

@SparkQA
Copy link

SparkQA commented Jan 3, 2019

Test build #100678 has finished for PR 23423 at commit 38dc7be.

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

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

@HeartSaVioR HeartSaVioR Jan 4, 2019

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?

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@SparkQA
Copy link

SparkQA commented Jan 4, 2019

Test build #100721 has finished for PR 23423 at commit 6bb772d.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor Author

retest this, please

@SparkQA
Copy link

SparkQA commented Jan 4, 2019

Test build #100725 has finished for PR 23423 at commit 6bb772d.

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

Copy link
Member

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)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice finding! Will address.

@HeartSaVioR
Copy link
Contributor Author

@vanzin @kiszk
Addressed review comments. Seems like PRs for subtask of SPARK-26442 can make each other being conflicted, so it might be ideal if we could take review and merge a bit faster, and address some kinds of TODOs (like cleaning up) after all done.

@SparkQA
Copy link

SparkQA commented Jan 7, 2019

Test build #100855 has finished for PR 23423 at commit 6edcc6f.

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

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@gaborgsomogyi
Copy link
Contributor

Just wanted to check, could you merge the master?

@HeartSaVioR
Copy link
Contributor Author

Just rebased (with addressing config changes to the new code), still need to reflect @vanzin's latest comment.

@HeartSaVioR
Copy link
Contributor Author

Applied .toSequence to some configurations in UI and History which are later split by "," in call site.

@SparkQA
Copy link

SparkQA commented Jan 10, 2019

Test build #100993 has finished for PR 23423 at commit 2942c32.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jan 10, 2019

Test build #100987 has finished for PR 23423 at commit a3f06e8.

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

@SparkQA
Copy link

SparkQA commented Jan 10, 2019

Test build #100990 has finished for PR 23423 at commit b3526ff.

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

@SparkQA
Copy link

SparkQA commented Jan 10, 2019

Test build #100994 has finished for PR 23423 at commit 8d61242.

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

@HeartSaVioR
Copy link
Contributor Author

HeartSaVioR commented Jan 10, 2019

@vanzin @kiszk
I guess I addressed review comments and the build is green.
Could you please take a look again? Thanks in advance!

@HeartSaVioR
Copy link
Contributor Author

Just rebased again.

@SparkQA
Copy link

SparkQA commented Jan 10, 2019

Test build #101022 has finished for PR 23423 at commit f5a5772.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@HeartSaVioR
Copy link
Contributor Author

retest this, please

@vanzin
Copy link
Contributor

vanzin commented Jan 10, 2019

Looks good pending tests.

@SparkQA
Copy link

SparkQA commented Jan 11, 2019

Test build #101036 has finished for PR 23423 at commit f5a5772.

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

@vanzin
Copy link
Contributor

vanzin commented Jan 11, 2019

Merging to master.

@asfgit asfgit closed this in d9e4cf6 Jan 11, 2019
.set("spark.ui.enabled", "true")
.set(IS_TESTING.key, "false")
.set(IS_TESTING, false)
.set(UI_ENABLED, true)
Copy link
Member

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.

@HeartSaVioR HeartSaVioR deleted the SPARK-26466 branch January 14, 2019 02:50
jackylee-ch pushed a commit to jackylee-ch/spark that referenced this pull request Feb 18, 2019
…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]>
jackylee-ch pushed a commit to jackylee-ch/spark that referenced this pull request Feb 18, 2019
## 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]>
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.

6 participants