summaryAttributesJob


URI

<summaryAttributes_uri>/{JobID}[.<format>]

支持的方法

GETHEAD

父资源

summaryAttributes

介绍

summaryAttributesJob 资源表示一个属性汇总统计分析作业。通过对 summaryAttributesJob 资源执行 GET 请求,可以获取一个属性汇总统计分析作业详细配置信息,可通过 ID 号({jobID}) 来获取。

支持的方法:

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

资源层次

HTTP 请求方法

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

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

GET 请求

获取一个属性汇总统计分析作业详细配置信息。

响应结构

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

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

响应示例

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

{

    "id": "d2146eb4_69b8_402b_bd90_268543087d7f",

    "setting": {

        "DEFAULT_MASTER_ADRESS": "local[*] ",

        "analyst": {

            "attributeField": "",

            "groupField": "",

            "resultField": null,

            "statisticModes": ""

        },

        "appName": "SummaryAttributes",

        "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\"]}]}",

            "--output",

            "{\"server\":\"192.168.120.21\",\"password\":\"supermap\",\"database\":\"supermap2\",\"datasetName\":\"analystResult_1302299475\",\"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.SummaryAttributesMain",

        "output": {

            "datasetName": "analystResult_1302299475",

            "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\\d2146eb4_69b8_402b_bd90_268543087d7f\\summaryAttributes.smwu",

            "type": "pg"

        },

        "serviceInfo": {

            "targetDataPath": "F:\\1.package\\20171014\\supermap_iserver_901_15413_4668_win64_zip\\webapps\\iserver\\processingResultData\\Analyst\\d2146eb4_69b8_402b_bd90_268543087d7f\\summaryAttributes.smwu",

            "targetServiceInfos": [

                {

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

                    "serviceType": "RESTDATA"

                }

            ]

        },

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

        "sparkLogFile": null

    },

    "state": {

        "elapsedTime": 12189,

        "endState": true,

        "endTime": 1508228890036,

        "errorMsg": null,

        "errorStackTrace": null,

        "publisherelapsedTime": 2429,

        "runState": "FINISHED",

        "startTime": 1508228872083

    }

}

HEAD 请求

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

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

请参见