MyCat:第五章:快速入门

这篇博客介绍了Mycat的快速入门,包括数据源连接、缓存配置和线程池设置。日志显示了Mycat成功连接到MySQL数据源,并展示了数据路由和SQL执行的细节。内容涵盖了Mycat启动时的参数调整和端口监听,以及SQL在数据节点上的执行计划。
摘要由CSDN通过智能技术生成

04-29 21:46:59.741 INFO [main] (PhysicalDatasource.java:356) -not ilde connection in pool,create new

connection for masterConnectionMeta [schema=mycat_node1, charset=utf8, txIsolation=-1, autocommit=true]

04-29 21:46:59.741 INFO [main] (PhysicalDatasource.java:356) -not ilde connection in pool,create new

connection for masterConnectionMeta [schema=mycat_node1, charset=utf8, txIsolation=-1, autocommit=true]

04-29 21:46:59.925 INFO [$_NIOREACTOR-2-RW] (GetConnectionHandler.java:66) -connected successfuly

MySQLConnection [id=18, lastTime=1430315219133, schema=mycat_node1, old shema=mycat_node1, borrowed=true,

fromSlaveDB=false, threadId=17135, charset=utf8, txIsolation=0, autocommit=true, attachment=null,

respHandler=null, host=116.236.223.115, port=3307, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]

04-29 21:46:59.926 INFO [$_NIOREACTOR-1-RW] (GetConnectionHandler.java:66) -connected successfuly

MySQLConnection [id=13, lastTime=1430315219133, schema=mycat_node1, old shema=mycat_node1, borrowed=true,

fromSlaveDB=false, threadId=17132, charset=utf8, txIsolation=0, autocommit=true, attachment=null,

respHandler=null, host=116.236.223.115, port=3307, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]

04-29 21:46:59.926 INFO [$_NIOREACTOR-1-RW] (GetConnectionHandler.java:66) -connected successfuly

MySQLConnection [id=17, lastTime=1430315219133, schema=mycat_node1, old shema=mycat_node1, borrowed=true,

fromSlaveDB=false, threadId=17138, charset=utf8, txIsolation=0, autocommit=true, attachment=null,

respHandler=null, host=116.236.223.115, port=3307, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]

04-29 21:46:59.971 INFO [$_NIOREACTOR-2-RW] (GetConnectionHandler.java:66) -connected successfuly

MySQLConnection [id=14, lastTime=1430315219133, schema=mycat_node1, old shema=mycat_node1, borrowed=true,

fromSlaveDB=false, threadId=17134, charset=utf8, txIsolation=0, autocommit=true, attachment=null,

respHandler=null, host=116.236.223.115, port=3307, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]

04-29 21:47:00.032 INFO [$_NIOREACTOR-3-RW] (GetConnectionHandler.java:66) -connected successfuly

MySQLConnection [id=11, lastTime=1430315219133, schema=mycat_node1, old shema=mycat_node1, borrowed=true,

fromSlaveDB=false, threadId=17130, charset=utf8, txIsolation=0, autocommit=true, attachment=null,

respHandler=null, host=116.236.223.115, port=3307, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]

04-29 21:47:00.034 INFO [$_NIOREACTOR-0-RW] (GetConnectionHandler.java:66) -connected successfuly

MySQLConnection [id=12, lastTime=1430315219133, schema=mycat_node1, old shema=mycat_node1, borrowed=true,

fromSlaveDB=false, threadId=17131, charset=utf8, txIsolation=0, autocommit=true, attachment=null,

respHandler=null, host=116.236.223.115, port=3307, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]

04-29 21:47:00.035 INFO [$_NIOREACTOR-0-RW] (GetConnectionHandler.java:66) -connected successfuly

MySQLConnection [id=20, lastTime=1430315219133, schema=mycat_node1, old shema=mycat_node1, borrowed=true,

fromSlaveDB=false, threadId=17136, charset=utf8, txIsolation=0, autocommit=true, attachment=null,

respHandler=null, host=116.236.223.115, port=3307, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]

04-29 21:47:00.035 INFO [$_NIOREACTOR-3-RW] (GetConnectionHandler.java:66) -connected successfuly

MySQLConnection [id=19, lastTime=1430315219133, schema=mycat_node1, old shema=mycat_node1, borrowed=true,

fromSlaveDB=false, threadId=17139, charset=utf8, txIsolation=0, autocommit=true, attachment=null,

respHandler=null, host=116.236.223.115, port=3307, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]

04-29 21:47:01.255 INFO [$_NIOREACTOR-3-RW] (GetConnectionHandler.java:66) -connected successfuly

MySQLConnection [id=15, lastTime=1430315219133, schema=mycat_node1, old shema=mycat_node1, borrowed=true,

fromSlaveDB=false, threadId=17133, charset=utf8, txIsolation=0, autocommit=true, attachment=null,

respHandler=null, host=116.236.223.115, port=3307, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]

04-29 21:47:01.258 INFO [$_NIOREACTOR-0-RW] (GetConnectionHandler.java:66) -connected successfuly

MySQLConnection [id=16, lastTime=1430315219133, schema=mycat_node1, old shema=mycat_node1, borrowed=true,

fromSlaveDB=false, threadId=17137, charset=utf8, txIsolation=0, autocommit=true, attachment=null,

respHandler=null, host=116.236.223.115, port=3307, statusSync=null, writeQueue=0, modifiedSQLExecuted=false]

04-29 21:47:01.343 INFO [main] (PhysicalDBPool.java:296) -init result :finished 10 success 10 target

count:10

04-29 21:47:01.343 INFO [main] (PhysicalDBPool.java:238) -jdbchost2 index:0 init success

MyCAT Server startup successfully. see logs in logs/mycat.log

04-29 21:51:21.846 INFO [main] (PhysicalDBPool.java:81) -total resouces of dataHost jdbchost is :4

04-29 21:51:21.848 INFO [main] (PhysicalDBPool.java:81) -total resouces of dataHost jdbchost2 is :4

该部分日志可以看到配置的数据源相关信息,上面是两个数据源连接datahost

04-29 21:51:21.856 INFO [main] (CacheService.java:125) -create layer cache pool TableID2DataNodeCache of

type encache ,default cache size 10000 ,default expire seconds18000

04-29 21:51:21.857 INFO [main] (DefaultLayedCachePool.java:80) -create child Cache: TESTDB_ORDERS for

layered cache TableID2DataNodeCache, size 50000, expire seconds 18000

04-29 21:51:22.104 INFO [main] (DynaClassLoader.java:35) -dyna class load from E:\MyProject\Mycat-Server

\main\catlet,and auto check for class file modified every 60 seconds

该部分描述了Mycat的缓存信息及动态类加载信息。

04-29 21:51:22.107 INFO [main] (MycatServer.java:203) -Startup processors …,total processors:4,aio

thread pool size:8

each process allocated socket buffer pool bytes ,buffer chunk size:4096 buffer pool’s

capacity(buferPool/bufferChunk) is:4000

04-29 21:51:22.108 INFO [main] (MycatServer.java:204) -sysconfig params:SystemConfig

[processorBufferLocalPercent=100, frontSocketSoRcvbuf=1048576, frontSocketSoSndbuf=4194304,

backSocketSoRcvbuf=4194304, backSocketSoSndbuf=1048576, frontSocketNoDelay=1, backSocketNoDelay=1,

maxStringLiteralLength=65535, frontWriteQueueSize=2048, bindIp=0.0.0.0, serverPort=8066, managerPort=9066,

charset=utf8, processors=4, processorExecutor=8, timerExecutor=2, managerExecutor=2, idleTimeout=1800000,

catletClassCheckSeconds=60, sqlExecuteTimeout=300, processorCheckPeriod=1000,

dataNodeIdleCheckPeriod=300000, dataNodeHeartbeatPeriod=10000, clusterHeartbeatUser=_HEARTBEAT_USER_,

clusterHeartbeatPass=_HEARTBEAT_PASS_, clusterHeartbeatPeriod=5000, clusterHeartbeatTimeout=10000,

clusterHeartbeatRetry=10, txIsolation=3, parserCommentVersion=50148, sqlRecordCount=10,

processorBufferPool=16384000, processorBufferChunk=4096, defaultMaxLimit=100, sequnceHandlerType=1,

sqlInterceptor=org.opencloudb.interceptor.impl.DefaultSqlInterceptor, sqlInterceptorType=select,

sqlInterceptorFile=E:\MyProject\Mycat-Server/logs/sql.txt, mutiNodeLimitType=0, mutiNodePatchSize=100,

defaultSqlParser=druidparser, usingAIO=0, packetHeaderSize=4, maxPacketSize=16777216, mycatNodeId=1]

04-29 21:51:22.131 INFO [main] (MycatServer.java:262) -using nio network handler

该部分描述了Mycat线程池、buffer、连接池等等所有的配置信息,通过该启动项可以得知当前运行的Mycat个参数调整情况,

生产环境下需要做部分参数调整,可以根据该日志分析参数情况。

04-29 21:58:35.407 INFO [main] (MycatServer.java:280) -$_MyCatManager is started and listening on 9066

04-29 21:58:35.408 INFO [main] (MycatServer.java:284) -$_MyCatServer is started and listening on 8066

该部分描述了Mycat启动端口。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值