tileJob


URI

<tileJobs_uri>/{jobid}[.<format>]

支持的方法

GETPUTDELETEHEAD

父资源

tileJobs

子资源

blankRegions

介绍

返回指定切图任务的状态和信息。

支持的方法:

支持的表述格式:(rjson、json、html、xml)。

资源层次

HTTP 请求方法

对如下 URI 执行 HTTP 请求,以 rjson 输出格式为例加以说明,其中,supermapiserver 是服务器名,"c9575f3c-c417-4ef9-a4da-9b0aa2c68d32"是切图任务 ID。

http://supermapiserver:8090/iserver/manager/tileservice/jobs/c9575f3c-c417-4ef9-a4da-9b0aa2c68d32.rjson

GET 请求

获取指定切图任务的状态和信息。

响应结构

返回切图任务的状态和信息,主要字段有:

字段 类型 说明
id String 切图任务 ID。
state JobState 切图任务当前的工作状态。
info JobInfo 切图任务的基本信息。

响应示例

对通过tileJobsPOST 请求创建的切图任务,即 http://localhost:8090/iserver/manager/tileservice/jobs/c9575f3c-c417-4ef9-a4da-9b0aa2c68d32.rjson,执行 GET 请求,则返回的 rjson 格式的响应结果如下:

{

    "id": "c9575f3c-c417-4ef9-a4da-9b0aa2c68d32",

    "info": {

        "actualTileVersion": "119df1b3-03f8-46de-b194-4f4e0473c9d8",

        "cacheBounds": {

            "bottom": -2.003750834278914E7,

            "left": -2.0037508342789244E7,

            "leftBottom": {

                "x": -2.0037508342789244E7,

                "y": -2.003750834278914E7

            },

            "right": 2.0037508342789244E7,

            "rightTop": {

                "x": 2.0037508342789244E7,

                "y": 2.0037508342789095E7

            },

            "top": 2.0037508342789095E7

        },

        "createNewTileVersion": false,

        "dataConnectionString": "../../samples/data/China400/China400.smwu",

        "epsgCode": -1,

        "format": "PNG",

        "mapName": "China",

        "originalPoint": {

            "x": -2.0037508342789244E7,

            "y": 2.0037508342789095E7

        },

        "parentTileVersion": null,

        "refMapRestAdress": "http://localhost:8090/iserver/services/map-china400/rest/maps/China",

        "resolutions": [317.49999999999994],

        "scaleDenominators": [1200000],

        "storageID": "aa",

        "storeConfig": {

            "fdfsTrackers": ["192.168.122.44:22122"],

            "fdhtGroups": [

                ["192.168.122.44:11411"]

            ],

            "type": "FastDFS"

        },

        "tileSize": "SIZE_256",

        "transparent": false

    },

    "state": {

        "analystBlankPercentage": 0,

        "buildingScale": {

            "completed": 16680,

            "completedBytes": 0,

            "completedRegion": null,

            "failedRegion": null,

            "matrixes": [{

                "columnCount": 494,

                "rowCount": 494,

                "startingIndex": {

                    "columnIndex": 0,

                    "rowIndex": 0

                }

            }],

            "nextIndex": {

                "columnIndex": 360,

                "rowIndex": 20

            },

            "scaleDenominator": 1200000,

            "total": 244036,

            "totalMatrix": null,

            "workerBuildingInfos": [{

                "completed": 16680,

                "id": "39df3c13-e6bc-49de-89e2-13e0e1978d8c",

                "ip": "192.168.120.40",

                "lastTileRegion": null,

                "name": "worker1",

                "port": 8090

            }]

        },

        "completed": 16680,

        "completedBytes": 9622888,

        "completedScale": [],

        "deployedWorkerId": ["39df3c13-e6bc-49de-89e2-13e0e1978d8c"],

        "elapsedTime": 222260,

        "masterAddress": "http://localhost:8090/iserver/services/tilemaster",

        "remainTime": 3016279,

        "runState": "BUILDING",

        "scaleConfigs": [{

            "cacheRegions": [],

            "excludeRegions": [],

            "scaleDenominator": 1200000,

            "tileBoundsHeight": "81279.99999999999",

            "tileBoundsWidth": "81279.99999999999"

        }],

        "scaleInfos": [{

            "completed": 16680,

            "completedBytes": 9622888,

            "completedRegion": null,

            "failedRegion": null,

            "matrixes": [{

                "columnCount": 494,

                "rowCount": 494,

                "startingIndex": {

                    "columnIndex": 0,

                    "rowIndex": 0

                }

            }],

            "scaleDenominator": 1200000,

            "total": 244036,

            "totalMatrix": null,

            "workerBuildingInfos": [{

                "completed": 16680,

                "id": "39df3c13-e6bc-49de-89e2-13e0e1978d8c",

                "ip": "192.168.120.40",

                "lastTileRegion": null,

                "name": "worker1",

                "port": 8090

            }]

        }],

        "speedPerSecond": 75,

        "tasks": [{

            "deployTime": 0,

            "id": "eefe2a43-4e2c-48b0-b9a8-03315658cde2",

            "isRetile": false,

            "jobId": "c9575f3c-c417-4ef9-a4da-9b0aa2c68d32",

            "masterAddress": "http://localhost:8090/iserver/services/tilemaster",

            "scaleConfig": {

                "cacheRegions": [],

                "excludeRegions": [],

                "scaleDenominator": 1200000,

                "tileBoundsHeight": "81279.99999999999",

                "tileBoundsWidth": "81279.99999999999"

            },

            "state": {

                "completed": 0,

                "lastIndex": null,

                "runState": null,

                "workerId": null

            },

            "tileMatrixToBuild": {

                "columnCount": 20,

                "rowCount": 20,

                "startingIndex": {

                    "columnIndex": 340,

                    "rowIndex": 20

                }

            },

            "totalTileCount": 400

        }],

        "tasksToRetry": [],

        "tileMatrixEdgeCount": 20,

        "total": 244036

    }

}

PUT 请求

更新切图任务的运行状态。即启动/暂停切图任务。

请求参数

请求体中传递参数如下所示:

字段 类型 说明
STOPPED BuildState 切图任务的状态信息,暂停指定的切图任务。

 

响应结构

对 tileJob 资源执行 PUT 请求,返回的操作结果表述的结构如下(表述在响应消息的实体主体里):

字段 类型 说明
succeed boolean 更新指定的切图任务对应的状态信息是否成功。

 

示例

当对  tileJob 资源:http://localhost:8090/iserver/manager/tileservice/jobs/c9575f3c-c417-4ef9-a4da-9b0aa2c68d32.rjson 执行 put 请求时,暂停当前的切图任务,这时传入以下参数:

STOPPED

则返回 rjson 格式的操作结果表述如下:

{"succeed": true}

DELETE 请求

删除当前指定的切图任务。

响应结构

对  tileJob 资源执行 DELETE 请求,返回的操作结果表述的结构如下(表述在响应消息的实体主体里):

字段 类型 说明
succeed boolean 删除当前的切图任务是否成功。

 

响应示例

 对 tileJob 资源:http://localhost:8090/iserver/manager/tileservice/jobs/c9575f3c-c417-4ef9-a4da-9b0aa2c68d32.rjson 执行 DELETE 请求,删除当前指定的切图任务,则返回 rjson 格式的响应结果如下:

{"succeed": true}

HEAD 请求

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

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

请参见