运行部署

部署启动

  1. 执行以下命令,编译生成sharding-scaling二进制包:
  1. git clone https://github.com/apache/incubator-shardingsphere.git;
  2. cd incubarot-shardingsphere;
  3. mvn clean install -Prelease;

发布包所在目录为:/sharding-distribution/sharding-scaling-distribution/target/apache-shardingsphere-incubating-${latest.release.version}-sharding-scaling-bin.tar.gz

  1. 解压缩发布包,修改配置文件conf/server.yaml,这里主要修改启动端口,保证不与本机其他端口冲突,其他值保持默认即可:
  1. port: 8888
  2. blockQueueSize: 10000
  3. pushTimeout: 1000
  4. workerThread: 30
  1. 启动sharding-scaling:
  1. sh bin/start.sh
  1. 查看日志logs/stdout.log,确保启动成功。

  2. 使用curl命令再次确认正常运行。

  1. curl -X GET http://localhost:8888/shardingscaling/job/list

应答应为:

  1. {"success":true,"errorCode":0,"errorMsg":null,"model":[]}

结束Sharding-Scaling

  1. sh bin/stop.sh

应用配置项

应用现有配置项如下,相应的配置可在conf/server.yaml中修改:

名称说明默认值
portHTTP服务监听端口8888
blockQueueSize数据传输通道队列大小10000
pushTimeout数据推送超时时间,单位ms1000
workerThread工作线程池大小,允许同时运行的迁移任务线程数30