Hive failed to execute error return code 2 from org.apache.hadoop.hive.ql.exec.mapredtask

I have one request. It fines the CLI Hive and returns the result. But when I execute it using Hive JDBC, I get the error message below:

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.executeQuery(HiveStatement.java:192)

What is the problem? I also run Hive Thrift Server through the Script shell. (I wrote a shell script that has a command to run Hive Thrift Server). Later, I decided to start Hive thrift Server manually by typing a command like:

hadoop@ubuntu:~/hive-0.7.1$ bin/hive --service hiveserver
Starting Hive Thrift Server
org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:10000.
    at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:99)
    at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:80)
    at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:73)
    at org.apache.hadoop.hive.service.HiveServer.main(HiveServer.java:384)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:186)

hadoop@ubuntu:~/hive-0.7.1$

Please help me with this. Thanks

+3
source share
2 answers

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

Follow 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**

, lib ofoop hive . , hive hbase ( ) lib , , .

type

**netstat -nl | grep 10000**

-, , . , , , - , 10000 netstat, .

: , ... bin/hive, bin/hive > , , ( ) .

, , .

: cli, , cli .

+1

, , , "SELECT * FROM", MR.

+1

All Articles