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
363 stars 160 forks source link

Maven Compilation Problems for v 1.1.1 #113

Closed blueelephants closed 6 years ago

blueelephants commented 7 years ago

Hello,

sorry for my beginner's question.

I wanted to try out the GeoJSON support which seem to be part of the spatial-framework-for-hadoop version 1.1.1.

Unfortunately, on the GitHub releases page, only versions 1.1 is available (without GeoJSON support).

When I clone the master-branch of the GitHub repository and compile it with maven I get the following test errors:

Tests in error:

  LegacyName(com.esri.hadoop.hive.serde.TestEsriJsonSerDe)
  TestPointOnly(com.esri.hadoop.hive.serde.TestEsriJsonSerDe)
  TestNullGeom(com.esri.hadoop.hive.serde.TestEsriJsonSerDe)
  TestPointWrite(com.esri.hadoop.hive.serde.TestEsriJsonSerDe): Unexpected character ('0' (code 48)): was expecting double-quote to start field name(..)
  TestIntPoint(com.esri.hadoop.hive.serde.TestEsriJsonSerDe)

Can you please give me some help on how to get the jars compiled?

Should I clone a different branch?

Alternatively, could you upload the version 1.1.1 to the GitHub releases page?

Many Thanks

randallwhitman commented 7 years ago
blueelephants commented 7 years ago

Thanks for your support. My system is:

Unfortunately, I now get another error... I appreciate any help..

mvn -DskipTests package
<snip>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Spatial Framework for Hadoop ....................... SUCCESS [  0.496 s]
[INFO] Hive Spatial Framework ............................. SUCCESS [  8.900 s]
[INFO] Spatial JSON Utilities ............................. FAILURE [  5.396 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.073 s
[INFO] Finished at: 2016-10-03T18:50:10+02:00
[INFO] Final Memory: 55M/402M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.8:jar (attach-javadocs) on project spatial-sdk-json: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - /home/elefant/Downloads/Geo/src_maven/spatial-framework-for-hadoop/json/src/main/java/com/esri/json/hadoop/UnenclosedBaseJsonRecordReader.java:252: warning: no description for @throws
[ERROR] * @throws IOException
[ERROR] ^
[ERROR] /home/elefant/Downloads/Geo/src_maven/spatial-framework-for-hadoop/json/src/main/java/com/esri/json/hadoop/UnenclosedBaseJsonRecordReader.java:254: warning: no @return
[ERROR] protected abstract boolean moveToRecordStart() throws IOException;
[ERROR] ^
[ERROR] /home/elefant/Downloads/Geo/src_maven/spatial-framework-for-hadoop/json/src/main/java/com/esri/json/hadoop/UnenclosedEsriJsonRecordReader.java:49: warning: no description for @throws
[ERROR] * @throws IOException
[ERROR] ^
[ERROR] /home/elefant/Downloads/Geo/src_maven/spatial-framework-for-hadoop/json/src/main/java/com/esri/json/EsriFeature.java:32: warning: no description for @throws
[ERROR] * @throws JsonParseException
[ERROR] ^
[ERROR] /home/elefant/Downloads/Geo/src_maven/spatial-framework-for-hadoop/json/src/main/java/com/esri/json/EsriFeature.java:33: warning: no description for @throws
[ERROR] * @throws IOException
[ERROR] ^
[ERROR] /home/elefant/Downloads/Geo/src_maven/spatial-framework-for-hadoop/json/src/main/java/com/esri/json/EsriFeature.java:42: error: @param name not found
[ERROR] * @param JsonParser parser that is pointed at the root of the JSON file created by ArcGIS
[ERROR] ^
[ERROR] /home/elefant/Downloads/Geo/src_maven/spatial-framework-for-hadoop/json/src/main/java/com/esri/json/EsriFeature.java:44: warning: no description for @throws
[ERROR] * @throws JsonParseException
[ERROR] ^
[ERROR] /home/elefant/Downloads/Geo/src_maven/spatial-framework-for-hadoop/json/src/main/java/com/esri/json/EsriFeature.java:45: warning: no description for @throws
[ERROR] * @throws IOException
[ERROR] ^
[ERROR] /home/elefant/Downloads/Geo/src_maven/spatial-framework-for-hadoop/json/src/main/java/com/esri/json/EsriFeature.java:47: warning: no @param for parser
[ERROR] public static EsriFeature fromJson(JsonParser parser) throws JsonParseException, IOException
[ERROR] ^
<snip>
randallwhitman commented 7 years ago

Try disabling doclint in pom.xml, as with https://github.com/Esri/geometry-api-java/pull/120/files

blueelephants commented 7 years ago

Thanks a lot! Disabling doclint helped to build the jars. Will now start trying the GeoJSONs functionality.

randallwhitman commented 7 years ago

TestPointWrite passes for me on master - maven-3.3.9, java-OpenJDK-1.8.0.91, Ubuntu-16.04/Linux-4.4.0/x64. (All the tests pass for me.)

randallwhitman commented 7 years ago

Are the test issues resolved by adding the following to hive/pom.xml?


    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency> 

    <dependency>
      <groupId>com.esri.hadoop</groupId>
      <artifactId>spatial-sdk-json</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency> 
randallwhitman commented 7 years ago

The doclint error did not occur for me with OpenJDK-1.8.0.91; then with OpenJDK-9-internal (9~b114-0ubuntu1) the error occured despite attempting:

    <profile>
      <id>java-disable-doclint</id>
      <activation>
    <jdk>[1.8,)</jdk>
      </activation>
      <properties>
    <javadoc.doclint.param>-Xdoclint:none</javadoc.doclint.param>
      </properties>
    </profile>
randallwhitman commented 7 years ago

I got a doclint error from OpenJDK 1.8.0.71 with maven 3.3.3 on CentOS-6.7

randallwhitman commented 7 years ago

@blueelephants We now have pre-built release v1.2.0.