<grid_uri>/{jobID}[.<format>]
gridJob 资源表示一个已创建的格网索引作业。通过对gridJob 资源执行 GET 请求,可以获取一个已创建的格网索引详细配置信息,可通过 ID 号({jobID}) 来获取。。
支持的方法:
支持的表述格式:RJSON、JSON、HTML、XML。
对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明,其中,supermapiserver 是服务器名。
http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/dataprocessing/buildindex/grid/{jobID}.rjson
获取一个已创建的格网索引作业详细配置信息。
对 gridJob 资源执行 GET 请求,返回操作结果的结构如下:
字段 | 类型 | 说明 |
id | String | 应用ID。 |
state | SparkJobState | 任务状态。包括执行状态、起止时间、耗时等。 |
setting | SparkJobSetting | 列举当前格网索引作业任务的详细信息。 |
对 gridJob 资源执行 GET 请求:http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/dataprocessing/buildindex/grid/0799bf7b_6010_4c12_bbf3_647152d53e7b.rjson ,则返回的rjson表述结果如下::
{
"id": "0799bf7b_6010_4c12_bbf3_647152d53e7b",
"state": {
"errorStackTrace": null,
"endState": true,
"startTime": 1513752362556,
"endTime": 1513752367339,
"publisherelapsedTime": 0,
"runState": "FINISHED",
"errorMsg": null,
"elapsedTime": 220
},
"setting": {
"output": {
"outputPath": null,
"datasourcePath": "hdfs://192.168.112.126:9000/data/test",
"datasetName": "analystResult",
"type": "INDEXEDHDFS"
},
"args": null,
"input": {
"datasetName": "samples_processing_newyorkZone_R",
"numSlices": 36,
"specField": null,
"datasetInfo": {
"fieldInfos": [
{
"isRequired": true,
"defaultValue": "",
"name": "SmID",
"caption": "SmID",
"type": "INT32",
"maxLength": 4,
"isZeroLengthAllowed": true,
"isSystemField": true
},
{
"isRequired": true,
"defaultValue": "0",
"name": "SmSdriW",
"caption": "SmSdriW",
"type": "SINGLE",
"maxLength": 4,
"isZeroLengthAllowed": true,
"isSystemField": true
},
{
"isRequired": true,
"defaultValue": "0",
"name": "SmSdriN",
"caption": "SmSdriN",
"type": "SINGLE",
"maxLength": 4,
"isZeroLengthAllowed": true,
"isSystemField": true
},
{
"isRequired": true,
"defaultValue": "0",
"name": "SmSdriE",
"caption": "SmSdriE",
"type": "SINGLE",
"maxLength": 4,
"isZeroLengthAllowed": true,
"isSystemField": true
},
{
"isRequired": true,
"defaultValue": "0",
"name": "SmSdriS",
"caption": "SmSdriS",
"type": "SINGLE",
"maxLength": 4,
"isZeroLengthAllowed": true,
"isSystemField": true
},
{
"isRequired": true,
"defaultValue": "0",
"name": "SmUserID",
"caption": "SmUserID",
"type": "INT32",
"maxLength": 4,
"isZeroLengthAllowed": true,
"isSystemField": false
},
{
"isRequired": true,
"defaultValue": "0",
"name": "SmArea",
"caption": "SmArea",
"type": "DOUBLE",
"maxLength": 8,
"isZeroLengthAllowed": true,
"isSystemField": true
},
{
"isRequired": true,
"defaultValue": "0",
"name": "SmPerimeter",
"caption": "SmPerimeter",
"type": "DOUBLE",
"maxLength": 8,
"isZeroLengthAllowed": true,
"isSystemField": true
},
{
"isRequired": false,
"defaultValue": "0",
"name": "SmGeometrySize",
"caption": "SmGeometrySize",
"type": "INT32",
"maxLength": 4,
"isZeroLengthAllowed": true,
"isSystemField": true
},
{
"isRequired": true,
"defaultValue": "-1",
"name": "SmGeoPosition",
"caption": "SmGeoPosition",
"type": "INT64",
"maxLength": 8,
"isZeroLengthAllowed": true,
"isSystemField": true
},
{
"isRequired": false,
"defaultValue": "",
"name": "OBJECTID",
"caption": "OBJECTID",
"type": "INT32",
"maxLength": 4,
"isZeroLengthAllowed": true,
"isSystemField": false
},
{
"isRequired": false,
"defaultValue": "",
"name": "Shape_Leng",
"caption": "Shape_Leng",
"type": "DOUBLE",
"maxLength": 8,
"isZeroLengthAllowed": true,
"isSystemField": false
},
{
"isRequired": false,
"defaultValue": "",
"name": "Shape_Area",
"caption": "Shape_Area",
"type": "DOUBLE",
"maxLength": 8,
"isZeroLengthAllowed": true,
"isSystemField": false
},
{
"isRequired": false,
"defaultValue": "",
"name": "zone",
"caption": "zone",
"type": "WTEXT",
"maxLength": 254,
"isZeroLengthAllowed": true,
"isSystemField": false
},
{
"isRequired": false,
"defaultValue": "",
"name": "LocationID",
"caption": "LocationID",
"type": "INT32",
"maxLength": 4,
"isZeroLengthAllowed": true,
"isSystemField": false
},
{
"isRequired": false,
"defaultValue": "",
"name": "borough",
"caption": "borough",
"type": "WTEXT",
"maxLength": 254,
"isZeroLengthAllowed": true,
"isSystemField": false
}
],
"epsgCode": 4326,
"datasetName": "newyorkZone_R",
"bounds": "Left=-74.25551784310493,Bottom=40.496084221255856,Right=-73.70014827248451,Top=40.91538866049913",
"available": true,
"name": "samples_processing_newyorkZone_R",
"readOnly": false,
"datasetType": "REGION",
"type": "UDB",
"url": "../../samples/data/ProcessingData/processing.udb"
}
},
"DEFAULT_MASTER_ADRESS": "local[*] ",
"referToken": "dZWm9aJqJbEYKkVEZyc8qKPdVK0oVIh9p-UzDxZTEFUH_o9rEPcqAKl7s-tfkS4euGyUAm6jUbA5S1JWpaeuiQ..",
"mainClass": null,
"sparkLogFile": null,
"appName": null,
"analyst": {
"bounds": "-74.050,40.650,-73.850,40.850",
"indexFile": "hdfs://192.168.112.126:9000/data/test123",
"interval": "",
"isSer": true,
"rows": "",
"cols": ""
},
"contextSetting": null,
"serviceInfo": {
"targetDataPath": null,
"targetServiceInfos": null
},
"referServicesAddress": "http://192.168.120.47:8090/iserver"
}
}
返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。
HEAD 请求可以用来判断 gridJob 资源是否存在,或者客户端是否有权限访问 gridJob 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 gridJob 资源是否支持<format>格式的表述。