1.rule.xml
<?xml version = "1.0" encoding = "UTF-8"?><mycat:rule xmlns:mycat =“ http://io.mycat/”>
。
。
id
Func1
。
。
。
。
user_id
Func1
。
。
。
。
sharding_id
hash-int
。
。
。
。
id
鳴った-長い
。
。
。
。
id
mod-long
。
。
。
。
id
つぶやき
。
。
。
。
id
crc32slot
。
。
。
。
create_time
partbymonth
。
。
。
。
呼び出し日
latestMonth
。
。
。
。
。
id
Rang-mod
。
。
。
。
。
id
ジャンプコンシステントハッシュ
。
。
。
。
create_date
日付によるシャーディング
。
。
。
yyyy-MM-dd
2018-01-03
。
2018-01-07
。
1
。
<関数名=「つぶやき」
class =“ io.mycat.route.function.PartitionByMurmurHash”>
0
2
160
。
<!-/ etc / mycat /bucketMapPath
テスト中に各物理ノードと仮想ノードの分布を観察するために使用されます。この属性が指定されている場合、仮想ノードと物理ノードのつぶやきハッシュ値の間のマッピングがこのファイルに1行ずつ出力されます。デフォルト値はありません。指定しない場合、何も出力されません->
。
<関数名=“ crc32slot”
class =“ io.mycat.route.function.PartitionByCRC32PreSlot”>
2
。
<関数名=“ hash-int”
class =“ io.mycat.route.function.PartitionByFileMap”>
partition-hash-int.txt
。
<関数名=“ rang-long”
class =“ io.mycat.route.function.AutoPartitionByLong”>
autopartition-long.txt
。
。
。
3
。
。
8
128
。
<関数名=「latestMonth」
class =“ io.mycat.route.function.LatestMonthPartion”>
24
。
<関数名=“ partbymonth”
class =“ io.mycat.route.function.PartitionByMonth”>
yyyy-MM-dd
2015-01-01
。
。
。
partition-range-mod.txt
。
。
。
3
。
</ mycat:rule>
2.schema.xml
<?xml version = "1.0"?><mycat:schema xmlns:mycat =“ http://io.mycat/”>
。
<table primaryKey="id" name="code_data" dataNode="dn1,dn2,dn3,dn4,dn5" rule="sharding-by-date" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="code_data_batch_report" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="code_data_import_error" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="code_data_upload_moa" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="code_data_upload_moa_record" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="code_data_upload_record" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="create_code_bag" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="create_code_base" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="distributor" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="error_moa_code_data" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="factory" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="product" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="production_task" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="query_report" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="query_report_detail" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="query_report_security" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="query_report_security_detail" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="rdc_user" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="rdc_warehouse" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="storage_data" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="storage_data_error" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="storage_data_upload_record" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="sys_dict" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="sys_param" />
<table primaryKey="id" type="global" dataNode="dn1,dn2,dn3,dn4,dn5" name="sys_user" />
。
<table primaryKey="id" name="code_data" dataNode="lb1,lb2,lb3,lb4,lb5" rule="sharding-by-date" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="code_data_batch_report" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="code_data_import_error" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="code_data_upload_moa" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="code_data_upload_moa_record" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="code_data_upload_record" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="create_code_bag" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="create_code_base" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="distributor" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="error_moa_code_data" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="factory" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="product" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="production_task" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="query_report" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="query_report_detail" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="query_report_security" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="query_report_security_detail" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="rdc_user" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="rdc_warehouse" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="storage_data" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="storage_data_error" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="storage_data_upload_record" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="sys_dict" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="sys_param" />
<table primaryKey="id" type="global" dataNode="lb1,lb2,lb3,lb4,lb5" name="sys_user" />
。
。
。
。
。
。
。
。
。
。
。
1を選択
。
。
。
1を選択
。
。
</ mycat:schema>
3.server.xml
<?xml version = "1.0" encoding = "UTF-8"?><mycat:server xmlns:mycat =“ http://io.mycat/”>
。
0
0
2
。
。
。
<!–
1
32
->
。
0
。
。
。
。
。
。
<!–
8066 9066
300000 0.0.0.0
409632->
。
0
。
<!–
マージ/注文/グループ/制限1のヒープをオフ0オフ
->
1
<!–
単位はmです
->
1m
<!–
単位はkです
->
1k
0
<!–
単位はmです
->
384m
。
true
。
。
。
<!–
。
。
。
。
。
。
。
。
->
。
。
sierac1q2w3e
logicdb
。
。
<!–
。
。
<table name="tb01" dml="0000"></table>
<table name="tb02" dml="1111"></table>
。
。
->
。
。
sierac1q2w3e
logiclb
。
</ mycat:server>