GitHub user steveloughran opened a pull request:
https://github.com/apache/spark/pull/13579
[SPARK-15844] [core] HistoryServer doesn't come up if spark.authenticate =
true
## What changes were proposed in this pull request?
During history server startup, the spark configuration is examined. If
security.authentication is
set, a dummy key is added, so that {{SecurityManager}} can be created.
It'd be more elegant to actually remove the unneeded option, but the
environment variable complicates
things: you can't unset/override the env var in the spark configuration.
## How was this patch tested?
New Unit test sets the `spark.authenticate` property to true, tries to
create a security manager via a new package-private method
`HistoryServer.createSecurityManager(SparkConf)`. This method is also used in
`HistoryServer.main`, so the patching will also take place there.
Ideally, the code inside the main() method would be split into instantiate
and "spin awaiting completion". That would guarantee that the codepath used in
the production history server launch is being followed. If people would prefer
that, I'll happily do it.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/steveloughran/spark
history/SPARK-15844-security
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/13579.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #13579
----
commit 3c1840ee0d0e0e45e08c4ef1cc9b8b84075b271e
Author: Steve Loughran <[email protected]>
Date: 2016-06-09T16:09:54Z
SPARK-15844 HistoryServer doesn't come up if spark.authenticate = true
commit 26d1ad243c9c6db227a13303c3781546634794db
Author: Steve Loughran <[email protected]>
Date: 2016-06-09T16:17:41Z
[SPARK-15844] HistoryServer doesn't come up if spark.authenticate = true;
making new (visible for test) method private to the package
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]