Authored by xuhongyun

docker支持以及测试问题修改

FROM java:8
MAINTAINER xueyin <hongyun.xu@yoho.cn>
ADD Mycat-server-1.6.5-release-linux.tar.gz /home
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV MYCAT_HOME="/home/mycat"
ENV JAVA_OPTS="-server -Xms2G -Xmx2G -XX:+AggressiveOpts -XX:MaxDirectMemorySize=2G \
-Xss256k -XX:+AggressiveOpts -XX:+UseBiasedLocking -XX:+UseFastAccessorMethods \
-XX:+DisableExplicitGC -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled \
-XX:+UseCMSCompactAtFullCollection -XX:+UseCMSInitiatingOccupancyOnly \
-XX:CMSInitiatingOccupancyFraction=75 -XX:CMSInitiatingOccupancyFraction=75"
ENV MYCAT_CLASSPATH=".:$MYCAT_HOME:$MYCAT_HOME/conf:$MYCAT_HOME/lib:$MYCAT_HOME/lib/classes"
ENV RUN_CMD="java -Djava.ext.dirs=$MYCAT_CLASSPATH -DMYCAT_HOME=/home/mycat -classpath $MYCAT_CLASSPATH $JAVA_OPTS \
io.mycat.MycatStartup $@ >> \"$MYCAT_HOME/logs/console.log\" 2>&1 &"
EXPOSE 8066
EXPOSE 9066
VOLUME $MYCAT_HOME/logs
WORKDIR /home/mycat
CMD exec $RUN_CMD
... ...
... ... @@ -17,6 +17,7 @@
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
<version.template.file>version.txt.template</version.template.file>
<version.file>version.txt</version.file>
<schema.profile>test</schema.profile>
</properties>
<scm>
<connection>scm:git:ssh://apachemycat@github.com/MyCATApache/Mycat-Server.git</connection>
... ... @@ -607,38 +608,35 @@
</dependencies>
</plugin>
<plugin>
<!-- 默认使用本地的docker,远程时需要配置DOCKER_HOST环境变量-->
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.2.0</version>
<!--<executions>-->
<!--<execution>-->
<!--<id>build-image</id>-->
<!--<phase>package</phase>-->
<!--<goals>-->
<!--<goal>build</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--<execution>-->
<!--<id>build-image</id>-->
<!--<phase>package</phase>-->
<!--<goals>-->
<!--<goal>build</goal>-->
<!--</goals>-->
<!--</execution>-->
<!--</executions>-->
<configuration>
<imageName>mycat-server</imageName>
<imageTags>
<!--<imageTag>${project.version}-${timestamp}</imageTag>-->
<imageTag>latest</imageTag>
</imageTags>
<forceTags>true</forceTags>
<imageTags>${project.version}</imageTags>
<dockerDirectory>${project.basedir}/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.artifactId}-${project.version}-${timestamp}-linux.tar.gz</include>
<include>${project.artifactId}-${project.version}-linux.tar.gz</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
... ...
... ... @@ -2,7 +2,7 @@
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>${timestamp}-linux</id>
<id>linux</id>
<includeBaseDirectory>false</includeBaseDirectory>
<formats>
<format>tar.gz</format>
... ... @@ -75,4 +75,11 @@
</fileSet>
</fileSets>
<files>
<file>
<source>src/main/resources/schema_${schema.profile}.xml</source>
<outputDirectory>mycat/conf</outputDirectory>
<destName>schema.xml</destName>
</file>
</files>
</assembly>
... ...
... ... @@ -16,7 +16,9 @@ if $noJavaHome ; then
fi
#==============================================================================
#set JAVA_OPTS
let memTotal=`cat /proc/meminfo |grep MemTotal|awk '{printf "%d", $2/1024 }'`
JAVA_OPTS="-server -Xms2G -Xmx2G -XX:MaxPermSize=64M -XX:+AggressiveOpts -XX:MaxDirectMemorySize=2G"
#JAVA_OPTS="-server -Xms2G -Xmx2G -XX:MaxPermSize=64M -XX:+AggressiveOpts -XX:MaxDirectMemorySize=2G"
#JAVA_OPTS="-server -Xms4G -Xmx4G -XX:MaxPermSize=64M -XX:+AggressiveOpts -XX:MaxDirectMemorySize=6G"
#performance Options
JAVA_OPTS="$JAVA_OPTS -Xss256k"
... ... @@ -70,3 +72,7 @@ RUN_CMD="$RUN_CMD >> \"$MYCAT_HOME/logs/console.log\" 2>&1 &"
echo $RUN_CMD
eval $RUN_CMD
#==============================================================================
#while [ '1' == '1' ];
#do
# sleep 1
#done
\ No newline at end of file
... ...
... ... @@ -32,7 +32,7 @@ public abstract class Versions {
public static final byte PROTOCOL_VERSION = 10;
/**服务器版本**/
public static byte[] SERVER_VERSION = "5.6.29-mycat-1.6.5-release-20190313140641".getBytes();
public static byte[] SERVER_VERSION = "5.6.29-mycat-1.6.5-release-20190325161250".getBytes();
public static void setServerVersion(String version) {
byte[] mysqlVersionPart = version.getBytes();
... ...
... ... @@ -71,8 +71,7 @@ public class MycatZkCluster {
// 从zk上删除注册信息
unregitClusterNode(mycatClusterNode);
// 检查客户端检查数是否全部关闭
LOGGER.info("start mycat cluster success.");
LOGGER.info("stop mycat cluster success.");
}
private void regitClusterNode(MycatClusterNode node) {
... ... @@ -81,9 +80,7 @@ public class MycatZkCluster {
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
@Override
public void run() {
if (curatorFramework != null) {
curatorFramework.close();
}
stop();
}
}));
... ... @@ -152,7 +149,8 @@ public class MycatZkCluster {
}
private String buildClusterNodeData(MycatClusterNode node) {
return JSON.toJSONString(node);
return String.format("{\"serverIP\":\"%s\",\"serverPort\":%d,\"type\":%d}",
node.serverIP, node.serverPort, node.type);
}
}
... ...
clusterMode=false
clusterMode=true
clusterName=front
#zkUrl=zk01.yohoops.org:2181,zk02.yohoops.org:2181,zk03.yohoops.org:2181,zk04.yohoops.org:2181,zk05.yohoops.org:2181
zkUrl=zk01.yohoops.org:2181
\ No newline at end of file
zkUrl=172.16.12.73:2181
\ No newline at end of file
... ...
... ... @@ -135,25 +135,25 @@
<!-- balance=0 不开启读写分离 balance=1读操作在主备和读库上执行 balance=2 读操作在写库和读库随机分布 blance=3 读操作只在读库上分布 -->
<!-- promotion 分库分表-->
<dataHost name="dh_promt_split1" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_promt_split1" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW1" url="write1.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR1" url="read1.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_promt_split2" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_promt_split2" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW2" url="write2.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR2" url="read2.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_promt_split3" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_promt_split3" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW3" url="write3.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR3" url="read3.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_promt_split4" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_promt_split4" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW4" url="write4.promotion.yohoops.org:3307" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR4" url="read4.promotion.yohoops.org:3307" password="yh_test" user="yh_vpc_bak" />
... ... @@ -161,25 +161,25 @@
</dataHost>
<!-- orders分库分表-->
<dataHost name="dh_orders_split1" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_orders_split1" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW1" url="write1.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR1" url="read1.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_orders_split2" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_orders_split2" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW2" url="write2.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR2" url="read2.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_orders_split3" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_orders_split3" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW3" url="write3.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR3" url="read3.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_orders_split4" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_orders_split4" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW4" url="write4.orders.yohoops.org:3307" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR4" url="read4.orders.yohoops.org:3307" password="yh_test" user="yh_vpc_bak" />
... ... @@ -187,69 +187,69 @@
</dataHost>
<!-- orders 未拆分库 -->
<dataHost name="dh_order_nosplit" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_order_nosplit" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersNosplitW1" url="write.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersNosplitR1" url="read.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_cms" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_cms" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="cmsW1" url="write.cms.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="cmsR1" url="read.cms.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_passport" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_passport" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="passportW1" url="write.passport.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="passportR1" url="read.passport.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_shops" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_shops" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="shopsW1" url="write.shops.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="shopsR1" url="read.shops.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yohood" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_yohood" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="yohoodW1" url="write.yohood.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="yohoodR1" url="read.yohood.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yh_extendstore" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_yh_extendstore" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="yhExtendstoreW1" url="write.store.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="yhExtendstoreR1" url="read.store.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yh_unions" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_yh_unions" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="unionsW1" url="write.yhUnion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="unionsR1" url="read.yhUnion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_uic" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_uic" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="uicW1" url="write.uic.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="uicR1" url="read.uic.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_message" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_message" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="messageW1" url="write.message.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="messageR1" url="read.message.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yohobuy_logs" maxCon="50" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<dataHost name="dh_yohobuy_logs" maxCon="20" minCon="10" balance="3" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="yohobuyLogsW1" url="yohologs.yohoops:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="yohobuyLogsR1" url="yohologs.yohoops:3306" password="yh_test" user="yh_vpc_bak" />
... ...
... ... @@ -135,25 +135,25 @@
<!-- balance=0 不开启读写分离 balance=1读操作在主备和读库上执行 balance=2 读操作在写库和读库随机分布 blance=3 读操作只在读库上分布 -->
<!-- promotion 分库分表-->
<dataHost name="dh_promt_split1" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_promt_split1" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW1" url="write1.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR1" url="read1.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_promt_split2" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_promt_split2" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW2" url="write2.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR2" url="read2.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_promt_split3" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_promt_split3" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW3" url="write3.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR3" url="read3.promotion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_promt_split4" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_promt_split4" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="promotW4" url="write4.promotion.yohoops.org:3307" password="yh_test" user="yh_vpc_bak">
<readHost host="promotR4" url="read4.promotion.yohoops.org:3307" password="yh_test" user="yh_vpc_bak" />
... ... @@ -161,25 +161,25 @@
</dataHost>
<!-- orders分库分表-->
<dataHost name="dh_orders_split1" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_orders_split1" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW1" url="write1.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR1" url="read1.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_orders_split2" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_orders_split2" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW2" url="write2.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR2" url="read2.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_orders_split3" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_orders_split3" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW3" url="write3.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR3" url="read3.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_orders_split4" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_orders_split4" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersSplitW4" url="write4.orders.yohoops.org:3307" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersSplitR4" url="read4.orders.yohoops.org:3307" password="yh_test" user="yh_vpc_bak" />
... ... @@ -187,69 +187,69 @@
</dataHost>
<!-- orders 未拆分库 -->
<dataHost name="dh_order_nosplit" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_order_nosplit" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="ordersNosplitW1" url="write.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="ordersNosplitR1" url="read.orders.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_cms" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_cms" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="cmsW1" url="write.cms.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="cmsR1" url="read.cms.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_passport" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_passport" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="passportW1" url="write.passport.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="passportR1" url="read.passport.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_shops" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_shops" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="shopsW1" url="write.shops.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="shopsR1" url="read.shops.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yohood" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_yohood" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="yohoodW1" url="write.yohood.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="yohoodR1" url="read.yohood.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yh_extendstore" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_yh_extendstore" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="yhExtendstoreW1" url="write.store.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="yhExtendstoreR1" url="read.store.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yh_unions" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_yh_unions" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="unionsW1" url="write.yhUnion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="unionsR1" url="read.yhUnion.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_uic" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_uic" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="uicW1" url="write.uic.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="uicR1" url="read.uic.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_message" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_message" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="messageW1" url="write.message.yohoops.org:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="messageR1" url="read.message.yohoops.org:3306" password="yh_test" user="yh_vpc_bak" />
</writeHost>
</dataHost>
<dataHost name="dh_yohobuy_logs" maxCon="50" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<dataHost name="dh_yohobuy_logs" maxCon="20" minCon="10" balance="2" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost host="yohobuyLogsW1" url="yohologs.yohoops:3306" password="yh_test" user="yh_vpc_bak">
<readHost host="yohobuyLogsR1" url="yohologs.yohoops:3306" password="yh_test" user="yh_vpc_bak" />
... ...
... ... @@ -133,62 +133,62 @@
<dataNode name="dn_yohobuy_logs" dataHost="dh_yohobuy_logs" database="yohobuy_logs" />
<!-- balance=0 不开启读写分离 balance=1读操作在主备和读库上执行 balance=2 读操作在写库和读库随机分布 blance=3 读操作只在读库上分布 -->
<dataHost name="dh_promt_split" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_promt_split" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
<dataHost name="dh_orders_split" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_orders_split" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
<dataHost name="dh_order_nosplit" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_order_nosplit" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
<dataHost name="dh_cms" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_cms" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
<dataHost name="dh_passport" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_passport" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
<dataHost name="dh_shops" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_shops" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
<dataHost name="dh_yohood" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_yohood" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
<dataHost name="dh_yh_extendstore" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_yh_extendstore" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
<dataHost name="dh_yh_unions" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_yh_unions" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
<dataHost name="dh_uic" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_uic" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
<dataHost name="dh_message" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_message" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
<dataHost name="dh_yohobuy_logs" maxCon="50" minCon="10" balance="0" dbType="mysql" dbDriver="native">
<dataHost name="dh_yohobuy_logs" maxCon="5" minCon="2" balance="0" dbType="mysql" dbDriver="native">
<heartbeat>select 1</heartbeat>
<writeHost url="192.168.102.219:3306" host="yhTest" password="yh_test" user="yh_test"></writeHost>
</dataHost>
... ...
BuildTime 2019-03-13 06:06:40
GitVersion 45d828efee99c6d5821081e389082ec5fac4b6d3
BuildTime 2019-03-25 08:12:49
GitVersion 2cfd103ae3cd8a57e3204c4e352f48b36f3aebb5
MavenVersion 1.6.5-release
GitUrl https://github.com/MyCATApache/Mycat-Server.git
MyCatSite http://www.mycat.org.cn
... ...