Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

error while usin select statement using hive in ambari:

avatar
New Member

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
Super Guru

@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
Super Guru

@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
New Member

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

avatar
Super Guru

@k v vittal hebbar

Either one is fine.