From 927ca07c0e8e973dc6c8f47e81e38df6559355b0 Mon Sep 17 00:00:00 2001 From: Liangliang Gu Date: Wed, 16 Jun 2021 15:31:05 +0800 Subject: [PATCH 1/2] cherry pick #197 to release-3.1 Signed-off-by: ti-srebot --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7c27f447c3f..7650df47634 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ The jar can be found in `./target/` ## Usage -This project is designed to hook with `pd` and `tikv` which you can find in `PingCAP` github page. +This project is designed to hook with `[pd](https://github.com/tikv/pd)` and `[tikv](https://github.com/tikv/tikv)`. When you work with this project, you have to communicate with `pd` and `tikv`. Please run TiKV and PD in advance. @@ -56,7 +56,7 @@ After building, add following lines into your `pom.xml` if you are using Maven org.tikv tikv-client-java - 3.0.0 + 3.0.1 ``` @@ -66,6 +66,7 @@ After building, add following lines into your `pom.xml` if you are using Maven ### Create a RawKVClient ```java +import org.tikv.common.TiConfiguration; import org.tikv.common.TiSession; import org.tikv.raw.RawKVClient; @@ -74,7 +75,7 @@ public class Main { // You MUST create a raw configuration if you are using RawKVClient. TiConfiguration conf = TiConfiguration.createRawDefault(YOUR_PD_ADDRESSES); TiSession session = TiSession.create(conf); - RawKVClient = session.createRawKVClient(); + RawKVClient client = session.createRawClient(); } } ``` @@ -133,14 +134,13 @@ List scan(ByteString startKey, int limit) void delete(ByteString key) ``` -## Java Client 配置参数 +## Java Client Configuration Parameter -本文介绍了与部署使用 Java Client 相关的配置参数。 +### JVM Parameter -### 常用配置 JVM 参数 - -以下包括常用配置的 JVM 相关参数。 +The following includes JVM related parameters. +<<<<<<< HEAD ####tikv.pd.addresses - pd 集群的地址,逗号分隔 - 默认值 127.0.0.1:2379 @@ -152,11 +152,25 @@ void delete(ByteString key) ####tikv.grpc.scan_timeout_in_ms - scan/delete range grpc 请求的 timeout 时间 - 默认值 20s +======= +#### tikv.pd.addresses +- pd addresses, separated by comma +- default: 127.0.0.1:2379 + +#### tikv.grpc.timeout_in_ms +- timeout of grpc request +- default: 600ms + +#### tikv.grpc.scan_timeout_in_ms +- timeout of scan/delete range grpc request +- default: 20s +>>>>>>> 7fe64c6... update readme (#197) -### ThreadPool 配置 JVM 参数 +### ThreadPool Parameter -以下包括 ThreadPool 相关的参数及其默认配置,可通过 JVM 参数传入。 +The following includes ThreadPool related parameters, which can be passed in through JVM parameters. +<<<<<<< HEAD ####tikv.batch_get_concurrency - Client 端 batchGet 请求的线程池大小 - 默认值 20 @@ -176,6 +190,27 @@ void delete(ByteString key) ####tikv.delete_range_concurrency - Client 端 deleteRange 请求的线程池大小 - 默认值 20 +======= +#### tikv.batch_get_concurrency +- the thread pool size of batchGet on client side +- default: 20 + +#### tikv.batch_put_concurrency +- the thread pool size of batchPut on client side +- default: 20 + +#### tikv.batch_delete_concurrency +- the thread pool size of batchDelete on client side +- default: 20 + +#### tikv.batch_scan_concurrency +- the thread pool size of batchScan on client side +- default: 5 + +#### tikv.delete_range_concurrency +- the thread pool size of deleteRange on client side +- default: 20 +>>>>>>> 7fe64c6... update readme (#197) ## License From a8737a12052066d908b8f65d24e5d416ff2a6821 Mon Sep 17 00:00:00 2001 From: birdstorm Date: Fri, 25 Jun 2021 14:54:02 +0800 Subject: [PATCH 2/2] resolve conflicts Signed-off-by: birdstorm --- README.md | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/README.md b/README.md index 7650df47634..5a25376593d 100644 --- a/README.md +++ b/README.md @@ -140,19 +140,6 @@ void delete(ByteString key) The following includes JVM related parameters. -<<<<<<< HEAD -####tikv.pd.addresses -- pd 集群的地址,逗号分隔 -- 默认值 127.0.0.1:2379 - -####tikv.grpc.timeout_in_ms -- grpc 请求的 timeout 时间 -- 默认值 600ms - -####tikv.grpc.scan_timeout_in_ms -- scan/delete range grpc 请求的 timeout 时间 -- 默认值 20s -======= #### tikv.pd.addresses - pd addresses, separated by comma - default: 127.0.0.1:2379 @@ -164,33 +151,11 @@ The following includes JVM related parameters. #### tikv.grpc.scan_timeout_in_ms - timeout of scan/delete range grpc request - default: 20s ->>>>>>> 7fe64c6... update readme (#197) ### ThreadPool Parameter The following includes ThreadPool related parameters, which can be passed in through JVM parameters. -<<<<<<< HEAD -####tikv.batch_get_concurrency -- Client 端 batchGet 请求的线程池大小 -- 默认值 20 - -####tikv.batch_put_concurrency -- Client 端 batchPut 请求的线程池大小 -- 默认值 20 - -####tikv.batch_delete_concurrency -- Client 端 batchDelete 请求的线程池大小 -- 默认值 20 - -####tikv.batch_scan_concurrency -- Client 端 batchScan 请求的线程池大小 -- 默认值 5 - -####tikv.delete_range_concurrency -- Client 端 deleteRange 请求的线程池大小 -- 默认值 20 -======= #### tikv.batch_get_concurrency - the thread pool size of batchGet on client side - default: 20 @@ -210,7 +175,6 @@ The following includes ThreadPool related parameters, which can be passed in thr #### tikv.delete_range_concurrency - the thread pool size of deleteRange on client side - default: 20 ->>>>>>> 7fe64c6... update readme (#197) ## License