Using distributed analysis service by iServer REST API
|
Feedback
|
iServer distributed analysis service currently provides spatial analysis jobs and data processing jobs and all the features offer REST API. Users can send POST request to create jobs. Administrators can log in to iServer Manager to create jobs by accessing processingJobs resource page. Below shows how to create spatial analysis jobs by using these two ways.
Note: Only the user with ADMIN role can create the task by default. If users with other roles want to use this service, see: Security settings for distributed analysis service.
-
Create spatial processing tasks on REST API resource page
Steps:
- Start distributed analysis service, enter iServer services resource page: http://supermapiserver:8090/iserver/services.
- Enter "distributedanalyst/rest", click “jobs">"spatialanalyst", enter into the desired spatial analysis resource page, such as aggregatePoints.
- Click Create the analysis job in the upper right corner.
- Fill in the spatial analysis task configuration. "*" means it's required.
- When finishing, click Create the analysis job, the page will automatically jump to the task being executed which also shows the configuration information. After the execution is completed, the published service address for the analysis result will be displayed.
For detailed REST API, see: processingJobs.
The input and output for creating spatial processing jobs through REST API requests supports multiple formats:
input: [The parameters below are required if no special description] supports two input ways:
- datasetName: dataset name, including data imported through Data Catalog Service, registered data in iServer and datasets stored in iServer DataStore.
- Input dataset infos, used when inputting dataset file path and related infos. Supports the following file formats:
- csv file: When input csv datasource, you need specify the file path where the matching .meta file for the csv file must exist.
- filePath: csv file path. Such as"filePath: "E:\iserver\\ProcessingData\\newyork_taxi_2013-01_14k.csv"
- udb file:
- datasetInfo: dataset information, including:
-
- type: specify to UDB
- url: udb file path. Such as: E:\\ProcessingData\\processing.udb
- datasetType: dataset type. Specify to POINT
- datasetName: name of the dataset to be analyzed
- bounds: used to set the extent to be analyzed, default to entire dataset extent. Optional
- epsgCode: corresponds to the dataset coordinate system. Optional
- readonly: Whether to open in read-only way. Optional
- numSlices: The number of slices specified when reading a dataset distributedly.
-
spatial database:
- datasetInfo: dataset information, including:
-
- type: dataset type
- name: dataset name
- datasourceConnectionInfo: database connection information, including:
-
- engineType:HBASE, ORACLE, MONGODB, POSTGRESQL or PGGIS
- dataBase: database name
- password: user password of the database
- user: user name of the database
- server: IP of the database service
- index file stored in hdfs:
- datasetInfo: dataset information, including:
-
- type: specify to INDEXEDHDFS
- url: index file address
output: [Optional] The resulting output. Supported formats:
- local udb file. Default output. Default path is [SuperMap iServer installation directory] /webapps/iserver/processingResultData/Analyst/{id}.
- outputPath: used to set the output path for the analysis result workspace. Supports relative path, using [SuperMap iServer installation directory] /webapps as the relative directory.
- datasourcePath: used to set the storage path for the result datasource. Supports relative path, using [SuperMap iServer installation directory] /webapps as the relative directory.
- type: specify to udb
- database (Currently supports HBASE, PostgreSQL, PostGIS and MongoDB)
- type: database type
- datasetName: the result dataset name
- datasourceInfo: the connection information of the result datasource
-
- server: server name of the database
- alias: alias of the database
- dataBase: database name
- user: user name
- engineType: HBASE, PostgreSQL, PostGIS and MongoDB
- password: user password
- distributed memory
- type: specify to RDD
- buildPyramid: whether to enable vector pyramid