Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RasterRef should not read HDFS scheme with GDAL reader. #319

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

vpipkt
Copy link
Member

@vpipkt vpipkt commented Aug 26, 2019

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 vpipkt requested a review from metasim August 26, 2019 14:22
@metasim
Copy link
Member

metasim commented Aug 28, 2019

@vpipkt vpipkt requested a review from metasim September 2, 2019 15:38
@vpipkt
Copy link
Member Author

vpipkt commented Sep 2, 2019

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

@metasim
Copy link
Member

metasim commented Sep 3, 2019

@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 metasim self-requested a review September 3, 2019 20:54
Copy link
Member

@metasim metasim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a bug causing GDAL reader to be selected when GDAL not available and JVM one sufficient.

@metasim
Copy link
Member

metasim commented Sep 3, 2019

@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?

itWithoutGdal:

Also odd: not seeing it here:

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

@vpipkt
Copy link
Member Author

vpipkt commented Sep 4, 2019

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

@@ -78,7 +78,7 @@ object GDALRasterSource extends LazyLogging {
val _ = new GDALWarp()
true
} catch {
case _: UnsatisfiedLinkError =>
case _:UnsatisfiedLinkError | _:NoClassDefFoundError =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@metasim I suspect this may be a terrible idea.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmmmmm. Interesting......

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why Travis isn't passing yet. CircleCI doesn't surprise me because GDAL is installed. I've not confirmed that it is in the Travis configuration.

@metasim
Copy link
Member

metasim commented Sep 10, 2019

@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

@pomadchin
Copy link
Member

@metasim yep, by @jamesmcclain

@jamesmcclain
Copy link
Member

jamesmcclain commented Sep 11, 2019

@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.

@metasim
Copy link
Member

metasim commented Sep 11, 2019

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

@jamesmcclain
Copy link
Member

jamesmcclain commented Sep 11, 2019

@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.

@metasim metasim force-pushed the develop branch 2 times, most recently from 844c524 to a5c6446 Compare January 7, 2021 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants