-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-15844] [core] HistoryServer doesn't come up if spark.authenticate = true #13579
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
Changes from 4 commits
dbc1c3f
01a0220
80608da
3b3db69
ad35cd9
f375682
033f21e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,7 +75,7 @@ class HistoryServerSuite extends SparkFunSuite with BeforeAndAfter with Matchers | |
| .set("spark.testing", "true") | ||
| provider = new FsHistoryProvider(conf) | ||
| provider.checkForLogs() | ||
| val securityManager = new SecurityManager(conf) | ||
| val securityManager = HistoryServer.createSecurityManager(conf) | ||
|
|
||
| server = new HistoryServer(conf, provider, securityManager, 18080) | ||
| server.initialize() | ||
|
|
@@ -349,6 +349,17 @@ class HistoryServerSuite extends SparkFunSuite with BeforeAndAfter with Matchers | |
|
|
||
| } | ||
|
|
||
| /** | ||
| * Verify that the security manager needed for the history server can be instantiated | ||
| * even if spark.authenticate is set | ||
| */ | ||
| test("SecurityManagerStartsWithSecureShuffle") { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: can you write a test description like the others in the class, instead of this camel-cased string? Also spark.authenticate is not (just) for secure shuffle, so the string itself is not really accurate. Just mention spark.authenticate. |
||
| val conf = new SparkConf() | ||
| .set("spark.testing", "true") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: indented too far
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed, along with IDE settings |
||
| .set(SecurityManager.SPARK_AUTH_CONF, "true") | ||
| HistoryServer.createSecurityManager(conf) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a comment explaining that the SecurityManager would throw an exception if spark.authenticate was true? (I think that'd be better than the comment you have before the test.)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done. You know, this test could be merged into |
||
| } | ||
|
|
||
| test("incomplete apps get refreshed") { | ||
|
|
||
| implicit val webDriver: WebDriver = new HtmlUnitDriver | ||
|
|
||
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 just inline this method? That avoids adding a method with a single call, and pretty much a copy of the whole scaladoc of the other method you're adding.
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.
done
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've inlined it, which highlights something else. if the debug message is viewed as unimportant, the if() clause can be pulled completely, and the security flag always set to false.