buffersJob


URI

<buffers_uri>/{jobID}[.<format>]

支持的方法

GETHEAD

父资源

buffers

介绍

buffersJob  资源表示一个缓冲区分析作业。通过对 buffersJob 资源执行 GET 请求,可以获取一个缓冲区分析作业详细配置信息,可通过 ID 号({jobID}) 来获取。

支持的方法:

支持的表述格式:RJSON、JSON、HTML、XML。

资源层次

HTTP 请求方法

对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明,其中,supermapiserver 是服务器名。

http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/buffers/{jobID}.rjson

GET 请求

获取一个缓冲区分析作业详细配置信息。

响应结构

对 buffersJob 资源执行 GET 请求,返回操作结果的结构如下:  

字段 类型 说明
id String 应用ID。
state SparkJobState 任务状态。包括执行状态、起止时间、耗时等。
setting SparkJobSetting 列举当前缓冲区分析任务的详细信息。

响应示例

对 buffersJob 资源执行 GET 请求:http://supermapiserver:8090/iserver/services/distributedanalyst/rest/v1/jobs/spatialanalyst/buffers/9931e83c_0ec5_44d5_b2d1_55ac2be50ec0.rjson ,则返回的rjson表述结果如下:

{

    "id": "9931e83c_0ec5_44d5_b2d1_55ac2be50ec0",

    "setting": {

        "DEFAULT_MASTER_ADRESS": "local[*] ",

        "analyst": {

            "bounds": "-74.050,40.650,-73.850,40.850",

            "dissolveField": "LocationID",

            "distance": "",

            "distanceField": "",

            "distanceUnit": "Meter"

        },

        "appName": "CreateBuffers",

        "args": [

            "--input",

            "{\"sliceNum\":20,\"type\":\"udb\",\"info\":[{\"server\":\"F:\\\\1.package\\\\20171014\\\\supermap_iserver_901_15413_4668_win64_zip\\\\samples\\\\data\\\\ProcessingData\\\\processing.udb\",\"datasetNames\":[\"newyorkZone_R\"]}]}",

            "--distanceUnit",

            "Meter",

            "--bounds",

            "-74.050,40.650,-73.850,40.850",

            "--dissolveField",

            "LocationID",

            "--output",

            "{\"server\":\"192.168.120.21\",\"password\":\"supermap\",\"database\":\"supermap2\",\"datasetName\":\"analystResult_1747644361\",\"blockingWrite\":null,\"type\":\"pg\",\"user\":\"postgres\"}"

        ],

        "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.CreateBuffersMain",

        "output": {

            "datasetName": "analystResult_1747644361",

            "datasourceInfo": {

                "alias": "supermap2_pg",

                "connect": true,

                "dataBase": "supermap2",

                "driver": "PostgreSQL ANSI",

                "engineType": "POSTGRESQL",

                "exclusive": false,

                "openLinkTable": false,

                "password": "supermap",

                "readOnly": false,

                "server": "192.168.120.21",

                "user": "postgres"

            },

            "outputPath": "F:\\1.package\\20171014\\supermap_iserver_901_15413_4668_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\9931e83c_0ec5_44d5_b2d1_55ac2be50ec0\\buffers.smwu",

            "type": "pg"

        },

        "serviceInfo": {

            "targetDataPath": "F:\\1.package\\20171014\\supermap_iserver_901_15413_4668_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\9931e83c_0ec5_44d5_b2d1_55ac2be50ec0\\buffers.smwu",

            "targetServiceInfos": [

                {

                    "serviceAddress": "http://supermapiserver:8090/iserver/services/data-buffers10/rest",

                    "serviceType": "RESTDATA"

                },

                {

                    "serviceAddress": "http://supermapiserver:8090/iserver/services/map-buffers10/rest",

                    "serviceType": "RESTMAP"

                }

            ]

        },

        "serviceRoot": "http://supermapiserver:8090/iserver/services/",

        "sparkLogFile": null

    },

    "state": {

        "elapsedTime": 10427,

        "endState": true,

        "endTime": 1508222314470,

        "errorMsg": null,

        "errorStackTrace": null,

        "publisherelapsedTime": 3884,

        "runState": "FINISHED",

        "startTime": 1508222300005

    }

}

 

HEAD 请求

返回跟 GET 请求一样的 HTTP 响应头,但是没有响应实体。可以在不必传输整个响应内容的情况下,获取包含在响应消息头中的元数据信息。元数据信息包括媒体类型,字符编码,压缩编码,实体内容长度等。

HEAD 请求可以用来判断 buffersJob 资源是否存在,或者客户端是否有权限访问 buffersJob 资源。通过对加.<format>的 URI 执行 HEAD 请求,还可以快速判断 buffersJob 资源是否支持<format>格式的表述。

请参见