rasterframes icon indicating copy to clipboard operation
rasterframes copied to clipboard

RasterRef should not read HDFS scheme with GDAL reader.

Open vpipkt opened this issue 6 years ago • 10 comments

And enforce other logic like can't read a gdal only format (mrf, jp2) outside the gdal reader.

Needs a close look and maybe more extensive unit tests. Possibly also more extensive / detailed error messages.

For #314

This also relates, from the user perspective, to #267

vpipkt avatar Aug 26 '19 14:08 vpipkt

@vpipkt Odd:

https://travis-ci.org/locationtech/rasterframes/builds/576845586#L962-L975

metasim avatar Aug 28 '19 19:08 metasim

Still having some class not found errors in travis. Unsure why.

vpipkt avatar Sep 02 '19 15:09 vpipkt

@vpipkt I think something's wrong with the implementation, because in this test case the scheme resolution should not be attempting to use the GDAL reader if it's not available, yet it's still selecting it over the default reader.

https://travis-ci.org/locationtech/rasterframes/builds/580393491#L832-L866

metasim avatar Sep 03 '19 20:09 metasim

@vpipkt Not 100% sure what's going on here, but don't want to be extra sure the JVM fallback reader still gets selected in non-GDAL scenarios. Wonder if we should leverage this sort of logic?

https://github.com/locationtech/rasterframes/blob/36be70056fa01001bc3df006a4ea5655640c2d58/.circleci/config.yml#L126

Also odd: not seeing it here:

https://circleci.com/gh/s22s/rasterframes

metasim avatar Sep 03 '19 21:09 metasim

Now you can see in Circle CI, it is passing. https://circleci.com/gh/s22s/rasterframes/tree/fix%2F314

vpipkt avatar Sep 04 '19 14:09 vpipkt

@vpipkt Once this weirdness is resolved, should we be trying to use this (if memory serves, written by Azavea folk!)?:

https://gdal.org/user/virtual_file_systems.html#vsihdfs-hadoop-file-system

metasim avatar Sep 10 '19 22:09 metasim

@metasim yep, by @jamesmcclain

pomadchin avatar Sep 11 '19 01:09 pomadchin

@metasim yep, by @jamesmcclain

I am here to help if you run into any trouble with that. Please be advised that some users have run into issues when trying to access HDFS filesystems through GDAL from a JVM process. The problem appears to be related to the fact that GDAL spawns its own inferior JVM to interface with HDFS, and that is done from within a JVM process running native GDAL code (more here).

EDIT: Specifically, please see this comment and surrounding comments. There does not appear to be a problem on OpenJDK 11, but there is a problem with OpenJDK 8.

jamesmcclain avatar Sep 11 '19 14:09 jamesmcclain

@jamesmcclain Thanks for the background color... sounds to me like we shouldn't go that route if we don't have to.

metasim avatar Sep 11 '19 15:09 metasim

@jamesmcclain Thanks for the background color... sounds to me like we shouldn't go that route if we don't have to.

You are welcome. /vsiwebhdfs might still be an option for you, depending on what you are looking for.

jamesmcclain avatar Sep 11 '19 15:09 jamesmcclain