Created 04-26-2021 02:46 AM
Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.StatsTask (state=08S01,code=1)
HDP Version: 3.1.4
Hive Version: 18.104.22.168.1.4.0-315
Configs for Dynamic Partition in hive:
Allow all partitions to be Dynamic=nonstrict
Sort Partitions Dynamically=false
Allow dynamic numbers of reducers=true
Allow dynamic partition pruning=true
Any help appreciated.
@dmharshit It would be really difficult to answer for the question without the necessary details like what is the query you are running, From when you started facing the issue and the complete error stack. But from the two line which you provided i suspect that there might be issue with stats. So you can try setting the below parameter and try it.
set hive.stats.column.autogather=false; set hive.optimize.sort.dynamic.partition=true;
If the above doesn't help kindly provide the necessary details to figure out the issue.
If the above parameter resolves the issue kindly mark "Accept as a Solution"
Thanks for your response.
I tried running queries using the configs you mentioned. Queries are getting executed successfully but no change is observed in table data.
Following queries I'm running in hive (for mix partitioning which includes static and dynamic partitioning together)
1. insert into table foodmart.idNameGenderPartDeptTableName partition (manager_id = 200, manager_name, manager_gender) VALUES (1, 'COMP', 'John', 'M');
2. insert into table foodmart.idNameGenderPartDeptTableName partition (manager_id = 1111, manager_name, manager_gender) select department_id, full_name, first_name, gender from foodmart.trimmed_employee;
3. insert OVERWRITE table foodmart.idNameGenderPartDeptTableName partition (manager_id = 1234, manager_name, manager_gender) select department_id, full_name, first_name, gender from foodmart.trimmed_employee;
4. insert OVERWRITE table foodmart.idNameGenderPartDeptTableName partition (manager_id = 1234, manager_name, manager_gender) values (02, 'HR', 'Niks', 'M');
I compared the hive set ; between HIVE 2.x & HIVE 3.x
In HIVE 3.x following value is 'nonstrict'. Is that causing the issue?
The problem is, if I execute the query which contains static & dynamic parameters I am getting the error.
If I just keep it static or dynamic parameters, no problem.
Some more parameters which might be causing the issue but I am not too sure =
hive.optimize.dynamic.partition.hashjoin=true hive.optimize.sort.dynamic.partition=false hive.server2.support.dynamic.service.discovery=true
When you run this query, does a YARN application ID get generated? Or the query fails before triggering the YARN application?
In case YARN application is triggered, please get the logs of that particular YARN application and check for errors.
yarn logs -applicationId your_application_id > your_application_id.log 2>&1
Check and see if you're able to get any detailed errors in this log file and share.