For this error : "
*java.sql.SQLException: Query returned non-zero code: 9, cause: FAILED:
Execution Error, return code 2 from
org.apache.hadoop.hive.ql.exec.MapRedTask
    at org.apache.hadoop.hive.jdbc.HiveStatement.executeQuer* "

Go to this link :
http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/UsingEMR_Hive.html


and add

hadoop-0.20-core.jar
hive/lib/hive-exec-0.7.1.jar
hive/lib/hive-jdbc-0.7.1.jar
hive/lib/hive-metastore-0.7.1.jar
hive/lib/hive-service-0.7.1.jar
hive/lib/libfb303.jar
lib/commons-logging-1.0.4.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar


to the class path of your project , add this jars from the lib of hadoop
and hive, and try the code. and also add the path of hadoop, hive, and
hbase(if your are using) lib folder path to the project class path, like
you have added the jars.

and for the second error you got

type

netstat -nl | grep 10000

if it shows something means hive server is already running. the second
error comes only when the port you are specifying is already acquired by
some other proces, by default server port is 10000 so very with the above
netstat command which i said.

Note : suppose you have connected using code exit from ... bin/hive    of
if you are connected through bin/hive > then code will not connect because
i think (not sure) only one client can connect to the hive server.

do above steps hopefully will solve your problem.

Note : come out from hive cli.. when you are going to run your jdbc code.
and dont try to connect using cli when your jdbc code is running....

Regards

∞
Shashwat Shriparv

On Wed, May 9, 2012 at 8:12 PM, Nitin Pawar <nitinpawar...@gmail.com> wrote:

> this thread might give you an idea
>
> http://osdir.com/ml/hive-user-hadoop-apache/2010-06/msg00018.html
>
>
>
> On Wed, May 9, 2012 at 7:28 PM, Mark Grover <mgro...@oanda.com> wrote:
>
>> Re-sending this since I didn't get a response. Any pointers would be much
>> appreciated!
>>
>> Thank you!
>> Mark
>>
>> ----- Original Message -----
>> From: "Mark Grover" <mgro...@oanda.com>
>> To: user@hive.apache.org
>> Sent: Monday, May 7, 2012 5:03:02 PM
>> Subject: FAILED: Execution Error, return code -101 from
>> org.apache.hadoop.hive.ql.exec.MapRedTask
>>
>> Hi all,
>> I wanted to see if anyone has seen this error before:
>> Query returned non-zero code: 9, cause: FAILED: Execution Error, return
>> code -101 from org.apache.hadoop.hive.ql.exec.MapRedTask; nested exception
>> is java.sql.SQLException: Query returned non-zero code: 9, cause: FAILED:
>> Execution Error, return code -101 from
>> org.apache.hadoop.hive.ql.exec.MapRedTask
>>
>> I issued the query (that failed) from a Java client using Hive JDBC
>> driver. There was already a Hive query running on the cluster that was
>> issued from the Hive CLI. The queries are correct and I have ran them
>> separately without any problem.
>>
>> To me, it seems like a timeout error which happens when the query issued
>> through the JDBC driver doesn't get scheduled in a stipulated amount of
>> time. Has anyone seen a similar error before? How did you fix it?
>>
>> Thank you in advance,
>> Mark
>>
>> Mark Grover, Business Intelligence Analyst
>> OANDA Corporation
>>
>> www: oanda.com www: fxtrade.com
>>
>
>
>
> --
> Nitin Pawar
>
>


-- 


∞
Shashwat Shriparv

Reply via email to