Cobar介绍及配置

from:http://code.alibabatech.com/wiki/display/cobar/Home

Skip to end of metadata
 
Go to start of metadata
 
首页 | 下载 | 产品文档 | 产品规划 | 常见问答 | 需求管理 | 联系我们

概述

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">
    < 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.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">
    < cobar:rule xmlns:cobar = "http://cobar.alibaba.com/" >
       <!-- 路由规则定义,定义什么表,什么字段,采用什么路由算法。-->
       < 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:server xmlns:cobar = "http://cobar.alibaba.com/" >
      
       <!--定义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
Labels:
None
cobar cobar Delete
quickstart quickstart Delete
doc doc Delete
Enter labels to add to this page:
 
 
 
Looking for a label? Just start typing.
  1. 六月 14, 2012

    Anonymous

    请问如何配置HA, 如果做数据迁移?

    1. 六月 14, 2012

      schema.xml中对应的dataNode可以配置心跳探测语句,并可以自动和手动切换,详细的管理手册和开发手册正在准备中。

      1. 六月 20, 2012

        Anonymous

        打算在一个产品中采用corba,
        期待详细的管理手册和开发手册!!

  2. 六月 14, 2012

    Anonymous

    顺便说一下,该产品太强大了,使用也非常简单.... 期待更新....

    1. 六月 14, 2012

      多谢支持,欢迎多提意见和建议。

      1. 六月 15, 2012

        Anonymous

        Woo, 无法注册,不过该项目确实很方便易用,而且很容易被灵活且几乎无缝的加入到项目中.
        我已经安排人员研究该项目了,由于文档还不完善,看来只能通过阅读dtd和研究部分源代码来了解了.
        其实该项目的性能测试指标和数据可否贴出来呢?
        不过我也已经安排人员在初步研究完成后先利用虚拟环境做性能测试了.
        祝你们的该项目发展顺利,该项目的设计思路实在是好,简单清晰。

        另,作为该项目的功能模块或子项目,我相信会有很多开发人员系统集成memcached的分片处理的.
        希望你们可以采纳我的建议,加入到你们Jira的Backlogs里面,

        1. 六月 15, 2012

          欢迎,详细文档正在准备当中,为了对用户负责我们现阶段会对文档本身做详细校对,确保用户不会因为文档里的手误而带来烦恼。
          您的建议也非常好,后期我们可以保持进一步的联系。
          虽然该产品在阿里内部已经run了3年以上了,但是作为开源我们才刚刚准备,还有很多地方百废待兴,所以欢迎大家共同建设。

  3. 六月 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对于这个问题有没有解决方案?

    1. 六月 15, 2012

      是的,跨库的排序、分页当前版本不支持。需要应用处理,当前版本的使用约束我们后面会给出。
      所以查询尽量要带上拆分字段,避免跨库的这类操作。
      这个特性我们正在开发期望能有更好的支持,但是对于大数据集的merge可能会有所限制。

  4. 六月 19, 2012

    Anonymous

    墙裂求用户文档, 未完成的也可以先放出来一睹为快嘛

    1. 六月 19, 2012

      谢谢关注,我们的同事们正在忙碌的整理中,相信很快就会放出,请耐心等待。

  5. 六月 19, 2012

    Anonymous

    不知道cobar是否支持扩展其它类型数据库?还是只会支持MySQL?
    确实是个非常棒的项目,持续关注~

    1. 六月 19, 2012

      后期计划会对PostgresQL数据库做支持增强

  6. 七月 01, 2012

    Anonymous

    很是敬佩这里技术开源精神,也十分看好这款产品。期待文档!秉承开源精神,也很乐意帮忙开发或完善文档、或提供任何力所能及的帮助!linuxedu@foxmail.com

    1. 七月 02, 2012

      谢谢支持!我们也很欢迎大家的参与,具体可以先发邮件给我们:ali-cobar@googlegroups.com或者ali-cobar@list.alibaba-inc.com

  7. 七月 02, 2012

    Anonymous

    新手使用cobar有问题请教,按照参考教程步骤走,如果在dbtest1上跟dbtest2和dbtest3上创建同样的tb2表的话,从8066端口进入mysql的话,show tables,就能看到两个tb2表,如果王tb2表中插入的话,全部插入到了后端dbtest1数据库中的表中,其他两个后端数据库的tb2表没有数据,这样的情况该如何设置呢?
    mysql -utest -ptest -P8066 -h192.168.2.100

    mysql> show tables;

    -------------------

    Tables_in_dbtest1

    -------------------

    tb1
    tb2
    tb2

    -------------------

    1. 七月 02, 2012

      可能是你在定义表以及规则时有问题,贴一下你的schema.xml和rule.xml的配置文件以及执行插入的SQL语句或者将信息发到我们的邮件列表中。

      1. 七月 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>

        谢谢!

        1. 七月 04, 2012

          Anonymous

          不错非常实用,而且也很简单

    2. 十一月 14, 2012

      Anonymous

      你试过没。。按找默认rule,就算你在dbtest1中有tb2的话,在插入记录的时候也不会放到这个里面,而会根据rule放到dbtest2或者dbtest3中的tb2里头。。我已经试过了。。分布式存储依然成功。

      1. 八月 02, 2013

        Anonymous

        我也研究了好几周了,还是没配置好,求指点,老是抱这个错误怎么解决呢,求赐教啊我邮箱:ft3058@163.com
        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 ===============================================

  8. 七月 05, 2012

    Anonymous

    为什么网上关于Cobar这个产品的资料这么少?

    1. 七月 05, 2012

      因为之前我们没有对外开源,也很少做对外介绍或者宣传该产品。

  9. 七月 05, 2012

    Anonymous

    请问Cobar支持存储过程、事务么?请问Cobar在未来可能支持Oracle么?

    1. 七月 05, 2012

      事务支持的,存储过程没做过测试,可能会遇到一些问题,因为我们内部对存储过程的使用几乎没有,有也会建议去掉改用其他方式。
      对于oracle cobar-1.0.x系列是支持的,但是限制会比较多比如SQL语法不是full support,事务也不支持等,所以cobar-1.2.x以后暂时不支持oracle。

      1. 七月 05, 2012

        Anonymous

        回复非常及时,谢了:)

  10. 七月 16, 2012

    Anonymous

    请问Cobar在阿里巴巴内部主要用于支持哪些方面的应用,对网络带宽有没有严格要求,有没有事务管理

    1. 七月 16, 2012

      阿里B2B绝大部分使用mysql的都会使用cobar(包括分库与不分库的),单库事务和数据库一致,多库使用二段协议(不能保证理论上的强一致性),详细见产品文档。网络都是千兆

      1. 八月 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

      2. 八月 02, 2013

        Anonymous

        请问这个问题怎么解决啊,是那些原因引起的,请一定抽出您宝贵的时间给予解答,谢谢

  11. 七月 17, 2012

    Anonymous

    请问cobar可以应用于广域网上百台MySQL服务器的分布式系统吗,阿里内部有没有具体这么应用过

    1. 七月 17, 2012

      连通性和规模上是没问题的,但是性能上需要考虑网络延迟的因素,cobar在千兆网的环境下单台QPS可达8万每秒左右,
      考虑到生产环境SQL的差异性一般建议2-4万QPS。阿里内部,一般cobar和MySQL部署在同一IDC。

  12. 七月 17, 2012

    Anonymous

    文档中说的SQL语句中的路由字段是要由应用程序填写,还是Cobar填写?

    1. 七月 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),来判断语句如何路由。

      1. 七月 18, 2012

        Anonymous

        Cobar相当于一个中间件,这个中间件只有一台服务器上会安装,还是每个DATANODE有一个独立的Cobar,如果只有一台机上有Cobar,好像安全性就大大降低了。
        Cobar能不能应用于集群后的数据库,也就是多个集群的分布式。

        1. 七月 18, 2012

          这个完全取决于你怎么部署,另外cobar有访问用户和schema权限的控制的,并有隔离区的概念。
          假设cobar+MySQL节点是一套关系型数据分布式处理系统的话,你可以把cobar理解成是系统的分布式处理的一部分。

          1. 七月 18, 2012

            Anonymous

            有没有QQ群

            1. 七月 18, 2012

              因为公司内部用QQ沟通比较少,所以暂时没有QQ群,一般以邮件组的方式沟通比较多。
              不过为了更加方便的交流,QQ群也是个不错的方式,如果我们建好了,会在联系我们告诉大家。

              1. 八月 22, 2013

                Anonymous

                你好,请问按照上面的配置如果id超过1024时,给数据苦力插入数据时他是按什么规则插到两个库里去的

            2. 七月 18, 2012

              QQ群已建好,群号250345828,欢迎加入讨论

              1. 十月 16, 2012

                Anonymous

                群满了

  13. 七月 28, 2012

    Anonymous

    能否补充一下:主从结构的读写分离、负载均衡的例子

    1. 七月 30, 2012

      考虑到读写的延迟,暂时不支持读写分离。

  14. 七月 30, 2012

    Anonymous

    既然Cobar不支持跨库的连接操作,那么是否有对应的解决方案呢?

    1. 七月 30, 2012

      设计时尽量不要出现跨库的join,目前只能由应用端去解决和处理该问题。

  15. 八月 07, 2012

    Anonymous

    Cobar支持存储过程的调用吗?
    比如路由到一台mysql服务器上调用其存储过程?

  16. 八月 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么?是这么理解么

    1. 八月 13, 2012

      Anonymous

      说错 应该是
      post_shard0:只包含cdb_posts表 cdb_posts规则:0<= cdb_post <=511
      post_shard1:包含cdb_posts和其他表 cdb_posts规则:512<= cdb_post <=1023

  17. 八月 24, 2012

    Anonymous

    请问打包好的版本只支持id字段切分吗?
    如果自定义的话,修改何处的代码呢?
    谢谢!

  18. 九月 05, 2012

    Anonymous

    哎呀 不支持分页 排序 这些 好像很难在项目应用中实现啊?

    有没有什么建议 谢谢~!

  19. 九月 14, 2012

    Anonymous

    粗略看了一下,跟AMOEBA很相似,不支持的功能也很相似。

    以后能否支持Oracle,支持多表、跨库表Join

  20. 九月 21, 2012

    Anonymous

    在cobar-server-1.2.6版本里,按照默认配置启动了cobar服务,当通过offline命令设置后;发现如下情况:
    一:查看状态
    mysql> show cobar_status;
    ERROR 1053 (HY000): The server has been shutdown
    二:显示数据库
    mysql> show databases;
    ----------

    DATABASE

    ----------

    dbtest

    ----------
    1 row in set (0.00 sec)
    三:执行数据插入操作能够成功;
    那么,请问,在offline命令操作后,是否要限制对数据库的操作呢?

  21. 十月 11, 2012

    Anonymous

    对于cobar那些限制,如分页、排序、子查询、join在客户端处理有什么相关处理代码能提供参考吗?因为毕竟这些是开发中查用的,如果这些都不支持,似乎都没有多大意义使用cobar了。

  22. 十月 11, 2012

    Anonymous

    那些限制在淘宝的应用也是cobar实现的吗?如果是那又是如何实现的,或者有何较好的思路呢?难道淘宝上的那些查询都不用排序、分页、join?希望能否提供一些客户端处理的思路

  23. 十月 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)

  24. 十一月 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)

    1. 十一月 08, 2012

      这个是在客户端主动非正常断开连接时可能会报这样的异常,如果不是很频繁的报可以忽略掉。

  25. 十一月 02, 2012

    Anonymous

    支持开源

    1. 十一月 13, 2012

      Anonymous

      I'm so glad that the ienntret allows free info like this!

    2. 十一月 14, 2012

      Anonymous

      DXW8Y5 , [url=http://zbfdutnoujxj.com/]zbfdutnoujxj[/url], [link=http://lepblryeqftx.com/]lepblryeqftx[/link], http://pebueqemfnhp.com/

    3. 十一月 16, 2012

      Anonymous

      yUDDdp <a href="http://jixsjkhrymbt.com/">jixsjkhrymbt</a>

  26. 十一月 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.
    三个数据源都未启动怎么回事儿?

    1. 十一月 08, 2012

      检查你的数据源配置信息是否正确,或者网络的连通性或者延迟是不是比较大,也可以考虑把timeout时间配置的长一点,默认连接超时时间大概是10秒。

  27. 十一月 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)

  28. 十一月 09, 2012

    Anonymous

    这个中间件好强大,我想问一下这个问题,在淘宝有一个Tengine,是nginx基础上做的延伸开发,其中有这么一段配置
    http {

    upstream dbgroup

    Unknown macro: { drizzle_server host1}


    server {
    location /mysql

    Unknown macro: { set $sql "select * from cats"; drizzle_query $sql; drizzle_pass dbgroup; rds_json on; }


    }
    }

    里面配置了mysql的信息,我的问题是,如果使用这个中间件,我是不是就不用在dbgroup中配置多个mysql数据库了?
    因为按照你的说法,我只要配置一个数据库,就可以享受集群数据库的服务了,
    谢谢!

  29. 十一月 13, 2012

    Anonymous

    When you think about it, that's got to be the right awnser.

  30. 十一月 14, 2012

    Anonymous

    CEySeZ <a href="http://pkwhvrvchtyo.com/">pkwhvrvchtyo</a>

  31. 十一月 14, 2012

    Anonymous

    W569Yu , [url=http://iuncvbixrbyj.com/]iuncvbixrbyj[/url], [link=http://kdthxodvrkgv.com/]kdthxodvrkgv[/link], http://qtwuibnsrhli.com/

  32. 十一月 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)

    1. 十一月 14, 2012

      Anonymous

      at com.alibaba.cobar.parser.recognizer.FunctionManager.<init>(FunctionManager.java:256)
      at com.alibaba.cobar.parser.recognizer.FunctionManager.<clinit>(FunctionManager.java:233)
      FunctionManager.java怎么在源码里找不到?

      1. 十一月 14, 2012

        Anonymous

        在cobar-parser目录下面啊。。。

  33. 十一月 16, 2012

    Anonymous

    38NKxo <a href="http://dubgxsbbaeyu.com/">dubgxsbbaeyu</a>

  34. 十一月 17, 2012

    Anonymous

    DmaNTJ , [url=http://niuezbkkcrvb.com/]niuezbkkcrvb[/url], [link=http://uhcpdsxroddw.com/]uhcpdsxroddw[/link], http://dfhdkmunyyec.com/

  35. 十一月 23, 2012

    Anonymous

    是不是也兼容基于mysql的列式数据库infobright呢?

  36. 十一月 23, 2012

    Anonymous

    不支持跨库的分页排序,我觉得在实际应用用可不可以这样看待:比如淘宝的用户购物记录表,你按uid来切,可以将用户的记录分散到不同的表中,但是同一用户的数据就在一个表内,这样就变成单表分页排序了,按说这么处理的话就没啥问题吧?

  37. 十一月 29, 2012

    Anonymous

    请问cobar与mysql cluster的区别是不是:cluster还需指定查询是哪个节点,而cobar对连接应用来说就像是一个数据库?cobar做HA是不是要每个存放table的数据库也要有个主主?

  38. 十一月 30, 2012

    Anonymous

    cobar对表的拆分方式,一张表水平拆分多份到不同的库中,而不是放入同一个库中。
    请问这种拆分方式是基于什么考虑?
    谢谢!

    1. 十二月 11, 2012

      Anonymous

      对于数据库来说一个表能处理的量是有限的,当数据量达到亿级别时,拆分到多个库基本是唯一的选择,为了实现现实复杂的业务逻辑还需要同时使用SearchEngine等技术

  39. 十二月 03, 2012

    Anonymous

    当某一节点宕机,那这个节点的数据就无法访问吧?

    1. 十二月 11, 2012

      Anonymous

      一个结点挂掉会通过心跳监测发现结点问题,Cobar会自动切到备用结点

  40. 十二月 18, 2012

    Anonymous

    cobar启动成功,但在命令行中访问的时候总是出现 Access denied for user ‘test’ @'localhost'错误,这是什么情况是数据库那边设置不对么?

  41. 十二月 25, 2012

    Anonymous

    不知道分页功能cobar团队有什么思路,困分页问题很长时间了,没有合适的解决方案,求指导啊,求参考啊,

  42. 十二月 25, 2012

    Anonymous

    Cobar使用MySQL协议来处理与MySQL交互的数据包,为什么不直接使用jdbc来连接数据库呢?
    这样设计是出于什么样的考虑?

  43. 十二月 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.

  44. 一月 05, 2013

    Anonymous

    yxdbeyond@gmail.com

    刚知道这个软件,怎么用来mysql读写分离啊,求大神给我最简单的配置方法,邮箱是yxdbeyond@gmail.com

  45. 一月 08, 2013

    Anonymous

    count 有多个返回结果:

    -------------------
    select count from user;

    -------------------
    2 row returned

    count
    13
    0

    ==================
    怎么解决?

  46. 一月 10, 2013

    Anonymous

    我按照上面的配置都弄好了 但是启动时(startup.bat win7下面的环境) 出现异常找不到主方法类(java.lang.NoClassDefFoundError:com/alibaba/cobar/CobarStartup)

    1. 二月 05, 2013

      Anonymous

      把 start.bat 中的 version = 1.3.0 改成 1.2.7 或解压 cobarxxx.jar 到 classes 下

  47. 一月 23, 2013

    Anonymous

    不错的东西!

  48. 一月 29, 2013

    Anonymous

    按照例子中,假如我要在最终的tb1,tb2中互相复制数据,比如从tb2复制数据到tb1,假定tb1和tb2结构一致,使用如下语句:
    insert into tb1 select * from tb2;

    按照这样的语言复制数据,会提示:
    ERROR 1146 (42S02): Table 'dbtest2.tb1' doesn't exist

    请问这种情况如何解决。

  49. 一月 31, 2013

    Anonymous

    您好,我有一个有意思的问题。我使用的两种不同的数据库,oracle和mysql。

    这样能不能用Cobar做分布式数据库。

    PS(我的数据分发库是oracle,这个库我不能用,只能用于取数据。自建的是Mysql数据库)

  50. 二月 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)
    这是什么意思啊?

    1. 二月 21, 2013

      Anonymous

      已解决

  51. 三月 14, 2013

    Anonymous

    在windows我已经装好了java jdk1.6,并且以设置JAVA_HOME环境变量,也使用了java -version进行安装测试,没出现问题,但是用cmd进入cobar-server-1.2.4\bin是说 没有设置环境变量?

  52. 四月 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

    1. 四月 08, 2013

      Anonymous

      同上:
      select count count from tb2 where val='part2'
      这样还发回多个
      如:
      -------

      count

      -------

      0
      3

      -------

  53. 五月 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。

  54. 五月 27, 2013

    Anonymous

    你好,如果cobar服务下挂载的数据库节点太多,cobar服务还不会负荷很重?对此有没有相关cobar集群方式解决方案?

  55. 六月 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>
    求解答,万分感谢!

  56. 六月 26, 2013

    Anonymous

    您好,我想问下, cobar有类似 start transaction; insert into tb1; insert into tb2; commit;这样的事务支持么? 我连接cobar执行start transaction返回"unsupported statement"; 所说的支持事务是不是指的是update tb2 where id>5;这样的单条语句跨库的情况?

  57. 七月 17, 2013

    Anonymous

    不错的东西,不知道还有后续发展的计划吗,还是要和tddl合并了?

  58. 八月 09, 2013

    Anonymous

    同问,新版本还有计划发布吗
    好久都没有更新过版本了

    1. 八月 12, 2013

      Anonymous

      cobar已死,有事烧纸。github上面都没有cobar的身影了。

      1. 八月 20, 2013

        Anonymous

        不会吧。这个东东挺有意思的。竟然无后续了。失望啊!!

  59. 八月 20, 2013

    Anonymous

    已经试过,事务控制有效,不错。

    就是配置的路由规则只能1024的分配这个不是很舒服。

    如果我现在是4个库做分库操作,后续增加第5,6个库进去,需要对现有的库进行梳理,

    这个动作不小啊。

    希望作者考虑路由规则设置的合理性和健壮性。

  60. 八月 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)

    请问这是什么问题?

