git clone https://github.com/apache/shardingsphere.git;
cd shardingsphere;
mvn clean install -Prelease;
发布包所在目录为:/shardingsphere-distribution/shardingsphere-scaling-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-scaling-bin.tar.gz
。
conf/server.yaml
,这里主要修改启动端口,保证不与本机其他端口冲突,同时修改断点续传服务(可选)地址即可:port: 8888
blockQueueSize: 10000
pushTimeout: 1000
workerThread: 30
resumeBreakPoint:
name: scalingJob
registryCenter:
type: ZooKeeper
serverLists: localhost:2181
props:
retryIntervalMilliseconds: 10000
sh bin/start.sh
查看日志 logs/stdout.log
,确保启动成功。
使用 curl 命令再次确认正常运行。
curl -X GET http://localhost:8888/scaling/job/list
响应应为:
{"success":true,"errorCode":0,"errorMsg":null,"model":[]}
sh bin/stop.sh
应用现有配置项如下,相应的配置可在 conf/server.yaml
中修改:
名称 | 说明 | 默认值 |
---|---|---|
port | HTTP服务监听端口 | 8888 |
blockQueueSize | 数据传输通道队列大小 | 10000 |
pushTimeout | 数据推送超时时间,单位:毫秒 | 1000 |
workerThread | 工作线程池大小,允许同时运行的迁移任务线程数 | 30 |
resumeBreakPoint | 断点续传服务 |