diff --git a/docs/configurations/01_catalog_configurations.md b/docs/configurations/01_catalog_configurations.md index 1687502f..0efeba8b 100644 --- a/docs/configurations/01_catalog_configurations.md +++ b/docs/configurations/01_catalog_configurations.md @@ -16,19 +16,19 @@ license: | ### Single Instance -Suppose you have one ClickHouse instance which installed on `10.0.0.1` and exposes HTTP on `8123`. +Suppose you have one ClickHouse instance which installed on `10.0.0.1` and exposes HTTP endpoint on `8123`. Edit `$SPARK_HOME/conf/spark-defaults.conf`. ``` -######################################## +#################################################################################### ## register a catalog named "clickhouse" -######################################## +#################################################################################### spark.sql.catalog.clickhouse xenon.clickhouse.ClickHouseCatalog -################################################ +#################################################################################### ## basic configurations for "clickhouse" catalog -################################################ +#################################################################################### spark.sql.catalog.clickhouse.host 10.0.0.1 spark.sql.catalog.clickhouse.protocol http spark.sql.catalog.clickhouse.http_port 8123 @@ -36,9 +36,9 @@ spark.sql.catalog.clickhouse.user default spark.sql.catalog.clickhouse.password spark.sql.catalog.clickhouse.database default -############################################################### +#################################################################################### ## custom options of clickhouse-client for "clickhouse" catalog -############################################################### +#################################################################################### spark.sql.catalog.clickhouse.option.async false spark.sql.catalog.clickhouse.option.client_name spark ``` @@ -49,29 +49,29 @@ Then you can access ClickHouse table `.` from Spark SQL by usin For ClickHouse cluster, give an unique catalog name for each instances. -Suppose you have two ClickHouse instances, one installed on `10.0.0.1` and exposes HTTP on port `8123` named -clickhouse1, and another installed on `10.0.0.2` and exposes HTTP on port `8123` named clickhouse2. +Suppose you have two ClickHouse instances, one installed on `10.0.0.1` and exposes HTTPS endpoint on port `8443` +named clickhouse1, and another installed on `10.0.0.2` and exposes HTTPS endpoint on port `8443` named clickhouse2. Edit `$SPARK_HOME/conf/spark-defaults.conf`. ``` spark.sql.catalog.clickhouse1 xenon.clickhouse.ClickHouseCatalog spark.sql.catalog.clickhouse1.host 10.0.0.1 -spark.sql.catalog.clickhouse1.protocol http -spark.sql.catalog.clickhouse1.http_port 8123 +spark.sql.catalog.clickhouse1.protocol https +spark.sql.catalog.clickhouse1.http_port 8443 spark.sql.catalog.clickhouse1.user default spark.sql.catalog.clickhouse1.password spark.sql.catalog.clickhouse1.database default -spark.sql.catalog.clickhouse1.option.async false +spark.sql.catalog.clickhouse1.option.ssl true spark.sql.catalog.clickhouse2 xenon.clickhouse.ClickHouseCatalog spark.sql.catalog.clickhouse2.host 10.0.0.2 -spark.sql.catalog.clickhouse2.protocol http -spark.sql.catalog.clickhouse2.http_port 8123 +spark.sql.catalog.clickhouse2.protocol https +spark.sql.catalog.clickhouse2.http_port 8443 spark.sql.catalog.clickhouse2.user default spark.sql.catalog.clickhouse2.password spark.sql.catalog.clickhouse2.database default -spark.sql.catalog.clickhouse2.option.async false +spark.sql.catalog.clickhouse2.option.ssl true ``` Then you can access clickhouse1 table `.` from Spark SQL by `clickhouse1..`,