github.com/XiaoMi/Gaea@v1.2.5/etc/file/namespace/test_namespace_shard.json (about)

     1  {
     2      "name": "test_namespace_shard",
     3      "online": true,
     4      "read_only": false,
     5      "allowed_dbs": {
     6          "db_unshard": true,
     7          "db_kingshard": true,
     8          "db_mycat": true
     9      },
    10      "default_phy_dbs": {
    11          "db_unshard": "db_unshard",
    12          "db_kingshard": "db_kingshard",
    13          "db_mycat": "db_mycat_0"
    14      },
    15      "slow_sql_time": "1000",
    16      "black_sql": [],
    17      "allowed_ip": [],
    18      "slices": [
    19          {
    20              "name": "slice-0",
    21              "user_name": "test1",
    22              "password": "test1",
    23              "master": "127.0.0.1:3307",
    24              "slaves": [],
    25              "statistic_slaves": [],
    26              "capacity": 12,
    27              "max_capacity": 24,
    28              "idle_timeout": 60
    29          },
    30          {
    31              "name": "slice-1",
    32              "user_name": "test1",
    33              "password": "test1",
    34              "master": "127.0.0.1:3308",
    35              "slaves": [],
    36              "statistic_slaves": [],
    37              "capacity": 12,
    38              "max_capacity": 24,
    39              "idle_timeout": 60
    40          }
    41      ],
    42      "shard_rules": [
    43          {
    44              "db": "db_kingshard",
    45              "table": "tbl_kingshard",
    46              "type": "mod",
    47              "key": "id",
    48              "locations": [
    49                  2,
    50                  2
    51              ],
    52              "slices": [
    53                  "slice-0",
    54                  "slice-1"
    55              ]
    56          },
    57          {
    58              "db": "db_kingshard",
    59              "table": "tbl_kingshard_child",
    60              "type": "linked",
    61              "key": "id",
    62              "parent_table": "tbl_kingshard"
    63          },
    64          {
    65              "db": "db_kingshard",
    66              "table": "tbl_kingshard_user_child",
    67              "type": "linked",
    68              "key": "user_id",
    69              "parent_table": "tbl_kingshard"
    70          },
    71          {
    72              "db": "db_kingshard",
    73              "table": "tbl_kingshard_global_one",
    74              "type": "global",
    75              "locations": [
    76                  2,
    77                  2
    78              ],
    79              "slices": [
    80                  "slice-0",
    81                  "slice-1"
    82              ]
    83          },
    84          {
    85              "db": "db_kingshard",
    86              "table": "tbl_kingshard_global_two",
    87              "type": "global",
    88              "locations": [
    89                  2,
    90                  2
    91              ],
    92              "slices": [
    93                  "slice-0",
    94                  "slice-1"
    95              ]
    96          },
    97          {
    98              "db": "db_mycat",
    99              "table": "tbl_mycat",
   100              "type": "mycat_mod",
   101              "key": "id",
   102              "locations": [
   103                  2,
   104                  2
   105              ],
   106              "slices": [
   107                  "slice-0",
   108                  "slice-1"
   109              ],
   110              "databases": [
   111                  "db_mycat_[0-3]"
   112              ]
   113          },
   114          {
   115              "db": "db_mycat",
   116              "table": "tbl_mycat_child",
   117              "type": "linked",
   118              "parent_table": "tbl_mycat",
   119              "key": "id"
   120          },
   121          {
   122              "db": "db_mycat",
   123              "table": "tbl_mycat_user_child",
   124              "type": "linked",
   125              "parent_table": "tbl_mycat",
   126              "key": "user_id"
   127          },
   128          {
   129              "db": "db_mycat",
   130              "table": "tbl_mycat_murmur",
   131              "type": "mycat_murmur",
   132              "key": "id",
   133              "locations": [
   134                  2,
   135                  2
   136              ],
   137              "slices": [
   138                  "slice-0",
   139                  "slice-1"
   140              ],
   141              "databases": [
   142                  "db_mycat_0","db_mycat_1","db_mycat_2","db_mycat_3"
   143              ],
   144              "seed": "0",
   145              "virtual_bucket_times": "160"
   146          },
   147          {
   148              "db": "db_mycat",
   149              "table": "tbl_mycat_long",
   150              "type": "mycat_long",
   151              "key": "id",
   152              "locations": [
   153                  2,
   154                  2
   155              ],
   156              "slices": [
   157                  "slice-0",
   158                  "slice-1"
   159              ],
   160              "databases": [
   161                  "db_mycat_[0-3]"
   162              ],
   163              "partition_count": "4",
   164              "partition_length": "256"
   165          },
   166          {
   167              "db": "db_mycat",
   168              "table": "tbl_mycat_global_one",
   169              "type": "global",
   170              "locations": [
   171                  2,
   172                  2
   173              ],
   174              "slices": [
   175                  "slice-0",
   176                  "slice-1"
   177              ],
   178              "databases": [
   179                  "db_mycat_[0-3]"
   180              ]
   181          },
   182          {
   183              "db": "db_mycat",
   184              "table": "tbl_mycat_global_two",
   185              "type": "global",
   186              "locations": [
   187                  2,
   188                  2
   189              ],
   190              "slices": [
   191                  "slice-0",
   192                  "slice-1"
   193              ],
   194              "databases": [
   195                  "db_mycat_[0-3]"
   196              ]
   197          },
   198          {
   199              "db": "db_mycat",
   200              "table": "tbl_mycat_string",
   201              "type": "mycat_string",
   202              "key": "id",
   203              "locations": [
   204                  2,
   205                  2
   206              ],
   207              "slices": [
   208                  "slice-0",
   209                  "slice-1"
   210              ],
   211              "databases": [
   212                  "db_mycat_[0-3]"
   213              ],
   214              "partition_count": "4",
   215              "partition_length": "256",
   216              "hash_slice": "20"
   217          }
   218      ],
   219      "users": [
   220          {
   221              "user_name": "front_user1",
   222              "password": "front_password1",
   223              "namespace": "test_namespace_shard",
   224              "rw_flag": 2,
   225              "rw_split": 1,
   226              "other_property": 0
   227          },
   228          {
   229              "user_name": "front_user2",
   230              "password": "front_password2",
   231              "namespace": "test_namespace_shard",
   232              "rw_flag": 2,
   233              "rw_split": 0,
   234              "other_property": 0
   235          }
   236      ],
   237      "default_slice": "slice-0",
   238      "global_sequences": [],
   239      "max_sql_execute_time": 0
   240  }