From 73d8a557b1392cefc4bcc05bf0757e4e79b5249a Mon Sep 17 00:00:00 2001 From: JoyinQ <56883733+Joyinqin@users.noreply.github.com> Date: Thu, 10 Dec 2020 14:57:21 +0800 Subject: [PATCH] update document to use tiflash in tispark (#4382) * update document to use tiflash in tispark * Update tiflash/use-tiflash.md * Update use-tiflash.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- tiflash/use-tiflash.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tiflash/use-tiflash.md b/tiflash/use-tiflash.md index c88a26c4977e7..f679c21e68ce8 100644 --- a/tiflash/use-tiflash.md +++ b/tiflash/use-tiflash.md @@ -193,25 +193,25 @@ In the above three ways of reading TiFlash replicas, engine isolation specifies ## Use TiSpark to read TiFlash replicas -Currently, you can use TiSpark to read TiFlash replicas in a method similar to the engine isolation in TiDB. This method is to configure the `spark.tispark.use.tiflash` parameter to `true` (or `false`). +Currently, you can use TiSpark to read TiFlash replicas in a method similar to the engine isolation in TiDB. This method is to configure the `spark.tispark.isolation_read_engines` parameter. The parameter value defaults to `tikv,tiflash`, which means that TiDB reads data from TiFlash or from TiKV according to CBO's selection. If you set the parameter value to `tiflash`, it means that TiDB forcibly reads data from TiFlash. > **Notes** > > When this parameter is set to `true`, only the TiFlash replicas of all tables involved in the query are read and these tables must have TiFlash replicas; for tables that do not have TiFlash replicas, an error is reported. When this parameter is set to `false`, only the TiKV replica is read. -You can configure this parameter in either of the following ways: +You can configure this parameter in one of the following ways: * Add the following item in the `spark-defaults.conf` file: ``` - spark.tispark.use.tiflash true + spark.tispark.isolation_read_engines tiflash ``` -* Add `--conf spark.tispark.use.tiflash=true` in the initialization command when initializing Spark shell or Thrift server. +* Add `--conf spark.tispark.isolation_read_engines=tiflash` in the initialization command when initializing Spark shell or Thrift server. -* Set `spark.conf.set("spark.tispark.use.tiflash", true)` in Spark shell in a real-time manner. +* Set `spark.conf.set("spark.tispark.isolation_read_engines", "tiflash")` in Spark shell in a real-time manner. -* Set `set spark.tispark.use.tiflash=true` in Thrift server after the server is connected via beeline. +* Set `set spark.tispark.isolation_read_engines=tiflash` in Thrift server after the server is connected via beeline. ## Supported push-down calculations