批量查询预检查结果
功能介绍
批量查询任务的预检查结果。
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
接口约束
- 预检查接口调用成功后才能调用。
URI
POST /v3/{project_id}/jobs/batch-precheck-result
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
project_id |
是 |
String |
租户在某一Region下的Project ID。 获取方法请参见获取项目ID。 |
请求参数
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
Content-Type |
是 |
String |
指定类型为application/json。 缺省值:application/json |
X-Auth-Token |
是 |
String |
从IAM服务获取的用户Token。 |
X-Language |
否 |
String |
请求语言类型。 缺省值:en-us 取值:
|
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
jobs |
是 |
Array of strings |
批量查询预检查结果请求列表。 约束:不能包含空对象。集合中的元素取值严格匹配UUID规则。任务id不能重复。 |
响应参数
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
results |
Array of objects |
批量查询预检查结果响应体集合。 详情请参见表5。 |
count |
Integer |
总记录数。 |
参数 |
参数类型 |
描述 |
---|---|---|
precheck_id |
String |
查询预检查结果的任务ID。 |
result |
Boolean |
返回的预检查结果是否通过。true表示预检查通过,通过后才可进行启动任务。 |
process |
String |
预检查进度百分比。 |
total_passed_rate |
String |
预检查通过百分比。 |
rds_instance_id |
String |
RDS实例ID。 |
job_direction |
String |
任务方向。取值:
|
precheck_result |
Array of object |
预检查各项结果。 详情请参见表6。 |
error_msg |
String |
错误信息。 |
error_code |
String |
任务错误码。 |
参数 |
参数类型 |
描述 |
---|---|---|
item |
String |
检查项。 |
result |
String |
检查结果。取值:
|
failed_reason |
String |
失败原因。 |
data |
String |
加密的数据。 |
raw_error_msg |
String |
行错误信息。 |
group |
String |
检查项分组。 |
failed_sub_jobs |
Array of objects |
失败的子任务信息。 详情请参见表7。 |
请求示例
- 查询DDS实时迁移预检查结果
https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-precheck-result { "jobs" : [ "a281f62f-4631-45d6-a2d3-679a9f4jb105" ] }
- 查询MySQL实时迁移预检查结果
https://{endpoint}/v3/054ba152d480d55b2f5dc0069e7ddef0/jobs/batch-precheck-result { "jobs" : [ "140b5236-88ad-43c8-811c-1268453jb101" ] }
响应示例
状态码: 200
OK
- 实时迁移MySQL查询预检查结果响应示例 :
{ "count" : 1, "results" : [ { "result" : true, "process" : "100%", "precheck_id" : "140b5236-88ad-43c8-811c-1268453jb101", "total_passed_rate" : "100%", "rds_instance_id" : "e05a3679efe241d8b5dee80b17c1a863in01", "job_direction" : "up", "precheck_result" : [ { "item" : "dstDbDiskSize", "result" : "PASSED", "data" : "{\"diskSizeTimes\":\"1.5\",\"dstVolumeSize\":\"37660000000\",\"srcIndexSize\":0,\"size\":\"0\",\"srcIndexAmount\":0}", "group" : "db_disk_size" }, { "item" : "checkIncreSrcDbExistedInDstDb", "result" : "PASSED", "group" : "db_params" }, { "item" : "dbCharacterSetConsistency", "result" : "PASSED", "group" : "db_params" }, { "item" : "dbClockConsistency", "result" : "PASSED", "group" : "db_params" }, { "item" : "dbCollationServerConsistency", "result" : "PASSED", "group" : "db_params" }, { "item" : "dbIsolationLevelConsistency", "result" : "PASSED", "group" : "db_params" }, { "item" : "dbParamConsistency", "result" : "PASSED", "group" : "db_params" }, { "item" : "dbServerUuidConsistency", "result" : "PASSED", "group" : "db_params" }, { "item" : "dstMaxAllowedPacketCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "hasForeignKeyOnUnselectedTable", "result" : "PASSED", "group" : "db_params" }, { "item" : "innodbStrictModeConsistency", "result" : "PASSED", "group" : "db_params" }, { "item" : "isUserRequireSslLink", "result" : "PASSED", "group" : "db_params" }, { "item" : "sqlModeConsistency", "result" : "PASSED", "group" : "db_params" }, { "item" : "sqlModeNoEngine", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcBinlogFormatCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcBinlogRowImageCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcDbBinlogExpireLogsDays", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcDbBinlogIsOff", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcDbExistUnsupportEngineTable", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcDbIndexKeyLength", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcDbNameContainsUnsupportedSymbols", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcDbServerIdCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcDstTableNameCaseSensitiveCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcHasNoPkTableWhenTgtHasInvisiblePk", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcRoutinesWithoutPrivilegeCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcTableNameContainsNonAscii", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcTriggerAndEventCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcViewNameContainsNonAscii", "result" : "PASSED", "group" : "db_params" }, { "item" : "srclogSlaveUpdatesCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "userRequirementIsEnoughForDefiner", "result" : "PASSED", "group" : "db_params" }, { "item" : "userSelectObjectsCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "dstStatusCheck", "result" : "PASSED", "data" : "", "group" : "db_target_status", "failed_reason" : "" }, { "item" : "dstDbPrivilegesIsEnough", "result" : "PASSED", "group" : "db_user_privilege" }, { "item" : "srcDbPrivilegesIsEnoughForIncre", "result" : "PASSED", "group" : "db_user_privilege" }, { "item" : "dbVersionMeetRequirement", "result" : "PASSED", "group" : "db_version" }, { "item" : "dstDbVersionSupport", "result" : "PASSED", "group" : "db_version" }, { "item" : "srcDbVersionSupport", "result" : "PASSED", "group" : "db_version" }, { "item" : "dstDbConnection", "result" : "PASSED", "group" : "network" }, { "item" : "srcDbConnection", "result" : "PASSED", "group" : "network" } ] } ] }
- 实时迁移DDS查询预检查结果响应示例 :
{ "count" : 1, "results" : [ { "result" : true, "process" : "100%", "precheck_id" : "a281f62f-4631-45d6-a2d3-679a9f4jb105", "total_passed_rate" : "100%", "rds_instance_id" : "3cadd5a0ef724f55ac7fa5bcb5f4fc5fin02", "job_direction" : "up", "precheck_result" : [ { "item" : "dstDbDiskSize", "result" : "PASSED", "data" : "{'size': '5263360', 'dstVolumeSize':'19089431762', 'diskSizeTimes':'1.5'}", "group" : "db_disk_size" }, { "item" : "srcAndDstCappedCollConsistency", "result" : "PASSED", "group" : "db_object_conflict_check" }, { "item" : "srcCollAlreadyExistedInDstColl", "result" : "PASSED", "group" : "db_object_conflict_check" }, { "item" : "srcViewAlreadyExistedInDstView", "result" : "PASSED", "group" : "db_object_conflict_check" }, { "item" : "rolesDependentCheck", "result" : "PASSED", "group" : "db_object_dependency_check" }, { "item" : "usersDependentCheck", "result" : "PASSED", "group" : "db_object_dependency_check" }, { "item" : "srcCollHasTtlIndex", "result" : "ALARM", "data" : "{\"srcHasTtlIndexColls\":\"fastunit.ttlsuoyin\"}", "group" : "db_params", "failed_reason" : "SRC_HAS_TTL_INDEXES" }, { "item" : "dbSslConsistency", "result" : "PASSED", "group" : "db_params" }, { "item" : "dstChunkNumCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "mongoTypeFitTransferMode", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcCollIndexNumCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcCollNameContainsUnsupportedSymbols", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcDbInstanceIsEmpty", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcDbNameContainsUnsupportedSymbols", "result" : "PASSED", "group" : "db_params" }, { "item" : "srcIdIndexCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "userSelectObjectsCheck", "result" : "PASSED", "group" : "db_params" }, { "item" : "dstStatusCheck", "result" : "PASSED", "data" : "", "group" : "db_target_status", "failed_reason" : "" }, { "item" : "dstDbPrivilegesIsEnough", "result" : "PASSED", "group" : "db_user_privilege" }, { "item" : "srcDbPrivilegesIsEnough", "result" : "PASSED", "group" : "db_user_privilege" }, { "item" : "dbVersionMeetRequirement", "result" : "PASSED", "group" : "db_version" }, { "item" : "dstDbVersionSupport", "result" : "PASSED", "group" : "db_version" }, { "item" : "srcDbVersionSupport", "result" : "PASSED", "group" : "db_version" }, { "item" : "dstDbConnection", "result" : "PASSED", "group" : "network" }, { "item" : "srcDbConnection", "result" : "PASSED", "group" : "network" }, { "item" : "srcShardKeyConfiguration", "result" : "ALARM", "data" : "{\"notConfigShardIndexColls\":\"ycsb.usertable,mgo.mycollection7,mgo.mycollection9,mgo.mycollection5,mgo.mycollection4,mgo.mycollection3,mgo.mycollection,mgo.mycollection8,mgo.mycollection2,mgo.mycollection6,testdb3.testuk,testdb3.coll2,testdb3.coll6,testdb3.coll1,testdb3.Coll1,testdb3.testuk2,testdb3.coll5,testdb3.coll4,testdb1.coll6,testdb1.coll1,testdb1.testuk2,testdb1.coll2,testdb1.testuk,testdb1.coll5,testdb1.coll4,testdb1.Coll1,Testdb5.coll1,Testdb5.collx,Testdb5.Coll1,fastunit.gudingjihe,fastunit.geohaystack,fastunit.coll,fastunit.weiyisuoyin,fastunit.testSpecial\\\\u4E2D\\\\u6587~!@#%^&*()_+=-[]{};:?,`,fastunit.log,fastunit.twoD,fastunit.lianhesuoyin,fastunit.xishusuoyin,fastunit.quanwensuoyin,fastunit.ttlsuoyin,fastunit.putongsuoyin,fastunit.collcount,fastunit.shuzusuoyin,fastunit.twodsphere,fastunit.qiantaowendangsuoyin,fastunit.indexpartial\"}", "group" : "src_info_check", "failed_reason" : "SRC_INSTANCE_TYPE_IS_REPLICA_SET" }, { "item" : "checkBalanceStatus", "result" : "PASSED", "group" : "src_info_check" }, { "item" : "srcMongoInstanceType", "result" : "PASSED", "group" : "src_info_check" } ] } ] }
状态码
状态码 |
描述 |
---|---|
200 |
OK |
400 |
Bad Request |
错误码
请参见错误码。