You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+98-51Lines changed: 98 additions & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,28 +9,59 @@ It is supposed to:
9
9
10
10
## How to build
11
11
12
+
### Gradle
13
+
14
+
Alternatively, you can build `tikv-client-java` with gradle.
15
+
16
+
The following command will build the project.
17
+
18
+
```
19
+
gradle init
20
+
gradle clean build -x test
21
+
```
22
+
23
+
To make a jar with dependencies
24
+
25
+
```
26
+
gradle clean fatJar -x test
27
+
```
28
+
29
+
The jar can be found in `./build/libs/`
30
+
31
+
### Maven
32
+
12
33
The alternative way to build a usable jar for testing will be
34
+
13
35
```
14
36
mvn clean install -Dmaven.test.skip=true
15
37
```
16
38
17
39
The following command can install dependencies for you.
40
+
18
41
```
19
42
mvn package
20
43
```
21
44
45
+
The jar can be found in `./target/`
46
+
47
+
### Bazel
48
+
22
49
Alternatively, you can use `bazel` for much faster build. When you try this approach, you should run `git submodule update --init --recursive` before you build project.
23
50
24
51
Making a uber jar:
52
+
25
53
```
26
54
make uber_jar
27
55
```
56
+
28
57
run Main class:
58
+
29
59
```
30
60
make run
31
61
```
32
62
33
63
run test cases:
64
+
34
65
```
35
66
make test
36
67
```
@@ -39,8 +70,9 @@ this project is designed to hook with `pd` and `tikv` which you can find in `Pin
39
70
40
71
When you work with this project, you have to communicate with `pd` and `tikv`. Please run TiKV and PD in advance.
41
72
42
-
## Raw TiKV-Client in Java
43
-
Java Implementation of Raw TiKV-Client
73
+
## Component: Raw Ti-Client in Java
74
+
75
+
Java Implementation of Raw TiKV-Client to support RawKVClient commands.
44
76
45
77
Demo is avaliable in [KVRawClientTest](https://github.com/birdstorm/KVRawClientTest/)
46
78
@@ -49,79 +81,94 @@ Demo is avaliable in [KVRawClientTest](https://github.com/birdstorm/KVRawClientT
49
81
mvn clean install -Dmaven.test.skip=true
50
82
```
51
83
52
-
### Use as maven dependency
53
-
After building, add following lines into your `pom.xml`
84
+
### Add to dependency
85
+
86
+
#### Use jar for binary
87
+
88
+
Add your jar built with all dependencies into you project's library to use `tikv-client-java` as dependency
89
+
90
+
#### Use as maven dependency
91
+
92
+
After building, add following lines into your `pom.xml` if you are using Maven
93
+
54
94
```xml
55
95
<dependency>
56
-
<groupId>org.tikv</groupId>
57
-
<artifactId>tikv-client-java</artifactId>
58
-
<version>2.0-SNAPSHOT</version>
96
+
<groupId>org.tikv</groupId>
97
+
<artifactId>tikv-client-java</artifactId>
98
+
<version>2.0-SNAPSHOT</version>
59
99
</dependency>
60
100
```
61
101
62
102
### Entrance
63
-
`com.pingcap.tikv.RawKVClient`
103
+
`org.tikv.raw.RawKVClient`
64
104
65
-
### API
105
+
### Create a RawKVClient
66
106
67
107
```java
68
-
/**
69
-
* create a RawKVClient using specific pd addresses
70
-
*
71
-
* @param address pd addresses(comma seperated)
72
-
*/
73
-
static RawKVClient create(String address)
108
+
import org.tikv.common.TiSession;
109
+
import org.tikv.raw.RawKVClient;
110
+
111
+
public class Main {
112
+
public static void main() {
113
+
// You MUST create a raw configuration if you are using RawKVClient.
0 commit comments