Support Questions

Find answers, ask questions, and share your expertise
Announcements
Welcome to the upgraded Community! Read this blog to see What’s New!

error while usin select statement using hive in ambari:

avatar

I have added jars esri-geometry-api.jar and spatial-sdk.jar in tmp/udfs/ in file view and refer it in hive view using the script as: ADD JAR /tmp/udfs/esri-geometry-api.jar ADD JAR /tmp/udfs/spatial-sdk.jar

select * from building;

but i get error as

Error while compiling statement: FAILED: ParseException line 4:0 cannot recognize input near 'ADD' 'JAR' 'esri' [ERROR_STATUS]

1 ACCEPTED SOLUTION

avatar

@k v vittal hebbar

I assume that lines as you actually wrote are like the below (in two lines with semicolon at the end):

ADD JAR /tmp/udfs/esri-geometry-api.jar;

ADD JAR /tmp/udfs/spatial-sdk.jar;

If that is true, then check whether your ambari view user is mapped to an OS user that has privileges on /tmp/udfs/ located files. Example:

You also have a better option to add these libraries to HDFS as such you can access them from any node with a Hive client.

add jar hdfs://whateverhost:8020/tmp/esri/esri-geometry-api.jar;

Try the hdfs approach.

If this addresses your response please vote and accept it as the best answer.

View solution in original post

3 REPLIES 3

avatar

@k v vittal hebbar

I assume that lines as you actually wrote are like the below (in two lines with semicolon at the end):

ADD JAR /tmp/udfs/esri-geometry-api.jar;

ADD JAR /tmp/udfs/spatial-sdk.jar;

If that is true, then check whether your ambari view user is mapped to an OS user that has privileges on /tmp/udfs/ located files. Example:

You also have a better option to add these libraries to HDFS as such you can access them from any node with a Hive client.

add jar hdfs://whateverhost:8020/tmp/esri/esri-geometry-api.jar;

Try the hdfs approach.

If this addresses your response please vote and accept it as the best answer.

avatar

should i add above jars in hive view for ambari or hive server node

avatar

@k v vittal hebbar

Either one is fine.

Labels