Add Comment

Powered by a free Atlassian Confluence Open Source Project License granted to Alibaba Tech. Evaluate Confluence today.

友情链接: Taocode

 
 
 

Link to this Page

  • Link to this Page
Link:
Tiny Link:
Wiki Markup:
Close
Shortcut tip: Pressing k also opens this dialog box
 
 
 
 
 
 
   

 

转载于:https://my.oschina.net/u/1985061/blog/422568

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要使用Cobar连接PostgreSQL,您需要进行以下配置: 1. 在Cobar配置文件中,添加一个新的数据源配置,指向您的PostgreSQL数据库。例如: ``` <dataNode name="pgdb"> <dataHost host="localhost" name="postgresql" maxCon="1000" minCon="10" balance="random" writeType="jdbc"> <dataSource class="com.alibaba.druid.pool.DruidDataSource" type="postgresql"> <property name="url">jdbc:postgresql://localhost:5432/mydb</property> <property name="username">postgres</property> <property name="password">mypassword</property> </dataSource> </dataHost> <database name="mydb" /> </dataNode> ``` 2. 确保您的Cobar和PostgreSQL数据库是在同一台服务器上运行,并且PostgreSQL数据库已经启动。 3. 您需要安装PostgreSQL JDBC驱动程序,以便Cobar可以使用它来连接到PostgreSQL数据库。 4. 在Cobar的规则文件中,将您希望在PostgreSQL数据库上执行的SQL语句路由到您在第1步中定义的数据源上。例如: ``` <rule name="pgdb_rule"> <columns>id</columns> <algorithm>mod</algorithm> <tableRule name="pgdb_table_0" rule="pgdb_rule"> <rule> <value>0</value> <dataNode>pgdb</dataNode> </rule> </tableRule> </rule> ``` 在这个例子中,如果SQL语句中的"id"列的值被模数为0,则它会被路由到名为"pgdb"的数据源上。 5. 最后,您需要在Cobar的启动脚本中,添加PostgreSQL JDBC驱动程序的路径到CLASSPATH环境变量中。例如: ``` export CLASSPATH=$CLASSPATH:/path/to/postgresql-jdbc-driver.jar ``` 希望这些步骤可以帮助您成功地配置Cobar连接到PostgreSQL数据库
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值