Opened 8 years ago
Closed 8 years ago
#1492 closed enhancement (fixed)
Petascope_UploadFileHandler from WCST_import uses filePaths in rasql query
Reported by: | Dimitar Misev | Owned by: | Bang Pham Huu |
---|---|---|---|
Priority: | critical | Milestone: | 9.4 |
Component: | wcst_import | Version: | development |
Keywords: | Cc: | Vlad Merticariu, Bang Pham Huu, Peter Baumann | |
Complexity: | Medium |
Description (last modified by )
The format parameters of decode allow specifying filepaths as follows:
// Absolute path to input file(s). This improves ingestion performance if the data // is on the same machine as the rasdaman server, as the network transport is bypassed; // It is possible that a format could have multiple files associated to each other, // so this argument is an array of filepaths. // Note: supported for netCDF, GRIB, and GDAL formats. "filePaths": [ "/path/to/file.tif", ... ],
It would be good to make use of this option in wcst_import when the conditions are right (data on same machine as rasserver): we'll save quite some data reading / copying / writing.
Example query:
rasql --user rasadmin --passwd rasadmin -q 'UPDATE test_mr SET test_mr[0:255,0:210] ASSIGN shift(decode(<[0:0] 1c>, "GDAL", "{\"filePaths\":[\"/home/rasdaman/mr_1.png\"]}"), [0,0]) WHERE oid(test_mr) = 6145'
Change History (11)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
The blocker is in petascope, but you're right, currently importing is only supported locally.
comment:3 by , 8 years ago
Milestone: | Future → 9.4 |
---|---|
Owner: | set to |
Status: | new → assigned |
Ok, so we should just use the filePaths when WCST generates the decode format parameters.
comment:4 by , 8 years ago
Priority: | major → critical |
---|
Raising priority, it's a simple fix but will have quite some impact.
comment:5 by , 8 years ago
I think by default, it already used this feature as no file was uploaded to a temporary folder and then running rasql update from this folder, have a look at a updated slice from UpdateCoverageHandler.
rasql —user rasadmin —passwd rasadmin -q 'UPDATE test_ansidate_different_crs_origin_5 SET test_ansidate_different_crs_origin_5[0:0,0:4318,0:8640] ASSIGN shift(decode($1, "NetCDF", "{\"variables\": [\"MERIS_nobs_sum\", \"chlor_a\"]}"), [0,0,0]) WHERE oid(test_ansidate_different_crs_origin_5) = 1025'
—file '/home/rasdaman/trask/pixel_shiftted/Chloro/ESACCI-OC-L3S-CHLOR_A-MERGED-1M_MONTHLY_4km_GEO_PML_OC4v6-201003-fv2.0.nc
comment:6 by , 8 years ago
You'd still run rasql but without the —file option now. Instead the file is specified in the format parameters like this:
rasql —user rasadmin —passwd rasadmin -q 'UPDATE test_ansidate_different_crs_origin_5 SET test_ansidate_different_crs_origin_5[0:0,0:4318,0:8640] ASSIGN shift(decode($1, "NetCDF", "{\"variables\": [\"MERIS_nobs_sum\", \"chlor_a\"], \"filePaths\": [ \"/home/rasdaman/trask/pixel_shiftted/Chloro/ESACCI-OC-L3S-CHLOR_A-MERGED-1M_MONTHLY_4km_GEO_PML_OC4v6-201003-fv2.0.nc\" ]}"), [0,0,0]) WHERE oid(test_ansidate_different_crs_origin_5) = 1025'
comment:7 by , 8 years ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
comment:8 by , 8 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
comment:9 by , 8 years ago
sorry, I could not see Dimitar's comment as email was not fowarded, then closed the ticket.
comment:10 by , 8 years ago
Description: | modified (diff) |
---|---|
Summary: | Support filePaths in wcst_import → Petascope_UploadFileHandler from WCST_import uses filePaths in rasql query |
comment:11 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
patch was accepted, close ticket.
I think this should be default behaviour actually, it's very rare to ingest data to a remote server? wcst_import can't even ingest to a remote server if I'm not wrong?