This service performs spatial binning over a spatial dataset.

post

/spatialviewer/api/v1/hadoop/binningJob

Request

Supported Media Types
Query Parameters
Body ()
Job details
Root Schema : BinningJobInfo
Type: object
Show Source
Back to Top

Response

Supported Media Types

200 Response

Successful request.

The response contains the location of the results in HDFS.

Additionally When the job finishes the results will be saved in the folder binning_results contained in the SpatialViewer local working directory (see SpatialViewer configuration). The result can be used as data source of the Map API VectorLayer (OM.layer.VectorLayer) for display.
Body ()
Root Schema : BinningJobResponse
Type: object
Show Source

202 Response

accepted asynchronous request.

The response contains the resource manager web application URL to track the job.

Additionally When the job finishes the results will be saved in the folder binning_results contained in the SpatialViewer local working directory (see SpatialViewer configuration). The result can be used as data source of the Map API VectorLayer (OM.layer.VectorLayer) for display.
Body ()
Root Schema : AsyncBinningJobResponse
Type: object
Show Source
  • The success code.
    Example: SV-05004
  • The response contains the resource manager web application URL to track the job. See this value in the SpatialViewer Hadoop configuration (refer to user's guide chapter 1.8.4 Configuring the Oracle SpatialViewer on Oracle Big Data Appliance). The parameter is yarn.resourcemanager.webapp.address.
    Example: http://resource.manager.webapp:8088
  • success or error
    Example: success
  • Service title.
    Example: Create binning job.
Back to Top

Examples

The following example shows how to perform a binning analysis using the index tweetsJanuary by submitting a POST request on the REST resource using cURL.

curl -v -X POST "http://localhost:8045/spatialviewer/api/v1/hadoop/binningJob" -H  "accept: application/json" -H  "content-type: application/json" -d "{  \"useIndex\": true,  \"indexName\": \"tweetsJanuary\", \"gridMinX\": -175,  \"gridMinY\": -75,  \"gridMaxX\": 175,  \"gridMaxY\": 75,  \"shape\": \"hexagon\",  \"cellWidth\": 5,  \"thematicAttribute\": \"count\",  \"outputPath\": \"/user/oracle/binResult\",  \"resultName\": \"Binning Count Tweets\"}" 

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK Date: Wed, 15 Nov 2017 17:50:38 GMT Access-Control-Allow-Origin: * Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: GET, POST, DELETE, PUT Access-Control-Allow-Headers: Content-Type, Accept Transfer-Encoding: chunked  Content-Type: application/json

Example of Response Body

The following example shows the contents of the response body in JSON format:

{"status" : "success", "title" : "Create binning job.", "o:successCode" : "SV-05004", "response" : "hdfs://localhost:8020/user/oracle/binResult"} 
Back to Top