GitHub user wangmiao1981 opened a pull request:
https://github.com/apache/spark/pull/14674
[SPARK-17002][SPARK-CORE]: Document that spark.ssl.protocol. is required
for SSL
## What changes were proposed in this pull request?
`spark.ssl.enabled`=true, but failing to set `spark.ssl.protocol` will fail
and throw meaningless exception. `spark.ssl.protocol` is required when
`spark.ssl.enabled`.
Improvement: require `spark.ssl.protocol` when initializing SSLContext,
otherwise throws an exception to indicate that.
Remove the OrElse("default").
Document this requirement in configure.md
## How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration
tests, manual tests)
Manual tests:
Build document and check document
Configure `spark.ssl.enabled` only, it throws exception below:
6/08/16 16:04:37 INFO SecurityManager: SecurityManager: authentication
disabled; ui acls disabled; users with view permissions: Set(mwang); groups
with view permissions: Set(); users with modify permissions: Set(mwang);
groups with modify permissions: Set()
Exception in thread "main" java.lang.IllegalArgumentException: requirement
failed: spark.ssl.protocol is required when enabling SSL connections.
at scala.Predef$.require(Predef.scala:224)
at org.apache.spark.SecurityManager.<init>(SecurityManager.scala:285)
at
org.apache.spark.deploy.master.Master$.startRpcEnvAndEndpoint(Master.scala:1026)
at org.apache.spark.deploy.master.Master$.main(Master.scala:1011)
at org.apache.spark.deploy.master.Master.main(Master.scala)
Configure `spark.ssl.protocol` and `spark.ssl.protocol`
It works fine.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/wangmiao1981/spark ssl
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/14674.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 #14674
----
commit 6cc46b927eeeebda28a707fcb5a3471cf3ed16ca
Author: [email protected] <[email protected]>
Date: 2016-08-16T22:56:49Z
add require for ssl.protocol
----
---
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]