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.

  1. Create spatial processing tasks on REST API resource page

Steps:

  1. Start distributed analysis service, enter iServer services resource page: http://supermapiserver:8090/iserver/services.
  2. Enter "distributedanalyst/rest", click “jobs">"spatialanalyst", enter into the desired spatial analysis resource page, such as aggregatePoints.
  3. Click Create the analysis job in the upper right corner.
  4. Fill in the spatial analysis task configuration. "*" means it's required.
  5. 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.

  1. Build REST request

      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:

  1.  datasetName: dataset name, including data imported through Data Catalog Service, registered data in iServer and datasets stored in iServer DataStore.
  1. Input dataset infos, used when inputting dataset file path and related infos. Supports the following file formats:
    1. 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"
    2. udb file:
  1.  spatial database:

  1. index file stored in hdfs:

output: [Optional] The resulting output. Supported formats:

  1. 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
  1. database (Currently supports HBASE, PostgreSQL, PostGIS and MongoDB)
  1. distributed memory