git clone --depth 1 https://github.com/apache/shardingsphere.git
cd shardingsphere
mvn clean install -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Drat.skip=true -Djacoco.skip=true -DskipITs -DskipTests -Prelease
The binary packages:
Or get binary package from download page.
conf/server.yaml
, enable scaling
and mode
:scaling:
blockQueueSize: 10000
workerThread: 40
clusterAutoSwitchAlgorithm:
type: IDLE
props:
incremental-task-idle-minute-threshold: 30
dataConsistencyCheckAlgorithm:
type: DEFAULT
mode:
type: Cluster
repository:
type: ZooKeeper
props:
namespace: governance_ds
server-lists: localhost:2181
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
overwrite: false
Enable clusterAutoSwitchAlgorithm
indicate system will detect when scaling job is finished and switch cluster configuration automatically. Currently, system supply IDLE
type implementation.
Enable dataConsistencyCheckAlgorithm
indicate system will use this defined algorithm to do data consistency check when it’s emitted, if it’s disabled, then data consistency check will be ignored. Currently, system supply DEFAULT
type implementation, it supports following database types: MySQL
, you could not enable it if you’re running other database types for now, support of other database types is under development.
You could customize an auto switch algorithm by implementing ScalingClusterAutoSwitchAlgorithm
SPI interface, and customize a check algorithm by implementing ScalingDataConsistencyCheckAlgorithm
SPI interface. Please refer to Dev Manual#Scaling for more details.
sh bin/start.sh
logs/stdout.log
,ensure startup successfully.sh bin/stop.sh
The existing configuration items are as follows, we can modify them in conf/server.yaml
:
Name | Description | Default value |
---|---|---|
blockQueueSize | Queue size of data transmission channel | 10000 |
workerThread | Worker thread pool size, the number of migration task threads allowed to run concurrently | 40 |