Reply
New Contributor
Posts: 1
Registered: ‎11-30-2017

return code 3 on insertion in hive table

[ Edited ]

I have to create a partitioned table in hive. Data have 100 customers which have millions of records. So I have created a partitioned table.

create table ptable (
foo String,
bar String)
PARTITIONED BY (customer_name String, studio_name String, ack_name String)
STORED AS PARQUET
LOCATION '/user/hive/warehouse/lucy';

 

Table successfully created; Insert the data in table

 

SET hive.exec.dynamic.partition=true;
SET hive.exec.dynamic.partition.mode=nonstrict;


INSERT OVERWRITE TABLE ptable PARTITION(customer_name, studio_name, ack_name)
SELECT foo,
bar,
customer_name,
studio_name,
ack_name
FROM stable;


it gives error
>ERROR : Status: Failed
>ERROR : FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.spark.SparkTask
>INFO : Completed executing command(queryId=hive_20171130115757_fcbf193e-9b07-4946-b051-61005b7d0cbf); Time taken: 91.358 seconds
Error: Error while processing statement: FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.spark.SparkTask (state=08S01,code=3)


I have give more memory to insert query

SET mapreduce.map.memory.mb=7000;
SET mapreduce.map.java.opts=-Xmx7200m;
SET mapreduce.reduce.memory.mb=7000;
SET mapreduce.reduce.java.opts=-Xmx7200m;

 

still getting the same error.

 

When I tried with limit in query it works well.

INSERT OVERWRITE TABLE ptable PARTITION(customer_name, studio_name, ack_name)
SELECT foo,
bar,
customer_name,
studio_name,
ack_name
FROM stable limit 100;

 

Is there any properties to give Hive?

Announcements