List Hadoop spatial indexes
get
/spatialviewer/api/v1/hadoop/indexes
List the spatial indexes that were created using the Hadoop API and that have their metadata in the directory index_metadata contained in the SpatialViewer HDFS working directory (see SpatialViewer configuration).
Request
There are no request parameters for this operation.
Back to TopResponse
Supported Media Types
- application/json
200 Response
successful request
List of indexes metadata.
Root Schema : ListHadoopIndexesResponse
Type:
object
List of indexes metadata.
Show Source
-
o:successCode(optional):
string
Example:
SV-05001
-
response(optional):
object response
-
status(optional):
string
Example:
success
-
title(optional):
string
Example:
Get indexes.
Nested Schema : HadoopIndexMetadata
Type:
Show Source
object
-
attributesList(optional):
array attributesList
Extra fields of the indexed records (see 2.8.2.1 Spatial Indexing Class Structure).
-
attributesListString(optional):
string
Extra fields of the indexed records (see 2.8.2.1 Spatial Indexing Class Structure) in a string format.Example:
followers_count, friends_count, location, user_id
-
geodetic(optional):
boolean
true if the geometries are geodetic, false otherwise.Example:
true
-
indexPath(optional):
string
The index path.Example:
hdfs://hadoop.cluster.url:8020/user/oracle/spatialviewer/TweetsApril
-
mbr(optional):
array mbr
MBR (Minimum Bounding Rectangle) of the indexed geometries.
-
name(optional):
string
The index name.Example:
TweetsApril
-
srid(optional):
integer(int32)
SRID of the indexed geometries.Example:
8307
-
tolerance(optional):
number(double)
Double value that represents the tolerance used when performing spatial operations.Example:
0.05
-
userInputString(optional):
string
Path of the file or files that were indexed. The path is as provided by the user.Example:
/user/oracle/spatialviewer/tweetsApril.json
Nested Schema : attributesList
Type:
array
Extra fields of the indexed records (see 2.8.2.1 Spatial Indexing Class Structure).
Show Source
Example:
[
"followers_count",
"friends_count",
"location",
"user_id"
]
Nested Schema : mbr
Type:
array
MBR (Minimum Bounding Rectangle) of the indexed geometries.
Show Source
Example:
[
-179.58998,
-78.46628,
179.3833,
82.48332
]
Examples
The following example shows how to view all Hadoop indexes by submitting a GET request on the REST resource using cURL.
curl -v -X GET "http://localhost:8045/spatialviewer/api/v1/hadoop/indexes" -H "accept: application/json"
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, including one index:
{"status" : "success","title" : "Get indexes.", "o:successCode" : "SV-05000", "response" : {"items" : [ {"name" : "tweetsJanuary", "indexPath" : "hdfs://localhost:8020/user/oracle/tweetsJanuary", "userInputString" : "/user/oracle/tweetsJanuary.json", "srid" : 8307, "tolerance" : 0.05, "geodetic" : true, "mbr" : [ -179.58998, -78.46628, 179.3833, 82.48332 ], "attributesList" : [ "followers_count", "friends_count", "location", "user_id" ], "attributesListString" : "followers_count, friends_count, location, user_id"}]}}