Skip to content
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

Doc ssl #246

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
20 changes: 20 additions & 0 deletions doc/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,26 @@ val spark = SparkSession
val sc = spark.sparkContext
```

The SparkSession can be configured with SSL enabled:

```scala
val spark = SparkSession
.builder()
.appName("myApp")
.master("local[*]")
.config("spark.redis.host", "localhost")
.config("spark.redis.port", "6379")
.config("spark.redis.auth", "passwd")
.config("spark.redis.ssl", "true")
.getOrCreate()

val sc = spark.sparkContext
```

```bash
java -Djavax.net.ssl.trustStorePassword=password -Djavax.net.ssl.trustStore=path/to/keystore -Djavax.net.ssl.trustStoreType=jceks ...
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure we should include this line into the doc. It's only needed if someone starts Redis with a generated CA certificate. And in that case if they submit an app to spark cluster, they will need to configure java options in spark specific way, i.e. using spark.executor.extraJavaOptions and spark.driver.extraJavaOptions (https://spark.apache.org/docs/latest/configuration.html). Maybe we should create a separate doc page describing it since it's more advanced topic (not for a getting-started page). What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sounds like a good idea.

```

### Create RDD

```scala
Expand Down