zoukankan      html  css  js  c++  java
  • rule.xml属性概念

    # tableRule

    <tableRule name="rule1">
        <rule>
            <columns>id</columns>
            <algorithm>func1</algorithm>
        </rule>
    </tableRule>

    name 属性指定唯一的名字,用于标识不同的表规则。

    # rule

    内嵌的 rule 标签则指定对物理表中的哪一列进行拆分和使用什么路由算法。
    # columns    columns 内指定要拆分的列名字。
    # algorithm  使用 function 标签中的 name 属性。连接表规则和具体路由算法。当然,多个表规则可以连接到
    同一个路由算法上。table 标签内使用。让逻辑表使用这个规则进行分片。

    # function 

    <function name="hash-int"
    class="org.opencloudb.route.function.PartitionByFileMap">
    <property name="mapFile">partition-hash-int.txt</property>
    </function>

    name 指定算法的名字。
    class 制定路由算法具体的类名字。
    # property 为具体算法需要用到的一些属性。

  • 相关阅读:
    Spring框架概念
    git stash 用法总结和注意点
    Java虚拟机:对象创建过程与类加载机制、双亲委派模型
    办公软件技巧
    Zookeeper到底是干嘛的
    ANdroid Studio下载
    node.js网络(net)
    显示日期
    打包apk

  • 原文地址:https://www.cnblogs.com/mysic/p/7832075.html
Copyright © 2011-2022 走看看