Skip to content

Commit

Permalink
Refactor metadata-repository document (apache#20627)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaojinchao95 authored Aug 29, 2022
1 parent 7e555d6 commit 3e25855
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/document/content/dev-manual/mode.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ chapter = true

### 已知实现

| *配置标识* | *详细说明* | *全限定类名* |
| *配置标识* | *详细说明* | *全限定类名* |
| -------------------- | -------------------- | ---------------------------- |
| H2 | H2-based persistence | [`org.apache.shardingsphere.mode.repository.standalone.h2.H2Repository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-jdbc-h2/src/main/java/org/apache/shardingsphere/mode/repository/standalone/h2/H2Repository.java) |
| H2 | 基于 H2 的持久化 | [`org.apache.shardingsphere.mode.repository.standalone.h2.H2Repository`](https://github.com/apache/shardingsphere/blob/master/shardingsphere-mode/shardingsphere-mode-type/shardingsphere-standalone-mode/shardingsphere-standalone-mode-repository/shardingsphere-standalone-mode-repository-provider/shardingsphere-standalone-mode-repository-jdbc-h2/src/main/java/org/apache/shardingsphere/mode/repository/standalone/h2/H2Repository.java) |

## ClusterPersistRepository

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@ Apache ShardingSphere 为不同的运行模式提供了不同的元数据持久

### 文件持久化

类型:File
类型:JDBC

适用模式:Standalone

可配置属性:

| *名称* | *数据类型* | *说明* | *默认值* |
| ---------------------------- | --------- | ---------------- | --------------- |
| path | String | 元数据存储路径 | .shardingsphere|
| ---------------------------- | --------- | ----------------- | --------------- |
| provider | String | 元数据存储类型 | H2 |
| jdbc_url | String | JDBC URL | jdbc:h2:mem:config;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL |
| username | String | 账号 | sa |
| password | String | 密码 | |


### ZooKeeper 持久化
Expand Down Expand Up @@ -64,9 +67,12 @@ Apache ShardingSphere 为不同的运行模式提供了不同的元数据持久
mode:
type: Standalone
repository:
type: File
type: JDBC
props:
path: ~/user/.shardingsphere
provider: H2
jdbc_url: jdbc:h2:mem:config;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
username: test
password: Test@123
overwrite: false
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ Apache ShardingSphere provides different metadata persistence methods for differ
## Parameters
### File Repository

Type: File
Type: JDBC

Mode: Standalone

Attributes:

| *Name* | *Type* | *Description* | *Default Value* |
| ---------------------------- | ------ | --------------------------------- | ----------------------------------------------------------------------- |
|path| String| Path for metadata persist |.shardingsphere|
| provider | String | Type for metadata persist | H2 |
| jdbc_url | String | JDBC URL | jdbc:h2:mem:config;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL |
| username | String | username | sa |
| password | String | password | |


### ZooKeeper Repository

Expand Down Expand Up @@ -62,9 +66,12 @@ Attributes:
mode:
type: Standalone
repository:
type: File
type: JDBC
props:
path: ~/user/.shardingsphere
provider: H2
jdbc_url: jdbc:h2:mem:config;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
username: test
password: Test@123
overwrite: false
```
Expand Down

0 comments on commit 3e25855

Please sign in to comment.