提交 67e66e26 编写于 作者: M menghaoranss

revise orchestration configuration manual of sharding-jdbc

上级 375d5eaf
......@@ -203,7 +203,7 @@ weight = 1
CenterConfiguration result = new CenterConfiguration("zookeeper", properties);
result.setServerLists("localhost:2181");
result.setNamespace("sharding-sphere-orchestration");
result.setOrchestrationType("registry_center,config_center");
result.setOrchestrationType("registry_center,config_center,metadata_center");
return result;
}
```
......@@ -453,27 +453,27 @@ ShardingStrategyConfiguration的实现类,用于配置不分片的策略。
| *名称* | *数据类型* | *说明* |
| --------------- | --------------------------- | ---------------------------------------------------------- |
| instanceConfigurationMap | Map\<String, CenterConfiguration\> | 配置中心和注册中心的配置map,key为名称,value为配置或注册中心 |
| instanceConfigurationMap | Map\<String, CenterConfiguration\> | 配置/注册/元数据中心的配置map,key为名称,value为配置/注册/元数据中心 |
#### CenterConfiguration
用于配置配置中心或注册中心。
用于配置配置/注册/元数据中心。
| *名称* | *数据类型* | *说明* |
| --------------------------------- | ---------- | ----------------------------------------------------------------------------------- |
| type | String | 配置中心或注册中心的实例类型,例如zookeeper或etcd、apollo、nacos |
| instanceType | String | 配置/注册/元数据中心的实例类型,例如zookeeper或etcd、apollo、nacos |
| properties | String | 配置本实例需要的其他参数,例如zookeeper的连接参数等,具体参考properties配置 |
| orchestrationType | String | 配置中心或注册中心的类型,例如config-center或registry-center,如果都是,可以"setOrchestrationType("registry_center,config_center");" |
| serverLists | String | 连接配置中心或注册中心服务器的列表,包括IP地址和端口号,多个地址用逗号分隔。如: host1:2181,host2:2181 |
| namespace (?) | String | 配置中心或注册中心的命名空间 |
| orchestrationType | String | 治理类型,例如config_center/registry_center/metadata_center,如果都是,可以"setOrchestrationType("registry_center,config_center,metadata_center");" |
| serverLists | String | 连接配置/注册/元数据中心服务器的列表,包括IP地址和端口号,多个地址用逗号分隔。如: host1:2181,host2:2181 |
| namespace (?) | String | 配置/注册/元数据中心的命名空间 |
其中properties的通用配置如下:
| *名称* | *数据类型* | *说明* |
| --------------- | --------------------------- | ---------------------------------------------------------- |
| overwrite | boolean | 本地配置是否覆盖注册中心配置,如果可覆盖,每次启动都以本地配置为准 |
| overwrite | boolean | 本地配置是否覆盖配置中心配置,如果可覆盖,每次启动都以本地配置为准 |
如果采用了zookeeper作为配置中心或(和)注册中心,那么properties还可以配置:
如果采用了zookeeper作为配置中心或(和)注册中心或 (和) 元数据中心,那么properties还可以配置:
| *名称* | *数据类型* | *说明* |
| --------------- | --------------------------- | ---------------------------------------------------------- |
......@@ -483,7 +483,7 @@ ShardingStrategyConfiguration的实现类,用于配置不分片的策略。
| retryIntervalMilliseconds (?) | int | 重试间隔毫秒数,默认500毫秒 |
| timeToLiveSeconds (?) | int | 临时节点存活秒数,默认60秒 |
如果采用了etcd作为配置中心或(和)注册中心,那么properties还可以配置:
如果采用了etcd作为配置中心或(和)注册中心或 (和) 元数据中心,那么properties还可以配置:
| *名称* | *数据类型* | *说明* |
| --------------- | --------------------------- | ---------------------------------------------------------- |
......@@ -502,7 +502,7 @@ ShardingStrategyConfiguration的实现类,用于配置不分片的策略。
| connectTimeout (?) | int | apollo connectTimeout,默认值为1000毫秒 |
| readTimeout (?) | int | apollo readTimeout,默认值为5000毫秒 |
如果采用了nacos作为配置中心,那么properties还可以配置:
如果采用了nacos作为配置中心或 (和) 注册中心,那么properties还可以配置:
| *名称* | *数据类型* | *说明* |
| --------------- | --------------------------- | ---------------------------------------------------------- |
......
......@@ -202,7 +202,7 @@ The implementation of DataSource in the following configuration is [DataSourceUt
CenterConfiguration result = new CenterConfiguration("zookeeper", properties);
result.setServerLists("localhost:2181");
result.setNamespace("sharding-sphere-orchestration");
result.setOrchestrationType("registry_center,config_center");
result.setOrchestrationType("registry_center,config_center,metadata_center");
return result;
}
```
......@@ -444,9 +444,9 @@ Property configuration items, can be of the following properties.
| *Name* | *Data Type* | *Explanation* |
| -------------------------------- | ----------- | ------------------------------------------------------------ |
| type | String | The type of center instance(zookeeper/etcd/apollo/nacos) |
| instanceType | String | The type of center instance(zookeeper/etcd/apollo/nacos) |
| properties | String | Properties for center instance config, such as options of zookeeper |
| orchestrationType | String | The type of orchestration center: config-center or registry-center, if both, use "setOrchestrationType("registry_center,config_center");" |
| orchestrationType | String | The type of orchestration center: config_center or registry_center or metadata_center, if both, use "setOrchestrationType("registry_center,config_center,metadata_center");" |
| serverLists | String | Connect to server lists in center, including IP address and port number; addresses are separated by commas, such as `host1:2181,host2:2181` |
| namespace (?) | String | Namespace of center instance |
......@@ -454,9 +454,9 @@ Common configuration in properties as follow:
| *Name* | *Data Type* | *Explanation* |
| -------------------------------- | ----------- | ------------------------------------------------------------ |
| overwrite | boolean | Local configurations overwrite center configurations or not; if they overwrite, each start takes reference of local configurations |
| overwrite | boolean | Local configurations overwrite config center configurations or not; if they overwrite, each start takes reference of local configurations |
If type of center is `zookeeper` with config-center&registry-center, properties could be set with the follow options:
If type of center is `zookeeper` with config-center&registry-center&metadata-center, properties could be set with the follow options:
| *Name* | *Data Type* | *Explanation* |
| -------------------------------- | ----------- | ------------------------------------------------------------ |
......@@ -466,13 +466,13 @@ If type of center is `zookeeper` with config-center&registry-center, properties
| retryIntervalMilliseconds (?) | int | The retry interval millisecond number, default to be 500 milliseconds |
| timeToLiveSeconds (?) | int | The living time for temporary nodes, default to be 60 seconds |
If type of center is `etcd` with config-center&registry-center, properties could be set with the follow options:
If type of center is `etcd` with config-center&registry-center&metadata-center, properties could be set with the follow options:
| *Name* | *Data Type* | *Explanation* |
| -------------------------------- | ----------- | ------------------------------------------------------------ |
| timeToLiveSeconds (?) | long | The etcd TTL in seconds, default to be 30 seconds |
If type of center is `apollo` with config-center&registry-center, properties could be set with the follow options:
If type of center is `apollo` with config-center, properties could be set with the follow options:
| *Name* | *Data Type* | *Explanation* |
| -------------------------------- | ----------- | ------------------------------------------------------------ |
......
......@@ -232,11 +232,11 @@ spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_it
spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
spring.shardingsphere.sharding.broadcast-tables=t_config
spring.shardingsphere.orchestration.name=spring_boot_ds_sharding
spring.shardingsphere.orchestration.overwrite=true
spring.shardingsphere.orchestration.registry.type=zookeeper
spring.shardingsphere.orchestration.registry.namespace=orchestration-spring-boot-sharding-test
spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
spring.shardingsphere.orchestration.spring_boot_ds_sharding.orchestration-type=registry_center,config_center,metadata_center
spring.shardingsphere.orchestration.spring_boot_ds_sharding.instance-type=zookeeper
spring.shardingsphere.orchestration.spring_boot_ds_sharding.server-lists=localhost:2181
spring.shardingsphere.orchestration.spring_boot_ds_sharding.namespace=orchestration-spring-boot-sharding-test
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.overwrite=true
```
### JNDI
......@@ -364,15 +364,14 @@ spring.shardingsphere.encrypt.tables.<table-name>.columns.<logic-column-name>.en
```properties
#省略数据源、数据分片、读写分离和数据脱敏配置
spring.shardingsphere.orchestration.name= #治理实例名称
spring.shardingsphere.orchestration.overwrite= #本地配置是否覆盖注册中心配置。如果可覆盖,每次启动都以本地配置为准
spring.shardingsphere.orchestration.registry.type= #配置中心类型。如:zookeeper
spring.shardingsphere.orchestration.registry.server-lists= #连接注册中心服务器的列表。包括IP地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181
spring.shardingsphere.orchestration.registry.namespace= #注册中心的命名空间
spring.shardingsphere.orchestration.registry.digest= #连接注册中心的权限令牌。缺省为不需要权限验证
spring.shardingsphere.orchestration.registry.operation-timeout-milliseconds= #操作超时的毫秒数,默认500毫秒
spring.shardingsphere.orchestration.registry.max-retries= #连接失败后的最大重试次数,默认3次
spring.shardingsphere.orchestration.registry.retry-interval-milliseconds= #重试间隔毫秒数,默认500毫秒
spring.shardingsphere.orchestration.registry.time-to-live-seconds= #临时节点存活秒数,默认60秒
spring.shardingsphere.orchestration.registry.props= #配置中心其它属性
spring.shardingsphere.orchestration.spring_boot_ds_sharding.orchestration-type= #治理类型,例如config_center/registry_center/metadata_center
spring.shardingsphere.orchestration.spring_boot_ds_sharding.instance-type= #配置/注册/元数据中心实例类型。如:zookeeper
spring.shardingsphere.orchestration.spring_boot_ds_sharding.server-lists= #连接注册/配置/元数据中心服务器的列表。包括IP地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181
spring.shardingsphere.orchestration.spring_boot_ds_sharding.namespace= #注册/配置/元数据中心的命名空间
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.overwrite=true #本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.digest= #连接配置/注册/元数据中心的权限令牌。缺省为不需要权限验证
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.operation-timeout-milliseconds= #操作超时的毫秒数,默认500毫秒
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.max-retries= #连接失败后的最大重试次数,默认3次
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.retry-interval-milliseconds= #重试间隔毫秒数,默认500毫秒
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.time-to-live-seconds= #临时节点存活秒数,默认60秒
```
......@@ -231,11 +231,11 @@ spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_it
spring.shardingsphere.sharding.binding-tables=t_order,t_order_item
spring.shardingsphere.sharding.broadcast-tables=t_config
spring.shardingsphere.orchestration.name=spring_boot_ds_sharding
spring.shardingsphere.orchestration.overwrite=true
spring.shardingsphere.orchestration.registry.type=zookeeper
spring.shardingsphere.orchestration.registry.namespace=orchestration-spring-boot-sharding-test
spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
spring.shardingsphere.orchestration.spring_boot_ds_sharding.orchestration-type=registry_center,config_center,metadata_center
spring.shardingsphere.orchestration.spring_boot_ds_sharding.instance-type=zookeeper
spring.shardingsphere.orchestration.spring_boot_ds_sharding.server-lists=localhost:2181
spring.shardingsphere.orchestration.spring_boot_ds_sharding.namespace=orchestration-spring-boot-sharding-test
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.overwrite=true
```
### JNDI
......@@ -364,15 +364,14 @@ spring.shardingsphere.encrypt.tables.<table-name>.columns.<logic-column-name>.en
```properties
#Omit data source, data sharding, read-write split and data masking configurations
spring.shardingsphere.orchestration.name= #Orchestration instance name
spring.shardingsphere.orchestration.overwrite= #Whether to overwrite local configurations with registry center configurations; if it can, each initialization should refer to local configurations
spring.shardingsphere.orchestration.registry.type= #Registry center type. Example:zookeeper
spring.shardingsphere.orchestration.registry.server-lists= #The list of servers that connect to registry center, including IP and port number; use commas to separate
spring.shardingsphere.orchestration.registry.namespace= #Registry center namespace
spring.shardingsphere.orchestration.registry.digest= #The token that connects to the registry center; default means there is no need for authentication
spring.shardingsphere.orchestration.registry.operation-timeout-milliseconds= #The millisecond number for operation timeout; default value: 500 milliseconds
spring.shardingsphere.orchestration.registry.max-retries= #Maximum retry time after failing; default value: 3 times
spring.shardingsphere.orchestration.registry.retry-interval-milliseconds= #Interval time to retry; default value: 500 milliseconds
spring.shardingsphere.orchestration.registry.time-to-live-seconds= #Living time of temporary nodes; default value: 60 seconds
spring.shardingsphere.orchestration.registry.props= #Customize registry center props.
spring.shardingsphere.orchestration.spring_boot_ds_sharding.orchestration-type= The type of orchestration center: config_center or registry_center or metadata_center
spring.shardingsphere.orchestration.spring_boot_ds_sharding.instance-type= #Center instance type. Example:zookeeper#Registry center type. Example:zookeeper
spring.shardingsphere.orchestration.spring_boot_ds_sharding.server-lists= #The list of servers that connect to registry center, including IP and port number; use commas to separate
spring.shardingsphere.orchestration.spring_boot_ds_sharding.namespace= #Center namespace
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.overwrite= #Whether to overwrite local configurations with config center configurations; if it can, each initialization should refer to local configurations
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.digest= #The token that connects to the center; default means there is no need for authentication
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.operation-timeout-milliseconds= #The millisecond number for operation timeout; default value: 500 milliseconds
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.max-retries= #Maximum retry time after failing; default value: 3 times
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.retry-interval-milliseconds= #Interval time to retry; default value: 500 milliseconds
spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.time-to-live-seconds= #Living time of temporary nodes; default value: 60 seconds
```
......@@ -439,8 +439,16 @@ weight = 4
http://www.springframework.org/schema/beans/spring-beans.xsd
http://shardingsphere.apache.org/schema/shardingsphere/orchestration
http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd">
<orchestration:registry-center id="regCenter" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-demo" operation-timeout-milliseconds="1000"
max-retries="3" />
<util:properties id="instance-props">
<prop key="max-retries">3</prop>
<prop key="operation-timeout-milliseconds">3000</prop>
</util:properties>
<orchestraion:instance id="regCenter" orchestration-type="registry_center,config_center,metadata_center" instance-type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-demo"
props-ref="instance-props" />
<orchestraion:sharding-data-source id="shardingDatabasesTablesDataSource" data-source-ref="realShardingDatabasesTablesDataSource" instance-ref="regCenter" overwrite="true" />
<orchestraion:master-slave-data-source id="masterSlaveDataSource" data-source-ref="realMasterSlaveDataSource" instance-ref="regCenter" overwrite="true" />
<orchestraion:encrypt-data-source id="encryptDataSource" data-source-ref="realEncryptDataSource" instance-ref="regCenter" overwrite="true" />
</beans>
```
......@@ -684,8 +692,8 @@ weight = 4
| ------------------- | ----- | ------------------------------------------------------------------------ |
| id | 属性 | ID |
| data-source-ref (?) | 属性 | 被治理的数据库id |
| registry-center-ref | 属性 | 注册中心id |
| overwrite | 属性 | 本地配置是否覆盖注册中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 |
| instance-ref | 属性 | 治理实例id |
| overwrite | 属性 | 本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 |
### 读写分离 + 治理
......@@ -697,8 +705,8 @@ weight = 4
| ------------------- | ----- | ---------------------------------------------------------------------- |
| id | 属性 | ID |
| data-source-ref (?) | 属性 | 被治理的数据库id |
| registry-center-ref | 属性 | 注册中心id |
| overwrite | 属性 | 本地配置是否覆盖注册中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 |
| instance-ref | 属性 | 治理实例id |
| overwrite | 属性 | 本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 |
### 数据脱敏 + 治理
......@@ -710,24 +718,20 @@ weight = 4
| ------------------- | ----- | ---------------------------------------------------------------------- |
| id | 属性 | ID |
| data-source-ref (?) | 属性 | 被治理的数据库id |
| registry-center-ref | 属性 | 注册中心id |
| overwrite | 属性 | 本地配置是否覆盖注册中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 |
| instance-ref | 属性 | 治理实例id |
| overwrite | 属性 | 本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 |
### 治理注册中心
### 治理实例配置
命名空间:http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd
#### \<orchestration:registry-center />
#### \<orchestration:instance />
| *名称* | *类型* | *说明* |
| ----------------------------------- | ----- | ------------------------------------------------------------------------------------------|
| id | 属性 | 注册中心的Spring Bean Id |
| type | 属性 | 注册中心类型。如:zookeeper |
| server-lists | 属性 | 连接注册中心服务器的列表,包括IP地址和端口号,多个地址用逗号分隔。如: host1:2181,host2:2181 |
| namespace (?) | 属性 | 注册中心的命名空间 |
| digest (?) | 属性 | 连接注册中心的权限令牌。缺省为不需要权限验证 |
| operation-timeout-milliseconds (?) | 属性 | 操作超时的毫秒数,默认500毫秒 |
| max-retries (?) | 属性 | 连接失败后的最大重试次数,默认3次 |
| retry-interval-milliseconds (?) | 属性 | 重试间隔毫秒数,默认500毫秒 |
| time-to-live-seconds (?) | 属性 | 临时节点存活秒数,默认60秒 |
| id | 属性 | 配置/注册/元数据中心的Spring Bean Id |
| instance-type | 属性 | 配置/注册/元数据中心实例类型。如:zookeeper |
| orchestration-type | 属性 | 治理类型,例如config_center/registry_center/metadata_center |
| server-lists | 属性 | 连接配置/注册/元数据中心服务器的列表,包括IP地址和端口号,多个地址用逗号分隔。如: host1:2181,host2:2181 |
| namespace (?) | 属性 | 配置/注册/元数据中心的命名空间 |
| props-ref (?) | 属性 | 配置中心其它属性 |
......@@ -301,8 +301,12 @@ example: [shardingsphere-example](https://github.com/apache/shardingsphere-examp
<sharding:inline-strategy id="orderTableStrategy" sharding-column="order_id" algorithm-expression="t_order$->{order_id % 2}" />
<sharding:inline-strategy id="orderItemTableStrategy" sharding-column="order_id" algorithm-expression="t_order_item$->{order_id % 2}" />
<sharding:key-generator id="orderKeyGenerator" type="SNOWFLAKE" column="order_id" />
<sharding:key-generator id="itemKeyGenerator" type="SNOWFLAKE" column="order_item_id" />
<bean id="snowflakeAlgorithm" class="org.apache.shardingsphere.shardingjdbc.spring.namespace.factorybean.KeyGenerateAlgorithmFactoryBean">
<property name="type" value="SNOWFLAKE" />
</bean>
<sharding:key-generator id="orderKeyGenerator" column="order_id" algorithm-ref="snowflakeAlgorithm" />
<sharding:key-generator id="itemKeyGenerator" column="order_item_id" algorithm-ref="snowflakeAlgorithm" />
<sharding:data-source id="shardingDataSource">
<sharding:sharding-rule data-source-names="ds_master0,ds_master0_slave0,ds_master0_slave1,ds_master1,ds_master1_slave0,ds_master1_slave1">
......@@ -447,9 +451,15 @@ example: [shardingsphere-example](https://github.com/apache/shardingsphere-examp
http://shardingsphere.apache.org/schema/shardingsphere/orchestration/masterslave
http://shardingsphere.apache.org/schema/shardingsphere/orchestration/masterslave/master-slave.xsd">
<reg:registry-center id="regCenter" type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-demo" overwtite="false" />
<sharding:data-source id="shardingMasterSlaveDataSource" registry-center-ref="regCenter" />
<master-slave:data-source id="masterSlaveDataSource" registry-center-ref="regCenter" />
<util:properties id="instance-props">
<prop key="max-retries">3</prop>
<prop key="operation-timeout-milliseconds">3000</prop>
</util:properties>
<orchestraion:instance id="regCenter" orchestration-type="registry_center,config_center,metadata_center" instance-type="zookeeper" server-lists="localhost:2181" namespace="orchestration-spring-namespace-demo"
props-ref="instance-props" />
<orchestraion:sharding-data-source id="shardingDatabasesTablesDataSource" data-source-ref="realShardingDatabasesTablesDataSource" instance-ref="regCenter" overwrite="true" />
<orchestraion:master-slave-data-source id="masterSlaveDataSource" data-source-ref="realMasterSlaveDataSource" instance-ref="regCenter" overwrite="true" />
<orchestraion:encrypt-data-source id="encryptDataSource" data-source-ref="realEncryptDataSource" instance-ref="regCenter" overwrite="true" />
</beans>
```
......@@ -699,8 +709,8 @@ Namespace: http://shardingsphere.apache.org/schema/shardingsphere/orchestration/
| ------------------- | --------- | ------------------------------------------------------------ |
| id | Attribute | ID |
| data-source-ref (?) | Attribute | Orchestrated database id |
| registry-center-ref | Attribute | Registry center id |
| overwrite | Attribute | Whether to overwrite local configurations with registry center configurations; if it can, each initialization should refer to local configurations; default means not to overwrite |
| instance-ref | Attribute | The id of orchestration instance |
| overwrite | Attribute | Whether to overwrite local configurations with config center configurations; if it can, each initialization should refer to local configurations; default means not to overwrite |
### Read-Write Split + Orchestration
......@@ -712,8 +722,8 @@ Namespace: http://shardingsphere.apache.org/schema/shardingsphere/orchestration/
| ------------------- | --------- | ----------------------------------------------------------- |
| id | Attribute | ID |
| data-source-ref (?) | Attribute | The id of data source to be orchestrated |
| registry-center-ref | Attribute | The id of registry center |
| overwrite | Attribute | Use local configuration to overwrite registry center or not |
| instance-ref | Attribute | The id of orchestration instance |
| overwrite | Attribute | Use local configuration to overwrite config center or not |
### Data Masking + Orchestration
......@@ -725,25 +735,21 @@ Namespace: http://shardingsphere.apache.org/schema/shardingsphere/orchestration/
| ------------------- | --------- | ----------------------------------------------------------- |
| id | Attribute | ID |
| data-source-ref (?) | Attribute | The id of data source to be orchestrated |
| registry-center-ref | Attribute | The id of registry center |
| overwrite | Attribute | Use local configuration to overwrite registry center or not |
| instance-ref | Attribute | The id of orchestration instance |
| overwrite | Attribute | Use local configuration to overwrite config center or not |
### Orchestration registry center
### Orchestration instance
Namespace: http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd
#### \<orchestration:registry-center />
#### \<orchestration:instance />
| *Name* | *Type* | *Description* |
| ---------------------------------- | --------- | ------------------------------------------------------------------------------- |
| id | Attribute | Spring Bean Id of registry center |
| type | Attribute | Registry center type. Example:zookeeper |
| server-lists | Attribute | Registry servers list, multiple split as comma. Example: host1:2181,host2:2181 |
| namespace (?) | Attribute | Namespace of registry |
| digest (?) | Attribute | Digest for registry. Default is not need digest |
| operation-timeout-milliseconds (?) | Attribute | Operation timeout time in milliseconds, default value is 500 seconds |
| max-retries (?) | Attribute | Max number of times to retry, default value is 3 |
| retry-interval-milliseconds (?) | Attribute | Time interval in milliseconds on each retry, default value is 500 milliseconds |
| time-to-live-seconds (?) | Attribute | Living time of temporary nodes; default value: 60 seconds |
| id | Attribute | Spring Bean Id of center |
| instance-type | Attribute | Center instance type. Example:zookeeper |
| orchestration-type | Attribute | The type of orchestration center: config_center or registry_center or metadata_center |
| server-lists | Attribute | Center servers list, multiple split as comma. Example: host1:2181,host2:2181 |
| namespace (?) | Attribute | Namespace of center |
| props-ref (?) | Attribute | Other customize properties of registry center |
......@@ -281,12 +281,13 @@ props:
#省略数据分片、读写分离和数据脱敏配置
orchestration:
name: orchestration_ds
overwrite: true
registry:
type: zookeeper
namespace: orchestration
orchestration_ds:
orchestrationType: config_center,registry_center,metadata_center
instanceType: zookeeper
serverLists: localhost:2181
namespace: orchestration
props:
overwrite: true
```
## 配置项说明
......@@ -407,17 +408,18 @@ masterSlaveRule: #省略读写分离规则配置
encryptRule: #省略数据脱敏规则配置
orchestration:
name: #治理实例名称
overwrite: #本地配置是否覆盖注册中心配置。如果可覆盖,每次启动都以本地配置为准
registry: #注册中心配置
type: #配置中心类型。如:zookeeper
serverLists: #连接注册中心服务器的列表。包括IP地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181
namespace: #注册中心的命名空间
digest: #连接注册中心的权限令牌。缺省为不需要权限验证
operationTimeoutMilliseconds: #操作超时的毫秒数,默认500毫秒
maxRetries: #连接失败后的最大重试次数,默认3次
retryIntervalMilliseconds: #重试间隔毫秒数,默认500毫秒
timeToLiveSeconds: #临时节点存活秒数,默认60秒
orchestration_ds: #治理实例名称
orchestrationType: #治理类型,例如config_center/registry_center/metadata_center
instanceType: #配置/注册/元数据中心类型。如:zookeeper
serverLists: #连接配置/注册/元数据中心服务器的列表。包括IP地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181
namespace: #配置/注册/元数据中心的命名空间
props: #其它配置
overwrite: #本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准
digest: #连接注册中心的权限令牌。缺省为不需要权限验证
operationTimeoutMilliseconds: #操作超时的毫秒数,默认500毫秒
maxRetries: #连接失败后的最大重试次数,默认3次
retryIntervalMilliseconds: #重试间隔毫秒数,默认500毫秒
timeToLiveSeconds: #临时节点存活秒数,默认60秒
```
## Yaml语法说明
......
......@@ -282,11 +282,13 @@ props:
#Omit data sharding, read-write split and encrypt configurations
orchestration:
name: orchestration_ds
overwrite: true
registry:
namespace: orchestration
orchestration_ds:
orchestrationType: config_center,registry_center,metadata_center
instanceType: zookeeper
serverLists: localhost:2181
namespace: orchestration
props:
overwrite: true
```
## Configuration Item Explanation
......@@ -411,17 +413,18 @@ masterSlaveRule: #Omit read-write split rule configurations
encryptRule: #Omit encrypt rule configurations
orchestration:
name: #Orchestration instance name
overwrite: #Whether to overwrite local configurations with registry center configurations; if it can, each initialization should refer to local configurations
registry: #Registry center configuration
type: #Registry center type. Example:zookeeper
orchestration_ds: #Orchestration instance name
orchestrationType: #The type of orchestration center: config_center or registry_center or metadata_center
instanceType: #Center instance type. Example:zookeeper
serverLists: #The list of servers that connect to registry center, including IP and port number; use commas to seperate addresses, such as: host1:2181,host2:2181
namespace: #Registry center namespace
digest: #The token that connects to the registry center; default means there is no need for authentication
operationTimeoutMilliseconds: #Default value: 500 milliseconds
maxRetries: #Maximum retry time after failing; default value: 3 times
retryIntervalMilliseconds: #Interval time to retry; default value: 500 milliseconds
timeToLiveSeconds: #Living time of temporary nodes; default value: 60 seconds
namespace: #Center namespace
props: #Other properties
overwrite: #Whether to overwrite local configurations with config center configurations; if it can, each initialization should refer to local configurations
digest: #The token that connects to the center; default means there is no need for authentication
operationTimeoutMilliseconds: #Default value: 500 milliseconds
maxRetries: #Maximum retry time after failing; default value: 3 times
retryIntervalMilliseconds: #Interval time to retry; default value: 500 milliseconds
timeToLiveSeconds: #Living time of temporary nodes; default value: 60 seconds
```
## Yaml Syntax Explanation
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册