<topologyValidator_uri>/{jobID}[.<format>]
topologyValidatorJob 资源表示一个拓扑检查作业。通过对 topologyValidatorJob 资源执行 GET 请求,可以获取一个拓扑检查作业详细配置信息,可通过 ID 号({jobID}) 来获取。
支持的方法:
支持的表述格式:RJSON、JSON、HTML、XML。
对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明,其中,supermapiserver 是服务器名。
http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/topologyvalidator/{jobID}.rjson
获取一个拓扑检查作业详细配置信息。
对 topologyValidatorJob 资源执行 GET 请求,返回操作结果的结构如下:
字段 | 类型 | 说明 |
id | String | 应用ID。 |
state | SparkJobState | 任务状态。包括执行状态、起止时间、耗时等。 |
setting | SparkJobSetting | 列举当前拓扑检查任务的详细信息。 |
对 topologyValidatorJob 资源执行 GET 请求:http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/topologyvalidator/64e3f1e9_8e4f_42b5_9f98_af204be77880.rjson ,则返回的rjson表述结果如下:
{
"id": "64e3f1e9_8e4f_42b5_9f98_af204be77880",
"setting": {
"DEFAULT_MASTER_ADRESS": "local[*] ",
"analyst": {
"datasetTopology": "smtiles_Jingjin_New_Region_1",
"inputValidating": "{\"type\":\"udb\",\"info\":[{\"server\":\"F:\\\\4.datastore\\\\Data\\\\data\\\\City - 副本 - 副本\\\\Jingjin.udb\",\"datasetNames\":[\"New_Region_1\"]}]}",
"rule": "RegionContainedByRegion",
"tolerance": ""
},
"appName": "topologyValidator",
"args": [
"--inputSource",
"{\"sliceNum\":20,\"type\":\"udb\",\"info\":[{\"server\":\"F:\\\\4.datastore\\\\Data\\\\data\\\\City - 副本 - 副本\\\\Jingjin.udb\",\"datasetNames\":[\"New_Region\"]}]}",
"--inputValidating",
"{\"type\":\"udb\",\"info\":[{\"server\":\"F:\\\\4.datastore\\\\Data\\\\data\\\\City - 副本 - 副本\\\\Jingjin.udb\",\"datasetNames\":[\"New_Region_1\"]}]}",
"--rule",
"RegionContainedByRegion",
"--output",
"{\"server\":\"192.168.120.21\",\"password\":\"supermap\",\"database\":\"supermap1\",\"datasetName\":\"analystResult_1597348849\",\"blockingWrite\":null,\"type\":\"pg\",\"user\":\"postgres\"}"
],
"contextSetting": null,
"input": {
"datasetInfo": {
"available": true,
"bounds": "Left=-97.1879129784341,Bottom=38.379098407748195,Right=749.938641932885,Top=433.65169599572",
"datasetName": "New_Region",
"datasetType": "REGION",
"epsgCode": -1000,
"name": "smtiles_Jingjin_New_Region",
"readOnly": false,
"type": "UDB",
"url": "F:\\4.datastore\\Data\\data\\City - 副本 - 副本\\Jingjin.udb"
},
"datasetName": "smtiles_Jingjin_New_Region",
"numSlices": 0,
"specField": null
},
"mainClass": "com.supermap.bdt.main.TopologyValidatorMain",
"output": {
"datasetName": "analystResult_1597348849",
"datasourceInfo": {
"alias": "supermap1_pg",
"connect": true,
"dataBase": "supermap1",
"driver": "PostgreSQL ANSI",
"engineType": "POSTGRESQL",
"exclusive": false,
"openLinkTable": false,
"password": "supermap",
"readOnly": false,
"server": "192.168.120.21",
"user": "postgres"
},
"outputPath": "F:\\1.package\\20171021\\supermap_iserver_901_15420_4680_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\64e3f1e9_8e4f_42b5_9f98_af204be77880\\topology.smwu",
"type": "pg"
},
"serviceInfo": {
"targetDataPath": "F:\\1.package\\20171021\\supermap_iserver_901_15420_4680_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\64e3f1e9_8e4f_42b5_9f98_af204be77880\\topology.smwu",
"targetServiceInfos": [
{
"serviceAddress": "http://supermapiserver:8090/iserver/services/map-topology22/rest",
"serviceType": "RESTMAP"
},
{
"serviceAddress": "http://supermapiserver:8090/iserver/services/data-topology22/rest",
"serviceType": "RESTDATA"
}
]
},
"serviceRoot": "http://supermapiserver:8090/iserver/services/",
"sparkLogFile": null
},
"state": {
"elapsedTime": 12651,
"endState": true,
"endTime": 1508833694778,
"errorMsg": null,
"errorStackTrace": null,
"publisherelapsedTime": 8446,
"runState": "FINISHED",
"startTime": 1508833669915
}
}
返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。
HEAD 请求可以用来判断 topologyValidatorJob 资源是否存在,或者客户端是否有权限访问 topologyValidatorJob 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 topologyValidatorJob 资源是否支持<format>格式的表述。