Skip to content
Snippets Groups Projects
user avatar
wm624@hotmail.com authored
## 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.

Author: wm624@hotmail.com <wm624@hotmail.com>

Closes #14674 from wangmiao1981/ssl.
e328f577
History
Name Last commit Last update
..
_data
_includes
_layouts
_plugins
css
img
js
README.md
_config.yml
api.md
building-spark.md
cluster-overview.md
configuration.md
contributing-to-spark.md
ec2-scripts.md
graphx-programming-guide.md
hadoop-provided.md
hardware-provisioning.md
index.md
java-programming-guide.md
job-scheduling.md
ml-advanced.md
ml-ann.md
ml-classification-regression.md
ml-clustering.md
ml-collaborative-filtering.md
ml-decision-tree.md
ml-ensembles.md
ml-features.md
ml-guide.md
ml-linear-methods.md
ml-migration-guides.md
ml-pipeline.md
ml-survival-regression.md
ml-tuning.md
mllib-classification-regression.md
mllib-clustering.md
mllib-collaborative-filtering.md
mllib-data-types.md
mllib-decision-tree.md
mllib-dimensionality-reduction.md
mllib-ensembles.md
mllib-evaluation-metrics.md
mllib-feature-extraction.md
mllib-frequent-pattern-mining.md
mllib-guide.md
mllib-isotonic-regression.md
mllib-linear-methods.md
mllib-migration-guides.md
mllib-naive-bayes.md
mllib-optimization.md
mllib-pmml-model-export.md
mllib-statistics.md
monitoring.md
programming-guide.md
python-programming-guide.md
quick-start.md
running-on-mesos.md
running-on-yarn.md
scala-programming-guide.md
security.md
spark-standalone.md
sparkr.md
sql-programming-guide.md
storage-openstack-swift.md
streaming-custom-receivers.md
streaming-flume-integration.md
streaming-kafka-0-10-integration.md
streaming-kafka-0-8-integration.md
streaming-kafka-integration.md
streaming-kinesis-integration.md
streaming-programming-guide.md
structured-streaming-programming-guide.md
submitting-applications.md
tuning.md