Skip to content

Conversation

@gerashegalov
Copy link
Contributor

@gerashegalov gerashegalov commented Dec 27, 2017

What changes were proposed in this pull request?

Register spark.history.ui.port as a known spark conf to be used in substitution expressions even if it's not set explicitly.

How was this patch tested?

Added unit test to demonstrate the issue

@srowen
Copy link
Member

srowen commented Dec 28, 2017

CC @vanzin

Copy link
Contributor

@vanzin vanzin left a comment

Choose a reason for hiding this comment

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

Idea sounds ok, although it requires the client configuration to also contain history server configuration to properly work, which may not be the case in the most common case.

It needs to be rebased, though.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just add this to the ApplicationMaster object instead of creating yet another utils object... and also add private[spark] to the method there.

Copy link
Contributor

Choose a reason for hiding this comment

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

ResetSystemProperties not needed since you're not changing system properties.

Copy link
Contributor

Choose a reason for hiding this comment

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

Logging not needed, you're not logging anything.

Copy link
Contributor

Choose a reason for hiding this comment

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

Use assert(foo === bar) (and then you also don't need Matchers).

Also, better to use interpolation to check. e.g. foo === s"http://$host:$post/history/$appId/$attemptId". You can set the history port in SparkConf to avoid having to read the default value in some other way.

Copy link
Contributor

Choose a reason for hiding this comment

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

These imports will fail style checks. Make sure to run them locally.

Copy link
Contributor

Choose a reason for hiding this comment

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

Multi-line parameter lists are double-indented.

@gerashegalov gerashegalov force-pushed the gera/register-SHS-port-conf branch from 04fa7fd to 03e0e27 Compare January 4, 2018 23:38
@gerashegalov
Copy link
Contributor Author

Thanks @vanzin for review. Please take a look again

@vanzin
Copy link
Contributor

vanzin commented Jan 4, 2018

ok to test

@SparkQA
Copy link

SparkQA commented Jan 5, 2018

Test build #85705 has finished for PR 20098 at commit 03e0e27.

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

@vanzin
Copy link
Contributor

vanzin commented Jan 6, 2018

Merging to master / 2.3.

@asfgit asfgit closed this in ea95683 Jan 6, 2018
asfgit pushed a commit that referenced this pull request Jan 6, 2018
## What changes were proposed in this pull request?

Register spark.history.ui.port as a known spark conf to be used in substitution expressions even if it's not set explicitly.

## How was this patch tested?

Added unit test to demonstrate the issue

Author: Gera Shegalov <[email protected]>
Author: Gera Shegalov <[email protected]>

Closes #20098 from gerashegalov/gera/register-SHS-port-conf.

(cherry picked from commit ea95683)
Signed-off-by: Marcelo Vanzin <[email protected]>
@gerashegalov gerashegalov deleted the gera/register-SHS-port-conf branch January 6, 2018 10:54
@gerashegalov
Copy link
Contributor Author

Thank you for review and commit @vanzin !

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