Skip to content

Commit

Permalink
update document to use tiflash in tispark (pingcap#4382)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
Joyinqin and TomShawn authored Dec 10, 2020
1 parent fcfd898 commit 73d8a55
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tiflash/use-tiflash.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73d8a55

Please sign in to comment.