Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

Highlighted

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask

New Contributor

Hi I written a Hive - JDBC program,

 

 

import java.sql.SQLException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.sql.DriverManager;

public class HiveJava {
private static String driverName = "org.apache.hive.jdbc.HiveDriver";

public static void main(String[] args) throws SQLException {
try {
Class.forName(driverName);
} catch (ClassNotFoundException e) {

e.printStackTrace();
System.exit(1);
}
Connection con = DriverManager.getConnection("jdbc:hive2://localhost:10000/default", "", "");
Statement stmt = con.createStatement();

int res = stmt.executeUpdate("insert into sample values(7,'cc','l')");
/*System.out.println("Output");
System.out.println("ID \t Name");
while(res.next())
{
System.out.println(res.getString(1));
}*/

con.close();
}
}

 

 

while running program, I got the following error:

15/09/23 12:40:38 INFO jdbc.Utils: Supplied authorities: localhost:10000
15/09/23 12:40:38 INFO jdbc.Utils: Resolved authority: localhost:10000
15/09/23 12:40:38 INFO jdbc.HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default
Exception in thread "main" java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:279)
at org.apache.hive.jdbc.HiveStatement.executeUpdate(HiveStatement.java:389)
at com.dwi.HiveJava.main(HiveJava.java:23)

 

This error I am getting when the query need to perform MR task, Otherwise, i running smoothly.

 

Help on this