The Hortonworks Community Connection is now live. A completely rebuilt Q&A forum, Knowledge Base, Code Hub and more, backed by the experts in the industry.

You will be redirected here in 10 seconds. If your are not redirected, click here to visit the new site.

The legacy Hortonworks Forum is now closed. You can view a read-only version of the former site by clicking here. The site will be taken offline on January 31,2016

Hive / HCatalog Forum

Spatial Analytics with Hive and Hadoop

  • #59438
    John Gou

    I tried running the example presented by Carter Shanklin using the spatial-sdk-hive-1.0-MODIFIED.jar (from his Github acct), esri-geometry-api.jar and HiveUDFs.jar. I uploaded the uber logs into HCat.

    I receive the following message running the hiveSQL script.

    SELECT id, ST_GeodesicLengthWGS84(
    ST_LineString(collect_array(point)), 4326)) as length
    FROM (
    SELECT id, ST_Point(longitude, latitude) as point
    ) sub
    GROUP BY id;
    Error Message:
    converting to local hdfs://
    Added /tmp/85d1cec7-641f-4e07-bc06-eeee1de2cfa0_resources/esri-geometry-api.jar to class path
    Added resource: /tmp/85d1cec7-641f-4e07-bc06-eeee1de2cfa0_resources/esri-geometry-api.jar
    converting to local hdfs://
    Added /tmp/85d1cec7-641f-4e07-bc06-eeee1de2cfa0_resources/HiveUDFs.jar to class path
    Added resource: /tmp/85d1cec7-641f-4e07-bc06-eeee1de2cfa0_resources/HiveUDFs.jar
    converting to local hdfs://
    Added /tmp/85d1cec7-641f-4e07-bc06-eeee1de2cfa0_resources/spatial-sdk-hive-1.0-MODIFIED.jar to class path
    Added resource: /tmp/85d1cec7-641f-4e07-bc06-eeee1de2cfa0_resources/spatial-sdk-hive-1.0-MODIFIED.jar
    FAILED: SemanticException [Error 10014]: Line 9:8 Wrong arguments ‘latitude’: The UDF implementation class ‘com.esri.hadoop.hive.ST_Point’ is not present in the class path

  • Author
  • #59440
    Jason Dere

    How old is spatial-sdk-hive-1.0-MODIFIED.jar? The ST_Point function had an issue where the class was not specified as having public scope, which caused issues in Hive starting in Hive 0.13.0. ESRI has since fixed their Hive UDFs, if you can get an up-to-date version. The UDF class not being a public class is one common cause of the ” UDF not present in the class path” errors from Hive.

    John Gou

    I just re-downloaded the code from github/Esri and packaged them up. I am running esri-geometry-api-1.1.2-SNAPSHOT.jar and spatial-sdk-hive-1.0.3-SNAPSHOT.jar. Unfortunately, the error is still there.


The forum ‘Hive / HCatalog’ is closed to new topics and replies.

Support from the Experts

A HDP Support Subscription connects you experts with deep experience running Apache Hadoop in production, at-scale on the most demanding workloads.

Enterprise Support »

Become HDP Certified

Real world training designed by the core architects of Hadoop. Scenario-based training courses are available in-classroom or online from anywhere in the world

Training »

Hortonworks Data Platform
The Hortonworks Data Platform is a 100% open source distribution of Apache Hadoop that is truly enterprise grade having been built, tested and hardened with enterprise rigor.
Get started with Sandbox
Hortonworks Sandbox is a self-contained virtual machine with Apache Hadoop pre-configured alongside a set of hands-on, step-by-step Hadoop tutorials.
Modern Data Architecture
Tackle the challenges of big data. Hadoop integrates with existing EDW, RDBMS and MPP systems to deliver lower cost, higher capacity infrastructure.