<overlay_uri>/{jobID}[.<format>]
overlayJob 资源表示一个叠加分析作业。通过对overlayJob 资源执行 GET 请求,可以获取一个叠加分析作业详细配置信息,可通过 ID 号({jobID}) 来获取。
支持的方法:
支持的表述格式:RJSON、JSON、HTML、XML。
对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明,其中,supermapiserver 是服务器名。
http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/overlay/{jobID}.rjson
获取一个叠加分析作业详细配置信息。
对 overlayJob 资源执行 GET 请求,返回操作结果的结构如下:
字段 | 类型 | 说明 |
id | String | 应用ID。 |
state | SparkJobState | 任务状态。包括执行状态、起止时间、耗时等。 |
setting | SparkJobSetting | 列举当前叠加分析任务的详细信息。 |
对overlayJob 资源执行 GET 请求:http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/overlay/0c7f8574_2865_46f4_836b_b014af7747fb.rjson ,则返回的rjson表述结果如下:
{
"id": "0c7f8574_2865_46f4_836b_b014af7747fb",
"setting": {
"DEFAULT_MASTER_ADRESS": "local[*] ",
"analyst": {
"attributeFilter": null,
"datasetOverlay": "samples_processing_newyorkZone_R",
"inputOverlay": "{\"type\":\"udb\",\"info\":[{\"server\":\"F:\\\\1.package\\\\20171010\\\\supermap_iserver_901_15410_4661_win64_zip\\\\samples\\\\data\\\\ProcessingData\\\\processing.udb\",\"datasetNames\":[\"newyorkZone_R\"]}]}",
"mode": "clip",
"overlayFields": null,
"srcFields": null
},
"appName": "overlayAnalyst",
"args": [
"--inputSource",
"{\"sliceNum\":20,\"type\":\"udb\",\"info\":[{\"server\":\"F:\\\\1.package\\\\20171010\\\\supermap_iserver_901_15410_4661_win64_zip\\\\samples\\\\data\\\\ProcessingData\\\\processing.udb\",\"datasetNames\":[\"newyorkZone_R\"]}]}",
"--inputOverlay",
"{\"type\":\"udb\",\"info\":[{\"server\":\"F:\\\\1.package\\\\20171010\\\\supermap_iserver_901_15410_4661_win64_zip\\\\samples\\\\data\\\\ProcessingData\\\\processing.udb\",\"datasetNames\":[\"newyorkZone_R\"]}]}",
"--mode",
"clip",
"--output",
"{\"server\":\"F:\\\\1.package\\\\20171010\\\\supermap_iserver_901_15410_4661_win64_zip\\\\webapps\\\\iserver\\\\processingResultData\\\\Analyst\\\\udbs\\\\18b2df44_1ba0_4a3d_9a5f_49f441f9a8bf\",\"datasetName\":\"analystResult\",\"blockingWrite\":\"true\",\"type\":\"udb\"}"
],
"contextSetting": null,
"input": {
"datasetInfo": {
"available": true,
"bounds": "Left=-74.25551784310493,Bottom=40.496084221255856,Right=-73.70014827248451,Top=40.91538866049913",
"datasetName": "newyorkZone_R",
"datasetType": "REGION",
"epsgCode": 4326,
"name": "samples_processing_newyorkZone_R",
"readOnly": false,
"type": "UDB",
"url": "../../samples/data/ProcessingData/processing.udb"
},
"datasetName": "samples_processing_newyorkZone_R",
"numSlices": 0
},
"mainClass": "com.supermap.bdt.main.OverlayAnalystMain",
"output": {
"datasetName": "analystResult",
"datasourcePath": "F:\\1.package\\20171010\\supermap_iserver_901_15410_4661_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\0c7f8574_2865_46f4_836b_b014af7747fb\\18b2df44_1ba0_4a3d_9a5f_49f441f9a8bf.udb",
"outputPath": "F:\\1.package\\20171010\\supermap_iserver_901_15410_4661_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\0c7f8574_2865_46f4_836b_b014af7747fb\\overlayAnalystGeo.smwu",
"type": "udb"
},
"serviceInfo": {
"targetDataPath": "F:\\1.package\\20171010\\supermap_iserver_901_15410_4661_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\0c7f8574_2865_46f4_836b_b014af7747fb\\overlayAnalystGeo.smwu",
"targetServiceInfos": [
{
"serviceAddress": "http://localhost:8090/iserver/services/map-overlayAnalystGeo/rest",
"serviceType": "RESTMAP"
},
{
"serviceAddress": "http://localhost:8090/iserver/services/data-overlayAnalystGeo/rest",
"serviceType": "RESTDATA"
}
]
},
"serviceRoot": "http://localhost:8090/iserver/services/",
"sparkLogFile": null
},
"state": {
"elapsedTime": 12163,
"endState": true,
"endTime": 1507626494661,
"errorMsg": null,
"errorStackTrace": null,
"publisherelapsedTime": 2481,
"runState": "FINISHED",
"startTime": 1507626474881
}
}
}
返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。
HEAD 请求可以用来判断 overlayJob 资源是否存在,或者客户端是否有权限访问 overlayJob 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 overlayJob 资源是否支持<format>格式的表述。