请求地址
/v2/webservice/table/table-tcapdb-conf
请求方法
Post
请求参数说明
| 参数名称 | 类型 | 是否必填 | 说明 |
|---|---|---|---|
| app_id | number | ||
| zone_id | number | ||
| table_name | string |
示例
{
"app_id":4,
"zone_id":14209,
"table_name": "ChatChannelTable"
}
返回参数说明
| 参数名称 | 类型 | 说明 |
|---|---|---|
| dbcluster_info | Object | 缓写字段信息 |
| syncdb_config | Object | 缓写配置信息 |
| *具体看返回例子的备注信息 |
成功返回
存在缓写
{
"code": 0,
"request_id": "923ce6fd-159c-4423-9e5e-5c865ec2fe28",
"data": {
"app_id": 4,
"zone_id": 14209,
"table_name": "ChatChannelTable",
"table_type": 0,
"dbcluster_info": {
"app_id": 4,
"zone_id": 14209,
"table_name": "ChatChannelTable",
"table_type": 0,
"db_sources": {
"db_source_num": 1,
"db_source": [
{
"db_source_name": "DbSource",
"ip": "9.134.70.239", // mysql/gcs数据库地址
"port": 3306, // mysql/gcs数据库端口号
"user": "tcaplus", // mysql/gcs数据库用户名
"passwd": "72hHEG+LpPzGW+mTYZ8D8w==", // mysql/gcs数据库密码 被加密的
"db_name": "tcaplus_autoinstall", // mysql/gcs数据库名称
"conn_pool_size": 10,
"character_set": "utf8"
}
]
},
"db_tables": {
"db_table_num": 1,
"db_table": [
{
"table_prefix": "ChatChannelTable_Z14209_", //表前缀
"sub_table_count": 1,
"value_fields": {
"field_num": 1,
"field": [
{
"field_name": "data", // 缓写字段名
"db_field_name": "data" // 缓写到数据库中的对应的名称
}
]
},
"key_fields": {
"field_num": 1,
"field": [
{
"field_name": "id", // 缓写字段名
"db_field_name": "id" // 缓写到数据库中的对应的名称
}
]
},
"deploy": {
"sub_table_store_place_num": 1,
"sub_table_store_place": [
{
"sub_table_index_start": 0,
"sub_table_index_end": 1,
"db_source_name": "DbSource"
}
]
}
}
]
},
"field_type_stmts": {
"table_tdr_file": "../../cfg/tcapdb_1_4_5_1/92bb0299d779743e5b80d90c94a80e5d.tdr",
"table_tdr_name": "ChatChannelTable",
"key_field_stmts": {
"field_stmt_num": 0
},
"value_field_stmts": {
"field_stmt_num": 0
},
"table_idl_file": "",
"idl_type": 1
},
"route_key_fields": {
"field_num": 0
},
"tdbank_conf": {
"bid": "tcaplus",
"tid": "tcaplus",
"db_name": "tcaplus",
"string_encode_manner": 1,
"msgtype": 2,
"tdbank_addr": "tcp://10.215.130.234:46801"
},
"db_type": 1,
"index_info": {
"replication_num": 0,
"shard_num": 0
},
"plugin_info": {
"plugin_name": "",
"plugin_file_id": 0,
"plugin_file_path": "",
"window_size": 10,
"alarm_receivers": ""
},
"kafka_info": {
"instance": "",
"address": "",
"topic": "",
"user": "",
"password": "",
"is_vpc": 0
}
},
"syncdb_config": {
"target": 3, // 缓写源端 master:2 , slave:3
"db_queue_write_flag": 1,
"db_queue_read_flag": 1,
"dburl": "tcp://:",
"default_sync_name": "DefaultSyncName",
"max_block_num_of_task_queue": 50,
"max_node_num_per_block_of_task_queue": 30000,
"task_queue_bucket_num": 0,
"sync_mech_num": 1,
"sync_mech": [
{
"name": "DefaultSyncName",
"interval": 30,
"field_count": 1,
"field_list": "data"
}
]
},
"syncdb_type": 1
}
}
不存在缓写
{
"code": 0,
"request_id": "808bfe5d-62b6-4aec-8b40-e5c65a659ab7",
"data": {
"app_id": 4,
"zone_id": 14209,
"table_name": "AllocGidTable",
"table_type": 0,
"dbcluster_info": null,
"syncdb_config": null,
"syncdb_type": 0
}
}
失败返回
{
}
```