Skip to content

Commit 3ccdc48

Browse files
committed
Docs: Add HTTPS configuration example
1 parent 7b79661 commit 3ccdc48

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

docs/configurations/01_catalog_configurations.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,30 @@ license: |
1616
<!--begin-include-->
1717
### Single Instance
1818

19-
Suppose you have one ClickHouse instance which installed on `10.0.0.1` and exposes HTTP on `8123`.
19+
Suppose you have one ClickHouse instance which installed on `10.0.0.1` and exposes HTTP endpoint on `8123`.
2020

2121
Edit `$SPARK_HOME/conf/spark-defaults.conf`.
2222

2323
```
24-
########################################
24+
####################################################################################
2525
## register a catalog named "clickhouse"
26-
########################################
26+
####################################################################################
2727
spark.sql.catalog.clickhouse xenon.clickhouse.ClickHouseCatalog
2828
29-
################################################
29+
####################################################################################
3030
## basic configurations for "clickhouse" catalog
31-
################################################
31+
####################################################################################
3232
spark.sql.catalog.clickhouse.host 10.0.0.1
3333
spark.sql.catalog.clickhouse.protocol http
3434
spark.sql.catalog.clickhouse.http_port 8123
3535
spark.sql.catalog.clickhouse.user default
3636
spark.sql.catalog.clickhouse.password
3737
spark.sql.catalog.clickhouse.database default
3838
39-
###############################################################
39+
####################################################################################
4040
## custom options of clickhouse-client for "clickhouse" catalog
41-
###############################################################
41+
####################################################################################
42+
spark.sql.catalog.clickhouse.option.ssl false
4243
spark.sql.catalog.clickhouse.option.async false
4344
spark.sql.catalog.clickhouse.option.client_name spark
4445
```
@@ -49,29 +50,29 @@ Then you can access ClickHouse table `<ck_db>.<ck_table>` from Spark SQL by usin
4950

5051
For ClickHouse cluster, give an unique catalog name for each instances.
5152

52-
Suppose you have two ClickHouse instances, one installed on `10.0.0.1` and exposes HTTP on port `8123` named
53-
clickhouse1, and another installed on `10.0.0.2` and exposes HTTP on port `8123` named clickhouse2.
53+
Suppose you have two ClickHouse instances, one installed on `10.0.0.1` and exposes HTTPS endpoint on port `8443`
54+
named clickhouse1, and another installed on `10.0.0.2` and exposes HTTPS endpoint on port `8443` named clickhouse2.
5455

5556
Edit `$SPARK_HOME/conf/spark-defaults.conf`.
5657

5758
```
5859
spark.sql.catalog.clickhouse1 xenon.clickhouse.ClickHouseCatalog
5960
spark.sql.catalog.clickhouse1.host 10.0.0.1
60-
spark.sql.catalog.clickhouse1.protocol http
61-
spark.sql.catalog.clickhouse1.http_port 8123
61+
spark.sql.catalog.clickhouse1.protocol https
62+
spark.sql.catalog.clickhouse1.http_port 8443
6263
spark.sql.catalog.clickhouse1.user default
6364
spark.sql.catalog.clickhouse1.password
6465
spark.sql.catalog.clickhouse1.database default
65-
spark.sql.catalog.clickhouse1.option.async false
66+
spark.sql.catalog.clickhouse1.option.ssl true
6667
6768
spark.sql.catalog.clickhouse2 xenon.clickhouse.ClickHouseCatalog
6869
spark.sql.catalog.clickhouse2.host 10.0.0.2
69-
spark.sql.catalog.clickhouse2.protocol http
70-
spark.sql.catalog.clickhouse2.http_port 8123
70+
spark.sql.catalog.clickhouse2.protocol https
71+
spark.sql.catalog.clickhouse2.http_port 8443
7172
spark.sql.catalog.clickhouse2.user default
7273
spark.sql.catalog.clickhouse2.password
7374
spark.sql.catalog.clickhouse2.database default
74-
spark.sql.catalog.clickhouse2.option.async false
75+
spark.sql.catalog.clickhouse2.option.ssl true
7576
```
7677

7778
Then you can access clickhouse1 table `<ck_db>.<ck_table>` from Spark SQL by `clickhouse1.<ck_db>.<ck_table>`,

0 commit comments

Comments
 (0)