Loads raster files into HDFS using hadoop as implementation

post

/spatialviewer/api/v1/raster/hadoop/operations/load

Request

Supported Media Types
Query Parameters
Body ()
Raster load object with all the required details
Root Schema : RasterLoadOperationPayloadObject
Type: object
Show Source
  • Value used to determine the tiles size of the upload rasters.
    Example: 128
  • File paths separed by comma
    Example: /opt/oracle/oracle-spatial-graph/spatial/raster/HOL/data/raster/hawaii.tif,/opt/oracle/oracle-spatial-graph/spatial/raster/HOL/data/raster/maui.tif
  • Value used to reserve memory for run the job in hadoop. If you send this value to the spark endpoint the value will be ignored.
    Example: 160
  • Output directory name. Directory will be created inside the HDFS (If it not exists yet). By default: upload. It follow the rules for directory names, special characters are not valid even ':'
    Example: upload
  • Minimum Value: 1
    Maximum Value: 200
    Raster overlap value
    Example: 2
Back to Top

Response

Supported Media Types

201 Response

raster load operation has been done successfully
Body ()
Root Schema : RasterLoadOperationSuccessResponse
Type: object
Show Source
Nested Schema : response
Type: object
Details about the success response
Show Source
Nested Schema : items
Type: array
List the details of the uploaded rasters individually.
Show Source
Nested Schema : RasterLoadRasterDetailsEntry
Type: object
Show Source
  • Input file path.
    Example: /net/den01spo/scratch/swap/spatialviewer/data/rasters/kahoolawe.tif
  • Path of the generated raster metadata.
    Example: /user/hdfs/spatial_raster/metadata/af766de6bf3ea93700163ee99ca6d61c88501ae6.loc
  • Path of the uploaded raster in a special format.
    Example: /user/hdfs/upload/kahoolawe.tif.ohif
  • Path of the generated thumbnail for this raster file.
    Example: /net/den01spo/scratch/swap/spatialviewer//thumb/user/hdfs/upload/kahoolawe.tif.ohif.tif

202 Response

raster load operations was schedule
Body ()
Root Schema : RasterOperationAcceptedResponse
Type: object
Show Source

406 Response

invalid parameters
Body ()
Root Schema : RasterOperationsInvalidParametersResponse
Type: object
Show Source

417 Response

raster load operation has been done unsuccessfully due some error in the choose implementation
Body ()
Root Schema : RasterLoadOperationUnsuccessResponse
Type: object
Show Source

500 Response

unknow error
Body ()
Root Schema : RasterErrorGenericResponse
Type: object
Show Source

503 Response

GDAL set up is incomplete
Body ()
Root Schema : GDALSetUpIsIncompleteResponse
Type: object
Show Source
Back to Top

Examples

Schedules or initiates a load job using hadoop to load the raster files into hdfs.

The following example shows how to submit a raster load using hadoop as implementation by submitting a POST request on the REST resource using cURL.

curl -X POST "http://localhost:8045/spatialviewer/api/v1/raster/hadoop/operations/load?async=false" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"outputDirectory\":\"upload\",\"overlap\":\"2\",\"blockSizeMB (MB)\":\"128\",\"inputPaths\":\"/net/den01spo/scratch/swap/spatialviewer/data/rasters/hawaii.tif,/net/den01spo/scratch/swap/spatialviewer/data/rasters/kahoolawe.tif\"}"

Example of Response Header

Example of Response Header

HTTP/1.1 200 OK Date: Wed, 22 Aug 2018 22:22:14 GMT Content-Type: application/json 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

Example of the Response Body

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

{ "status" : "success", "title" : "Success Response.", "o:successCode" : "SVR-00200", "response" : { "message" : "Rasters load finished successfully, jobId: job_1533232152884_0599", "items" : [ { "inputFile" : "/net/den01spo/scratch/swap/spatialviewer/data/rasters/hawaii.tif", "metadata" : "/user/hdfs/spatial_raster/metadata/17ab9d9595ee7e85a90f5410d1c99fb77c71f033.loc", "outputFile" : "/user/hdfs/upload/net/den01spo/scratch/swap/spatialviewer/data/rasters/hawaii.tif.ohif", "thumbnail" : "/net/den01spo/scratch/swap/spatialviewer//thumb/user/hdfs/upload/net/den01spo/scratch/swap/spatialviewer/data/rasters/hawaii.tif.ohif.tif" }, { "inputFile" : "/net/den01spo/scratch/swap/spatialviewer/data/rasters/kahoolawe.tif", "metadata" : "/user/hdfs/spatial_raster/metadata/25a071b7e5cb943a75c90b2ddc00cbc3666f083e.loc", "outputFile" : "/user/hdfs/upload/net/den01spo/scratch/swap/spatialviewer/data/rasters/kahoolawe.tif.ohif", "thumbnail" : "/net/den01spo/scratch/swap/spatialviewer//thumb/user/hdfs/upload/net/den01spo/scratch/swap/spatialviewer/data/rasters/kahoolawe.tif.ohif.tif" } ] } }
Back to Top