Esri / spatial-framework-for-hadoop

The Spatial Framework for Hadoop allows developers and data scientists to use the Hadoop data processing system for spatial data analysis.
Apache License 2.0
367 stars 159 forks source link

ST_GeomFromJson fails compile checking incorrect Exceptions #135

Closed mladkov closed 6 years ago

mladkov commented 6 years ago

By pulling and trying to compile the master branch, I was getting these failures:

[ERROR] /.../ST_GeomFromJson.java:[51,4] error: exception JsonParseException is never thrown in body of corresponding try statement [ERROR] /.../ST_GeomFromJson.java:[53,4] error: exception IOException is never thrown in body of corresponding try statement

Looks like the interface changed for the calls to:

OGCGeometry.fromJson GeometryUtils.geometryToEsriShapeBytesWritable

That no longer warrant a check for the JsonParseException and IOExceptions. Made it more generic now with the overarching Exception.

Added a few files to the gitignore to keep the branch clean.

randallwhitman commented 6 years ago

Spatial Framework requires Geometry v2 - #127, #128.

mladkov commented 6 years ago

Hmm.. when I build, doesn't it pull the required dependencies for me? And if it didn't, wouldn't we need to fix this?

When I look in my .m2 directory, I have:

$ ls /Users/mladen/.m2/repository/com/esri/geometry/esri-geometry-api
2.0.0

$ ls 2.0.0
_remote.repositories             esri-geometry-api-2.0.0.jar      esri-geometry-api-2.0.0.jar.sha1 esri-geometry-api-2.0.0.pom      esri-geometry-api-2.0.0.pom.sha1

It seems like I already have geometry v2 in my environment and it still broke? Am I missing something else?

randallwhitman commented 6 years ago

That does look like Geometry v2. I don't offhand see anything missing.

mladkov commented 6 years ago

So @randallwhitman do you think my changes are inappropriate? Are you suggesting this is supposed to be compiling just fine out of the box? Could it be my compiler? I'm using 1.8.0_144.

It seems like the build isn't quite working on travis-ci, seems like the servers being used to compile are missing some binaries/libraries to run properly so can't tell from there.

randallwhitman commented 6 years ago

Now i was able to reproduce that with master. I was quite sure I had built it clean a few times the other day. Will have to look again. Maybe a file was omitted from checkin on the v2 branch.

randallwhitman commented 6 years ago

Now that I was able to remote to my primary workstation, I see that i did have the same change in my working directory, and apparently omitted it from check-in.

randallwhitman commented 6 years ago

Thanks for catching that and posting the PR. [p.s. i've been on flaky wifi this week.]