from:http://code.alibabatech.com/wiki/display/cobar/Home
- Page restrictions apply
- Attachments:1
- Added by kimi Lv, last edited by 邱 硕 on 十月 18, 2012 (view change)
首页 | 下载 | 产品文档 | 产品规划 | 常见问答 | 需求管理 | 联系我们
概述
Cobar是关系型数据的分布式处理系统,它可以在分布式的环境下看上去像传统数据库一样为您提供海量数据服务。
- 产品在阿里巴巴B2B公司已经稳定运行了3年以上。
- 目前已经接管了3000+个MySQL数据库的schema,为应用提供数据服务。
- 据最近统计cobar集群目前平均每天处理近50亿次的SQL执行请求。
快速启动
场景描述
- 系统对外提供的数据库名是dbtest,并且其中有两张表tb1和tb2。
- tb1表的数据被映射到物理数据库dbtest1的tb1上。
- tb2表的一部分数据被映射到物理数据库dbtest2的tb2上,另外一部分数据被映射到物理数据库dbtest3的tb2上。
如下图所示:
步骤一:环境准备
软件准备
操作系统: Linux或者Windows (推荐在Linux环境下运行Cobar)
MySQL: http://www.mysql.com/downloads/ (推荐使用5.1以上版本)
JDK: http://www.oracle.com/technetwork/java/javase/downloads/ (推荐使用1.6以上版本)
Cobar: http://code.alibabatech.com/wiki/display/cobar/release/ (下载tar.gz或者zip文件)数据准备
假设本文MySQL所在服务器IP为192.168.0.1,端口为3306,用户名为test,密码为空,我们需要创建schema:dbtest1、dbtest2、dbtest3,table:tb1、tb2,脚本如下:
数据库创建脚本#创建dbtest1
drop
database
if exists dbtest1;
create
database
dbtest1;
use dbtest1;
#在dbtest1上创建tb1
create
table
tb1(
id
int
not
null
,
gmt datetime);
#创建dbtest2
drop
database
if exists dbtest2;
create
database
dbtest2;
use dbtest2;
#在dbtest2上创建tb2
create
table
tb2(
id
int
not
null
,
val
varchar
(256));
#创建dbtest3
drop
database
if exists dbtest3;
create
database
dbtest3;
use dbtest3;
#在dbtest3上创建tb2
create
table
tb2(
id
int
not
null
,
val
varchar
(256));
步骤二:部署和配置Cobar
请确保机器上设置了JAVA环境变量JAVA_HOME |
- 下载Cobar压缩文件并解压,进入conf目录可以看到schema.xml, rule.xml, server.xml等相关的配置文件
wget http:
//code
.alibabatech.com
/mvn/releases/com/alibaba/cobar/cobar-server/1
.2.4
/cobar-server-1
.2.4.
tar
.gz
tar
zxf cobar-server-1.2.4.
tar
.gz
cd
cobar-server-1.2.4
#可以看到bin,conf,lib,logs四个目录
- schema.xml配置如下(注意:schema.xml包含MySQL的IP、端口、用户名、密码等配置,您需要按照注释替换为您的MySQL信息。)schema.xml 配置
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<!DOCTYPE cobar:schema SYSTEM "schema.dtd">
<!-- schema定义 -->
<
schema
name
=
"dbtest"
dataNode
=
"dnTest1"
>
<
table
name
=
"tb2"
dataNode
=
"dnTest2,dnTest3"
rule
=
"rule1"
/>
</
schema
>
<!-- 数据节点定义,数据节点由数据源和其他一些参数组织而成。-->
<
dataNode
name
=
"dnTest1"
>
<
property
name
=
"dataSource"
>
<
dataSourceRef
>dsTest[0]</
dataSourceRef
>
</
property
>
</
dataNode
>
<
dataNode
name
=
"dnTest2"
>
<
property
name
=
"dataSource"
>
<
dataSourceRef
>dsTest[1]</
dataSourceRef
>
</
property
>
</
dataNode
>
<
dataNode
name
=
"dnTest3"
>
<
property
name
=
"dataSource"
>
<
dataSourceRef
>dsTest[2]</
dataSourceRef
>
</
property
>
</
dataNode
>
<!-- 数据源定义,数据源是一个具体的后端数据连接的表示。-->
<
dataSource
name
=
"dsTest"
type
=
"mysql"
>
<
property
name
=
"location"
>
<
location
>192.168.0.1:3306/dbtest1</
location
>
<!--注意:替换为您的MySQL IP和Port-->
<
location
>192.168.0.1:3306/dbtest2</
location
>
<!--注意:替换为您的MySQL IP和Port-->
<
location
>192.168.0.1:3306/dbtest3</
location
>
<!--注意:替换为您的MySQL IP和Port-->
</
property
>
<
property
name
=
"user"
>test</
property
>
<!--注意:替换为您的MySQL用户名-->
<
property
name
=
"password"
></
property
>
<!--注意:替换为您的MySQL密码-->
<
property
name
=
"sqlMode"
>STRICT_TRANS_TABLES</
property
>
</
dataSource
>
</
cobar:schema
>
- rule.xml配置如下(本文仅以数字类型的id字段作为拆分字段,将数据拆分到两个库中。)rule.xml 配置
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<!DOCTYPE cobar:rule SYSTEM "rule.dtd">
<!-- 路由规则定义,定义什么表,什么字段,采用什么路由算法。-->
<
tableRule
name
=
"rule1"
>
<
rule
>
<
columns
>id</
columns
>
<
algorithm
>
<![CDATA[ func1(${id})]]>
</
algorithm
>
</
rule
>
</
tableRule
>
<!-- 路由函数定义,应用在路由规则的算法定义中,路由函数可以自定义扩展。-->
<
function
name
=
"func1"
class
=
"com.alibaba.cobar.route.function.PartitionByLong"
>
<
property
name
=
"partitionCount"
>2</
property
>
<
property
name
=
"partitionLength"
>512</
property
>
</
function
>
</
cobar:rule
>
- server.xml配置如下server.xml 配置
<?
xml
version
=
"1.0"
encoding
=
"UTF-8"
?>
<!DOCTYPE cobar:server SYSTEM "server.dtd">
<!--定义Cobar用户名,密码-->
<
user
name
=
"test"
>
<
property
name
=
"password"
>test</
property
>
<
property
name
=
"schemas"
>dbtest</
property
>
</
user
>
</
cobar:server
>
步骤三:启动和使用Cobar
- 启动Cobar,进入bin目录可以看到Cobar的启动、停止与重启脚本
.
/startup
.sh
#Cobar进程名为CobarStartup
- 查看logs目录下stdout.log, 启动成功日志如下
10
:
54
:
19
,
264
INFO ===============================================
10
:
54
:
19
,
265
INFO Cobar is ready to startup ...
10
:
54
:
19
,
265
INFO Startup processors ...
10
:
54
:
19
,
443
INFO Startup connector ...
10
:
54
:
19
,
446
INFO Initialize dataNodes ...
10
:
54
:
19
,
470
INFO dnTest1:
0
init success
10
:
54
:
19
,
472
INFO dnTest3:
0
init success
10
:
54
:
19
,
473
INFO dnTest2:
0
init success
10
:
54
:
19
,
481
INFO CobarManager is started and listening on
9066
10
:
54
:
19
,
483
INFO CobarServer is started and listening on
8066
10
:
54
:
19
,
484
INFO ===============================================
- 访问Cobar同访问MySQL的方式完全相同, 常用访问方式如下(注意:本文将Cobar部署在192.168.0.1这台机器上,否则请替换为您的Cobar所在IP,其他信息不变)
#命令行
mysql -h192.
168.0
.
1
-utest -ptest -P8066 -Ddbtest
#JDBC(建议
5.1
以上的mysql driver版本)
Class.forName(
"com.mysql.jdbc.Driver"
);
Connection conn = DriverManager.getConnection(
"jdbc:mysql://192.168.0.1:8066/dbtest"
,
"test"
,
"test"
);
......
- SQL执行示例,执行语句时与使用传统单一数据库无区别
mysql>show databases; #dbtest1、dbtest2、dbtest3对用户透明
+
----------+
|
DATABASE
|
+
----------+
| dbtest |
+
----------+
mysql>show tables; #dbtest中有两张表tb1和tb2
+
-------------------+
| Tables_in_dbtest1 |
+
-------------------+
| tb1 |
| tb2 |
+
-------------------+
mysql>
insert
into
tb1 (id, gmt)
values
(1, now()); #向表tb1插入一条数据
mysql>
insert
into
tb2 (id, val)
values
(1,
"part1"
); #向表tb2插入一条数据
mysql>
insert
into
tb2 (id, val)
values
(2,
"part1"
), (513,
"part2"
); #向表tb2同时插入多条数据
mysql>
select
*
from
tb1; #查询表tb1,验证数据被成功插入
+
----+---------------------+
| id | gmt |
+
----+---------------------+
| 1 | 2012-06-12 15:00:42 |
+
----+---------------------+
mysql>
select
*
from
tb2; #查询tb2,验证数据被成功插入
+
-----+-------+
| id | val |
+
-----+-------+
| 1 | part1 |
| 2 | part1 |
| 513 | part2 |
+
-----+-------+
mysql>
select
*
from
tb2
where
id
in
(1, 513); #根据id查询
+
-----+-------+
| id | val |
+
-----+-------+
| 1 | part1 |
| 513 | part2 |
+
-----+-------+
- 查看后端MySQL数据库dbtest1,dbtest2和dbtest3,验证数据分布在不同的库中
-->Labels parameters
-->
-->
-->
-->
-->
六月 15, 2012
Anonymous
-->
六月 15, 2012
-->
六月 15, 2012
Anonymous
Hi, 我按照上面的教程把整个环境搭起来了,跑起来也OK。
环境:MySql 5.5.25布署在CentOS 64bit下面, Cobar布署在Win7上面,JDK 1.6
遇到了一个问题,就是用Cobar如何做分页:dbtest2.tb2的数据如下:
-----------------------------id val created_on -----------------------------
1 zhangshan 2012-06-15 02:04:25 2 lisi 2012-06-15 02:04:56 3 wangwu 2012-06-15 02:05:05 4 jimliu 2012-06-15 02:05:11 5 jacky 2012-06-15 02:05:17 511 elvis 2012-06-15 02:12:14 512 leon 2012-06-15 02:30:30 -----------------------------
dbtest3.tb2的数据如下:
-------------------------id val created_on -------------------------
512 guson 2012-06-15 02:29:04 513 maple 2012-06-15 02:32:24 1000 maple 2012-06-15 02:35:17 -------------------------
现在我对Cobar发送一条查询语句:
mysql> select * from tb2 order by created_on desc limit 0,2;返回结果如下:
-------------------------id val created_on -------------------------
512 leon 2012-06-15 02:30:30 511 elvis 2012-06-15 02:12:14 1000 maple 2012-06-15 02:35:17 513 maple 2012-06-15 02:32:24 -------------------------
我发现返回的结果是分别取了dbtest2和dbtest3下面的tb2的按created_on排倒序的前两条,所以结果就有四条数据。 这样的话做分页还需要编写代码对返回的结果再处理。
请问Cobar对于这个问题有没有解决方案?-->
六月 15, 2012
-->
-->
-->
-->
-->
-->
-->
七月 02, 2012
Anonymous
-->
七月 02, 2012
-->
七月 03, 2012
Anonymous
谢谢你的回复,你好,下面是schema.xml的配置。应该要如何修改呢?
<!DOCTYPE cobar:schema SYSTEM "schema.dtd">
<cobar:schema xmlns:cobar="http://cobar.alibaba.com/"><!-- schema定义 -->
<schema name="dbtest" dataNode="dnTest1">
<table name="tb2" dataNode="dnTest2,dnTest3" rule="rule1" />
</schema><!-- 数据节点定义,数据节点由数据源和其他一些参数组织而成。-->
<dataNode name="dnTest1">
<property name="dataSource">
<dataSourceRef>dsTest[0]</dataSourceRef>
</property>
</dataNode>
<dataNode name="dnTest2">
<property name="dataSource">
<dataSourceRef>dsTest[1]</dataSourceRef>
</property>
</dataNode>
<dataNode name="dnTest3">
<property name="dataSource">
<dataSourceRef>dsTest[2]</dataSourceRef>
</property>
</dataNode><!-- 数据源定义,数据源是一个具体的后端数据连接的表示。-->
<dataSource name="dsTest" type="mysql">
<property name="location">
<location>192.168.2.100:3306/dbtest1</location>
<location>192.168.2.100:3306/dbtest2</location>
<location>192.168.2.100:3306/dbtest3</location>
</property>
<property name="user">root</property>
<property name="password">root</property>
<property name="sqlMode">STRICT_TRANS_TABLES</property>
</dataSource>这是rule.xml的配置,这个我也没有修改过,不知道要如何修改
<!DOCTYPE cobar:rule SYSTEM "rule.dtd">
<cobar:rule xmlns:cobar="http://cobar.alibaba.com/"><!-- 路由规则定义,定义什么表,什么字段,采用什么路由算法 -->
<tableRule name="rule1">
<rule>
<columns>id</columns>
<algorithm><![CDATA[ func1($Unknown macro: {id}) ]]></algorithm>
</rule>
</tableRule><!-- 路由函数定义 -->
<function name="func1" class="com.alibaba.cobar.route.function.PartitionByLong">
<property name="partitionCount">2</property>
<property name="partitionLength">512</property>
</function></cobar:rule>
谢谢!
-->
-->
十一月 14, 2012
Anonymous
-->
八月 02, 2013
Anonymous
我也研究了好几周了,还是没配置好,求指点,老是抱这个错误怎么解决呢,求赐教啊我邮箱:[email protected]
14:20:44,095 INFO ===============================================
14:20:44,095 INFO Cobar is ready to startup ...
14:20:44,095 INFO Startup processors ...
14:20:44,220 INFO Startup connector ...
14:20:44,220 INFO Initialize dataNodes ...
14:20:44,236 WARN dnTest1:0 init error.
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 65
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
at com.alibaba.cobar.mysql.bio.MySQLChannel.connect(MySQLChannel.java:185)
at com.alibaba.cobar.mysql.MySQLDataSource.getChannel(MySQLDataSource.java:159)
at com.alibaba.cobar.mysql.MySQLDataNode.initSource(MySQLDataNode.java:357)
at com.alibaba.cobar.mysql.MySQLDataNode.init(MySQLDataNode.java:78)
at com.alibaba.cobar.CobarServer.startup(CobarServer.java:124)
at com.alibaba.cobar.CobarStartup.main(CobarStartup.java:36)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 65
at com.alibaba.cobar.mysql.MySQLMessage.readUB4(MySQLMessage.java:91)
at com.alibaba.cobar.net.mysql.HandshakePacket.read(HandshakePacket.java:64)
at com.alibaba.cobar.mysql.bio.MySQLChannel.handshake(MySQLChannel.java:324)
at com.alibaba.cobar.mysql.bio.MySQLChannel.access$000(MySQLChannel.java:66)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:180)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:176)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
14:20:44,236 ERROR #!Cobar#dnTest1 init failure
14:20:44,236 WARN dnTest3:0 init error.
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 65
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
at com.alibaba.cobar.mysql.bio.MySQLChannel.connect(MySQLChannel.java:185)
at com.alibaba.cobar.mysql.MySQLDataSource.getChannel(MySQLDataSource.java:159)
at com.alibaba.cobar.mysql.MySQLDataNode.initSource(MySQLDataNode.java:357)
at com.alibaba.cobar.mysql.MySQLDataNode.init(MySQLDataNode.java:78)
at com.alibaba.cobar.CobarServer.startup(CobarServer.java:124)
at com.alibaba.cobar.CobarStartup.main(CobarStartup.java:36)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 65
at com.alibaba.cobar.mysql.MySQLMessage.readUB4(MySQLMessage.java:91)
at com.alibaba.cobar.net.mysql.HandshakePacket.read(HandshakePacket.java:64)
at com.alibaba.cobar.mysql.bio.MySQLChannel.handshake(MySQLChannel.java:324)
at com.alibaba.cobar.mysql.bio.MySQLChannel.access$000(MySQLChannel.java:66)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:180)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:176)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
14:20:44,236 ERROR #!Cobar#dnTest3 init failure
14:20:44,236 WARN dnTest2:0 init error.
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 65
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
at com.alibaba.cobar.mysql.bio.MySQLChannel.connect(MySQLChannel.java:185)
at com.alibaba.cobar.mysql.MySQLDataSource.getChannel(MySQLDataSource.java:159)
at com.alibaba.cobar.mysql.MySQLDataNode.initSource(MySQLDataNode.java:357)
at com.alibaba.cobar.mysql.MySQLDataNode.init(MySQLDataNode.java:78)
at com.alibaba.cobar.CobarServer.startup(CobarServer.java:124)
at com.alibaba.cobar.CobarStartup.main(CobarStartup.java:36)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 65
at com.alibaba.cobar.mysql.MySQLMessage.readUB4(MySQLMessage.java:91)
at com.alibaba.cobar.net.mysql.HandshakePacket.read(HandshakePacket.java:64)
at com.alibaba.cobar.mysql.bio.MySQLChannel.handshake(MySQLChannel.java:324)
at com.alibaba.cobar.mysql.bio.MySQLChannel.access$000(MySQLChannel.java:66)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:180)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:176)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
14:20:44,236 ERROR #!Cobar#dnTest2 init failure
14:20:44,236 INFO CobarManager is started and listening on 9066
14:20:44,251 INFO CobarServer is started and listening on 8066
14:20:44,251 INFO ===============================================-->
-->
-->
-->
七月 05, 2012
-->
-->
-->
七月 16, 2012
-->
八月 02, 2013
Anonymous
你好,我按照上面配置好后运行cobar后提示下列错误:1、运行界面只显示log4j:WARN 2013-08-02 10:11:11 [] load completed 2、在stdout.log中显示
10:19:46,767 INFO ===============================================
10:19:46,767 INFO Cobar is ready to startup ...
10:19:46,767 INFO Startup processors ...
10:19:46,876 INFO Startup connector ...
10:19:46,892 INFO Initialize dataNodes ...
10:19:46,892 WARN dnTest1:0 init error.
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 65
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
at com.alibaba.cobar.mysql.bio.MySQLChannel.connect(MySQLChannel.java:185)
at com.alibaba.cobar.mysql.MySQLDataSource.getChannel(MySQLDataSource.java:159)
at com.alibaba.cobar.mysql.MySQLDataNode.initSource(MySQLDataNode.java:357)
at com.alibaba.cobar.mysql.MySQLDataNode.init(MySQLDataNode.java:78)
at com.alibaba.cobar.CobarServer.startup(CobarServer.java:124)
at com.alibaba.cobar.CobarStartup.main(CobarStartup.java:36)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 65
at com.alibaba.cobar.mysql.MySQLMessage.readUB4(MySQLMessage.java:91)
at com.alibaba.cobar.net.mysql.HandshakePacket.read(HandshakePacket.java:64)
at com.alibaba.cobar.mysql.bio.MySQLChannel.handshake(MySQLChannel.java:324)
at com.alibaba.cobar.mysql.bio.MySQLChannel.access$000(MySQLChannel.java:66)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:180)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:176)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
10:19:46,908 ERROR #!Cobar#dnTest1 init failure
10:19:46,908 WARN dnTest3:0 init error.
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 65
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
at com.alibaba.cobar.mysql.bio.MySQLChannel.connect(MySQLChannel.java:185)
at com.alibaba.cobar.mysql.MySQLDataSource.getChannel(MySQLDataSource.java:159)
at com.alibaba.cobar.mysql.MySQLDataNode.initSource(MySQLDataNode.java:357)
at com.alibaba.cobar.mysql.MySQLDataNode.init(MySQLDataNode.java:78)
at com.alibaba.cobar.CobarServer.startup(CobarServer.java:124)
at com.alibaba.cobar.CobarStartup.main(CobarStartup.java:36)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 65
at com.alibaba.cobar.mysql.MySQLMessage.readUB4(MySQLMessage.java:91)
at com.alibaba.cobar.net.mysql.HandshakePacket.read(HandshakePacket.java:64)
at com.alibaba.cobar.mysql.bio.MySQLChannel.handshake(MySQLChannel.java:324)
at com.alibaba.cobar.mysql.bio.MySQLChannel.access$000(MySQLChannel.java:66)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:180)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:176)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
10:19:46,908 ERROR #!Cobar#dnTest3 init failure
10:19:46,908 WARN dnTest2:0 init error.
java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: 65
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
at com.alibaba.cobar.mysql.bio.MySQLChannel.connect(MySQLChannel.java:185)
at com.alibaba.cobar.mysql.MySQLDataSource.getChannel(MySQLDataSource.java:159)
at com.alibaba.cobar.mysql.MySQLDataNode.initSource(MySQLDataNode.java:357)
at com.alibaba.cobar.mysql.MySQLDataNode.init(MySQLDataNode.java:78)
at com.alibaba.cobar.CobarServer.startup(CobarServer.java:124)
at com.alibaba.cobar.CobarStartup.main(CobarStartup.java:36)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 65
at com.alibaba.cobar.mysql.MySQLMessage.readUB4(MySQLMessage.java:91)
at com.alibaba.cobar.net.mysql.HandshakePacket.read(HandshakePacket.java:64)
at com.alibaba.cobar.mysql.bio.MySQLChannel.handshake(MySQLChannel.java:324)
at com.alibaba.cobar.mysql.bio.MySQLChannel.access$000(MySQLChannel.java:66)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:180)
at com.alibaba.cobar.mysql.bio.MySQLChannel$1.call(MySQLChannel.java:176)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
10:19:46,908 ERROR #!Cobar#dnTest2 init failure
10:19:46,908 INFO CobarManager is started and listening on 9066
10:19:46,908 INFO CobarServer is started and listening on 8066
10:19:46,908 INFO ===============================================
10:19:46,939 INFO [thread=Processor1-H0,class=ServerConnection,host=192.168.16.209,port=2690,schema=null]'HEARTBEAT_USER' login success-->
-->
-->
七月 17, 2012
-->
-->
七月 17, 2012
路由字段实际上是指表的某一列,因为Cobar需要根据表中某一列的值对表进行 行拆分。
用户在配置文件中设定路由字段,Cobar根据用户的配置提取SQL中的路由字段值来判断如何路由。比如:
# 在schema.xml中配置tb2按照路由规则rule1路由
<
schema
name
=
"dbtest"
dataNode
=
"dnTest1"
>
<
table
name
=
"tb2"
dataNode
=
"dnTest2,dnTest3"
rule
=
"rule1"
/>
</
schema
>
# 在rule.xml中设置rule1的路由字段为id
<
tableRule
name
=
"rule1"
>
<
rule
>
<
columns
>id</
columns
>
<
algorithm
>
<![CDATA[ func1(${id})]]>
</
algorithm
>
</
rule
>
</
tableRule
>
上述两个配置便是设定了tb2这个表的路由字段为id。
当执行SQL语句,如 select * from tb2 where id = 1,Cobar便会提取该SQL语句中的id的值(本例中为1),来判断语句如何路由。-->
七月 18, 2012
Anonymous
-->
七月 18, 2012
-->
-->
七月 18, 2012
-->
-->
-->
-->
-->
-->
-->
-->
-->
八月 13, 2012
Anonymous
语句:
SELECT aid FROM cdb_attachments a LEFT JOIN cdb_posts p ON p.authorid=a.uid WHERE p.tid='124434943' AND a.tid='124434943' AND p.first =1 limit 1
规则cdb_posts表按tid%1024取模切分,长度为0-511 512-1023两个
post_shard0:包含cdb_posts和其他表 cdb_posts规则:0<= cdb_post <=511
post_shard1:只包含cdb_posts表 cdb_posts规则:512<= cdb_post <=1023#########################################
#理论上: #
#124434943%1024 ===> post_shard0 #
#cdb_posts ===> post_shard0 #
#其他表 ===》post_shard1 #
#cdb_attachments ===>post_shard1 #
#########################################实际上都是发送到===> post_shard0,但是在post_shard0上木有cdb_attachments就会引起报错,是这种
情况的跨库join么?是这么理解么
-->
八月 13, 2012
Anonymous
-->
-->
-->
-->
九月 21, 2012
Anonymous
-->
十月 11, 2012
Anonymous
-->
十月 11, 2012
Anonymous
-->
十月 15, 2012
Anonymous
新手使用,按教程搭建起环境,唯一区别是在dbtet1中也创建了tb2表。
一、有两处配置做了修改,其他都按教程配置:
1、配置文件 :schema.xml修改如下,其他都按教程配置
<!-- schema定义 -->
<schema name="dbtest" dataNode="dnTest1">
<table name="tb2" dataNode="dnTest1,dnTest2,dnTest3" rule="rule1" />
</schema>
2、rule.xml修改了如下,其他都按教程部署
<property name="partitionCount">3</property>二、运行后,但是在mysql中看到了两个tb2,请问是那个地方配置有问题。
mysql> show tables;Tables_in_dbtest tb2 tb1 tb2
3 rows in set (0.00 sec)-->
十一月 01, 2012
Anonymous
大家好,我查询cobar 日子发现这个警告。是什么意思能帮我解答下我?谢谢
15:07:53,796 WARN [thread=Processor3-R,class=ServerConnection,host=105.182.68.12,port=59605,schema=farm]
java.nio.channels.AsynchronousCloseException
at java.nio.channels.spi.AbstractInterruptibleChannel.end(AbstractInterruptibleChannel.java:185)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:272)
at com.alibaba.cobar.net.AbstractConnection.read(AbstractConnection.java:160)
at com.alibaba.cobar.net.NIOReactor$R.read(NIOReactor.java:131)
at com.alibaba.cobar.net.NIOReactor$R.run(NIOReactor.java:99)
at java.lang.Thread.run(Thread.java:662)-->
-->
-->
-->
十一月 14, 2012
Anonymous
DXW8Y5 , [url=http://zbfdutnoujxj.com/]zbfdutnoujxj[/url], [link=http://lepblryeqftx.com/]lepblryeqftx[/link], http://pebueqemfnhp.com/
-->
-->
十一月 06, 2012
Anonymous
17:07:56,613 INFO ===============================================
17:07:56,614 INFO Cobar is ready to startup ...
17:07:56,614 INFO Startup processors ...
17:07:56,721 INFO Startup connector ...
17:07:56,723 INFO Initialize dataNodes ...
17:08:06,748 WARN dnTest1:0 init error.
java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:228)
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
at com.alibaba.cobar.server.node.MySQLChannel.connect(MySQLChannel.java:185)
at com.alibaba.cobar.server.node.MySQLDataSource.getChannel(MySQLDataSource.java:156)
at com.alibaba.cobar.server.node.MySQLDataNode.initSource(MySQLDataNode.java:287)
at com.alibaba.cobar.server.node.MySQLDataNode.init(MySQLDataNode.java:61)
at com.alibaba.cobar.CobarServer.startup(CobarServer.java:129)
at com.alibaba.cobar.CobarStartup.main(CobarStartup.java:37)
17:08:06,751 ERROR #!Cobar#dnTest1 init failure
17:08:16,757 WARN dnTest3:0 init error.
java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:228)
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
at com.alibaba.cobar.server.node.MySQLChannel.connect(MySQLChannel.java:185)
at com.alibaba.cobar.server.node.MySQLDataSource.getChannel(MySQLDataSource.java:156)
at com.alibaba.cobar.server.node.MySQLDataNode.initSource(MySQLDataNode.java:287)
at com.alibaba.cobar.server.node.MySQLDataNode.init(MySQLDataNode.java:61)
at com.alibaba.cobar.CobarServer.startup(CobarServer.java:129)
at com.alibaba.cobar.CobarStartup.main(CobarStartup.java:37)
17:08:16,757 ERROR #!Cobar#dnTest3 init failure
17:08:26,7java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:228)
at java.util.concurrent.FutureTask.get(FutureTask.java:91)
at com.alibaba.cobar.server.node.MySQLChannel.connect(MySQLChannel.java:185)
at com.alibaba.cobar.server.node.MySQLDataSource.getChannel(MySQLDataSource.java:156)
at com.alibaba.cobar.server.node.MySQLDataNode.initSource(MySQLDataNode.java:287)
at com.alibaba.cobar.server.node.MySQLDataNode.init(MySQLDataNode.java:61)
at com.alibaba.cobar.CobarServer.startup(CobarServer.java:129)
at com.alibaba.cobar.CobarStartup.main(CobarStartup.java:37)
17:08:26,767 ERROR #!Cobar#dnTest2 init failure67 WARN dnTest2:0 init error.
三个数据源都未启动怎么回事儿?-->
十一月 08, 2012
-->
十一月 06, 2012
Anonymous
本地机器启动cobar,一直报错,远程主机关闭连接, 这个是什么原因呢?防火墙?
22:57:16,897 INFO ===============================================
22:57:57,590 INFO [thread=Processor1-H0,class=ServerConnection,host=127.0.0.1,port=57699,schema=dbtest]'test' login success
22:57:57,895 WARN [thread=Processor1-R,class=ServerConnection,host=127.0.0.1,port=57699,schema=dbtest]
java.io.IOException: 远程主机强迫关闭了一个现有的连接。
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:198)
at sun.nio.ch.IOUtil.read(IOUtil.java:171)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:245)
at com.alibaba.cobar.net.AbstractConnection.read(AbstractConnection.java:160)
at com.alibaba.cobar.net.NIOReactor$R.read(NIOReactor.java:131)
at com.alibaba.cobar.net.NIOReactor$R.run(NIOReactor.java:99)
at java.lang.Thread.run(Thread.java:662)-->
十一月 09, 2012
Anonymous
这个中间件好强大,我想问一下这个问题,在淘宝有一个Tengine,是nginx基础上做的延伸开发,其中有这么一段配置
http {upstream dbgroup
Unknown macro: { drizzle_server host1}server {
location /mysqlUnknown macro: { set $sql "select * from cats"; drizzle_query $sql; drizzle_pass dbgroup; rds_json on; }}
}里面配置了mysql的信息,我的问题是,如果使用这个中间件,我是不是就不用在dbgroup中配置多个mysql数据库了?
因为按照你的说法,我只要配置一个数据库,就可以享受集群数据库的服务了,
谢谢!-->
-->
-->
十一月 14, 2012
Anonymous
W569Yu , [url=http://iuncvbixrbyj.com/]iuncvbixrbyj[/url], [link=http://kdthxodvrkgv.com/]kdthxodvrkgv[/link], http://qtwuibnsrhli.com/
-->
十一月 14, 2012
Anonymous
java.lang.StackOverflowError
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.alibaba.cobar.parser.recognizer.FunctionManager.<init>(FunctionManager.java:256)
at com.alibaba.cobar.parser.recognizer.FunctionManager.<clinit>(FunctionManager.java:233)
at com.alibaba.cobar.loader.RuleLoader.<init>(RuleLoader.java:58)
at com.alibaba.cobar.loader.SchemaLoader.<init>(SchemaLoader.java:52)
at com.alibaba.cobar.loader.ConfigLoader.<init>(ConfigLoader.java:47)
at com.alibaba.cobar.CobarConfig.<init>(CobarConfig.java:58)
at com.alibaba.cobar.CobarServer.<init>(CobarServer.java:74)
at com.alibaba.cobar.CobarServer.<clinit>(CobarServer.java:53)
at com.alibaba.cobar.CobarStartup.main(CobarStartup.java:33)-->
十一月 14, 2012
Anonymous
-->
-->
-->
十一月 17, 2012
Anonymous
DmaNTJ , [url=http://niuezbkkcrvb.com/]niuezbkkcrvb[/url], [link=http://uhcpdsxroddw.com/]uhcpdsxroddw[/link], http://dfhdkmunyyec.com/
-->
-->
十一月 23, 2012
Anonymous
-->
十一月 29, 2012
Anonymous
-->
-->
十二月 11, 2012
Anonymous
-->
-->
-->
十二月 18, 2012
Anonymous
-->
-->
-->
十二月 31, 2012
Anonymous
hi,cobar-server-1.2.7.zip包打的好像有问题:
在startup.bat
set "APP_VERSION=1.3.0"REM set COBAR_CLASSPATH
set "COBAR_CLASSPATH=%COBAR_HOME%\conf;%COBAR_HOME%\lib\classes"
set "COBAR_CLASSPATH=%COBAR_CLASSPATH%;%COBAR_HOME%\lib\cobar-server-%APP_VERSION%.jar"指向的版本为:1.3.0 ;
启动时报错:
Exception in thread "main" java.lang.NoClassDefFoundError: com/alibaba/cobar/CobarStartup
Caused by: java.lang.ClassNotFoundException: com.alibaba.cobar.CobarStartup
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: com.alibaba.cobar.CobarStartup. Program will exit.-->
-->
一月 08, 2013
Anonymous
-->
一月 10, 2013
Anonymous
-->
二月 05, 2013
Anonymous
-->
-->
一月 29, 2013
Anonymous
-->
一月 31, 2013
Anonymous
-->
二月 20, 2013
Anonymous
你好,
我是一个新手, 想请教一个问题:
11:12:13,410 WARN com.alibaba.cobar.heartbeat.CobarDetector@b1f125
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:701)
at com.alibaba.cobar.net.BackendConnection.finishConnect(BackendConnection.java:100)
at com.alibaba.cobar.net.NIOConnector.finishConnect(NIOConnector.java:104)
at com.alibaba.cobar.net.NIOConnector.run(NIOConnector.java:76)
这是什么意思啊?-->
-->
三月 14, 2013
Anonymous
-->
四月 08, 2013
Anonymous
你好,我用文中的实例验证时发现一个bug
tb2 在两个库存在时。一个库中的表为空时
获取统计如 max ,min 是返回2 行。一行值为null
操作:
mysql> select min(id) from tb2
-> ;min(id) NULL 1
2 rows in set (0.00 sec)mysql> select * from tb2 limit 1,1000
-> ;
------+id val ------+
2 part1 3 part3 4 part1 5 part1 ------+
4 rows in set (0.00 sec)mysql> select * from tb2 limit 1,1000
-->
四月 08, 2013
Anonymous
-->
五月 06, 2013
Anonymous
您好,我在使用cobar的时候发现dataNode初始化总是失败。
通过源码调试之后发现,Handshake Initialization Packet是:[70, 0, 0, 0, -1, 106, 4, 72, 111, 115, 116, 32, 39, 49, 57, 50, 46, 49...]根据mysql的协议,70应该是包的长度,3个字节的0应该是包的ID,接下来的一个字节-1应该是Protocol Version,但是Protocol Version按照规范应该是0X0A才对,接下来的
server version也不对,最后导致握手不成功。也就是说mysql的Handshake Initialization Packet好像是错的,麻烦能告诉我是哪里错了吗?我的mysql安装在centos 6.4上,mysql用的是5.6.11。
-->
-->
六月 05, 2013
Anonymous
你好!
我是一个新手,
现在我已经把cobar部署好了,一共3个库,库test1下边是表tb1,库test2和库test3下边是表tb2,我写了一个app去访问cobar,在访问test1和test2下边的表数据没问题,但是访问test3下边的表数据时,总是访问不到,schema.xml配置如下,其他配置文件不变。
<!-- 数据节点定义,数据节点由数据源和其他一些参数组织而成。-->
<dataNode name="dnTest1">
<property name="dataSource">
<dataSourceRef>dsTest[0]</dataSourceRef>
</property>
</dataNode>
<dataNode name="dnTest2">
<property name="dataSource">
<dataSourceRef>dsTest[1]</dataSourceRef>
</property>
</dataNode>
<dataNode name="dnTest3">
<property name="dataSource">
<dataSourceRef>dsTest[2]</dataSourceRef>
</property>
</dataNode><!-- 数据源定义,数据源是一个具体的后端数据连接的表示。-->
<dataSource name="dsTest" type="mysql">
<property name="location">
<location>10.8.12.39:3306/test1</location>
<location>10.8.12.39:3306/test2</location>
<location>10.8.12.39:3306/test3</location>
</property>
<property name="user">root</property>
<property name="password"></property>
<property name="sqlMode">STRICT_TRANS_TABLES</property>
</dataSource>
求解答,万分感谢!-->
六月 26, 2013
Anonymous
-->
-->
-->
-->
-->
八月 20, 2013
Anonymous
-->
八月 21, 2013
Anonymous
我在测试cobar服务时,客户端无法连接,cobar 服务端jvm栈信息如下:
Thread 25189: (state = BLOCKED)- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=1987 (Compiled frame)
- com.alibaba.cobar.net.buffer.BufferQueue.put(java.nio.ByteBuffer) @bci=27, line=66 (Compiled frame)
- com.alibaba.cobar.net.AbstractConnection.write(java.nio.ByteBuffer) @bci=34, line=223 (Compiled frame)
- com.alibaba.cobar.net.AbstractConnection.writeToBuffer(byte[], java.nio.ByteBuffer) @bci=47, line=327 (Compiled frame)
- com.alibaba.cobar.net.mysql.BinaryPacket.write(java.nio.ByteBuffer, com.alibaba.cobar.net.FrontendConnection) @bci=33, line=53 (Compiled frame)
- com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor.handleRowData(com.alibaba.cobar.route.RouteResultsetNode, com.alibaba.cobar.server.session.BlockingSession, com.alibaba.cobar.mysql.bio.MySQLChannel, java.nio.ByteBuffer, byte) @bci=213, line=316 (Compiled frame)
- com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor.access$400(com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor, com.alibaba.cobar.route.RouteResultsetNode, com.alibaba.cobar.server.session.BlockingSession, com.alibaba.cobar.mysql.bio.MySQLChannel, java.nio.ByteBuffer, byte) @bci=8, line=54 (Interpreted frame)
- com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor$3.run() @bci=24, line=340 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.runTask(java.lang.Runnable) @bci=59, line=886 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=28, line=908 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=662 (Interpreted frame)
Thread 25188: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=1987 (Compiled frame)
- com.alibaba.cobar.net.buffer.BufferQueue.put(java.nio.ByteBuffer) @bci=27, line=66 (Compiled frame)
- com.alibaba.cobar.net.AbstractConnection.write(java.nio.ByteBuffer) @bci=34, line=223 (Compiled frame)
- com.alibaba.cobar.net.AbstractConnection.writeToBuffer(byte[], java.nio.ByteBuffer) @bci=47, line=327 (Compiled frame)
- com.alibaba.cobar.net.mysql.BinaryPacket.write(java.nio.ByteBuffer, com.alibaba.cobar.net.FrontendConnection) @bci=33, line=53 (Compiled frame)
- com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor.handleRowData(com.alibaba.cobar.route.RouteResultsetNode, com.alibaba.cobar.server.session.BlockingSession, com.alibaba.cobar.mysql.bio.MySQLChannel, java.nio.ByteBuffer, byte) @bci=213, line=316 (Compiled frame)
- com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor.access$400(com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor, com.alibaba.cobar.route.RouteResultsetNode, com.alibaba.cobar.server.session.BlockingSession, com.alibaba.cobar.mysql.bio.MySQLChannel, java.nio.ByteBuffer, byte) @bci=8, line=54 (Interpreted frame)
- com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor$3.run() @bci=24, line=340 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.runTask(java.lang.Runnable) @bci=59, line=886 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=28, line=908 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=662 (Interpreted frame)
Thread 25187: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=1987 (Compiled frame)
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=399 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=78, line=947 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=18, line=907 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=662 (Interpreted frame)
Thread 25186: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=158 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=1987 (Compiled frame)
- com.alibaba.cobar.net.buffer.BufferQueue.put(java.nio.ByteBuffer) @bci=27, line=66 (Compiled frame)
- com.alibaba.cobar.net.AbstractConnection.write(java.nio.ByteBuffer) @bci=34, line=223 (Compiled frame)
- com.alibaba.cobar.net.AbstractConnection.writeToBuffer(byte[], java.nio.ByteBuffer) @bci=47, line=327 (Compiled frame)
- com.alibaba.cobar.net.mysql.BinaryPacket.write(java.nio.ByteBuffer, com.alibaba.cobar.net.FrontendConnection) @bci=33, line=53 (Compiled frame)
- com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor.handleRowData(com.alibaba.cobar.route.RouteResultsetNode, com.alibaba.cobar.server.session.BlockingSession, com.alibaba.cobar.mysql.bio.MySQLChannel, java.nio.ByteBuffer, byte) @bci=213, line=316 (Compiled frame)
- com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor.access$400(com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor, com.alibaba.cobar.route.RouteResultsetNode, com.alibaba.cobar.server.session.BlockingSession, com.alibaba.cobar.mysql.bio.MySQLChannel, java.nio.ByteBuffer, byte) @bci=8, line=54 (Interpreted frame)
- com.alibaba.cobar.mysql.bio.executor.SingleNodeExecutor$3.run() @bci=24, line=340 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.runTask(java.lang.Runnable) @bci=59, line=886 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=28, line=908 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=662 (Interpreted frame)
请问这是什么问题?
-->
Powered by a free Atlassian Confluence Open Source Project License granted to Alibaba Tech. Evaluate Confluence today.
- Powered by Atlassian Confluence 3.5.9, the Enterprise Wiki
- Printed by Atlassian Confluence 3.5.9, the Enterprise Wiki.
- | Report a bug
- | Atlassian News
友情链接:Taocode
Link to this Page
- Link to this Page