Support Questions
Find answers, ask questions, and share your expertise

i get error in hive using ambari 2.3 while using the select statement as shown here : Error while compiling statement: FAILED: ParseException line 4:14 character '�' not supported here [ERROR_STATUS]

 
14 REPLIES 14

Guru

@k v vittal hebbar if you want some answer you shall ask a complete question, like posting your request and the result, not just a simple extract without any context that people can't understand. And preferably use title and body details, it'll be easy for everyone 🙂

Explorer

hello sir @Laurent Edel

we both are working for the same team . We are experiencing issues when it comes to adding couple of jar files in ambari.

So as @Jitendra Yadav had suggested

1) I created a dir as follows

mkdir /usr/hdp/current/hive-server2/auxlib

and copied both the jars into this folder (esri-geometry-api and spatial-sdk-hadoop)

2) Then I added a property in custom hiveserver2 site as

HIVE.AUX.JARS.PATH = /usr/hdp/current/hive-server2/auxlib

Restarted the service but was getting the error

Error while compiling statement: FAILED: RuntimeException java.lang.ClassNotFoundException: com.esri.json.hadoop.UnenclosedJsonInputFormat [ERROR_STATUS]

3) Then tried to add it in advanced hive-env template as

export HIVE_AUX_JARS_PATH=/usr/hdp/current/hive-server2/auxlib/esri-geometry-api.jar,/usr/hdp/current/hive-server2/auxlib/spatial-sdk-hadoop.jar

Restarted the service again but unfortunately getting the same error.

We also tried to add the jars individually and then execute the query but still we are getting the same error

Kindly help us with this issue as we are pretty new to ambari, but have a basic understanding of hadoop using terminal/shell. But we want to use ambari as it seems more user friendly.

hi

I am using select statement which is 'select * from building' in ambari -hive terminal and my data is partially made up of geospatial components .I get error as shown below:

Error while compiling statement: FAILED: RuntimeException java.lang.ClassNotFoundException: com.esri.json.hadoop.UnenclosedJsonInputFormat [ERROR_STATUS]

Guru

not the same error as the initial question, but it sounds like a SerDe is missing, you might add it before your select

ADD JAR yourserde.jar;
SELECT * FROM builing;

HTH

i have used below statements to add jar and execute query in in hive(ambari platform)

add jar /tmp/udfs/esri-geometry-api.jar add jar /tmp/udfs/spatial-sdk-hadoop.jar select * from building_latest;

And i get error as below:

Error while compiling statement: FAILED: ParseException line 4:0 cannot recognize input near 'add' 'jar' '/' [ERROR_STATUS]

Guru

you're missing the semicolumns between each command

add jar /tmp/udfs/esri-geometry-api.jar;
add jar /tmp/udfs/spatial-sdk-hadoop.jar; 
select * from building_latest;

Please use the code tag in the editor here so that your input can be read as it should, that might matters

Guru

Setting hive.aux.jars.path is mainly here to define a jar that will be loaded for everyone and every hive session.

You may first test with a "manual" add jar command to find if it's working (you may have paths, rights issues for example) before trying to make it permanent.

I don't know if you're trying to use HiveServer2 through beeline or the Hive client, because your serde has to be on the HS2 or your client machine ? If you try to use Ambari then I assume you want to make use of Hive Ambari view (which is good), which use HiveServer2, so make sure your jar is present in /usr/hdp/current/hive-server2/auxlib on the HiveServer2 machine

i have jar in /usr/hdp/current/hive-server2/auxlib

Explorer

hello sir @Laurent Edel

Our hive-server2 is located on slave0 (which is the name node)

capture.png

6157-capture.png

and our hive clients are located in slave0, slave1 and slave4. so when I used the terminal I added the jars in /usr/hdp...... in slave 0 as shown in the figure

6156-capture.png

So I hope I am right in assuming that I have copied the jars in the hiveserver2 machine only

Manually i tried to add both the jars in the terminal and theys eem to work fine. Do i need to set the path of the jars manually in hive-env.sh or hive-site.xml and will that make any difference in ambari? I believe the confs will get overwritten everytime we use ambari?

Kindly let us know if we are doing anything wrong?

your help is highly appreciated