hive mapreduce query runs only once successfully after running hiveserver once afterwards it gives error eventhough the same query
hiveserver info:-
Connecting to jdbc:hive2://localhost:10000
to: Apache Hive (version 4.0.0-alpha-2)
Driver: Hive JDBC (version 4.0.0-alpha-2)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 4.0.0-alpha-2 by Apache Hive
0: jdbc:hive2://localhost:10000\>insert into table abc values(3983);
1 row affected (10.589 seconds)
0: jdbc:hive2://localhost:10000\>insert into table abc values(3973);
Error: Error while compiling statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask (state=08S01,code=2)
0: jdbc:hive2://localhost:10000\>insert into table abc values(3173);
Error: Error while compiling statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask (state=08S01,code=2)
first mapreduce successful query
Query ID = ndv_20230203183337_f004b3f8-5f56-4a47-822c-d756ce652cef
Total jobs = 3
Launching Job 1 out of 3
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=\<number\>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=\<number\>
In order to set a constant number of reducers:
set mapreduce.job.reduces=\<number\>
Job running in-process (local Hadoop)
2023-02-03 18:33:45,085 Stage-1 map = 100%, reduce = 0%
2023-02-03 18:33:46,117 Stage-1 map = 100%, reduce = 100%
Ended Job = job_local1222265821_0001
Stage-4 is selected by condition resolver.
Stage-3 is filtered out by condition resolver.
Stage-5 is filtered out by condition resolver.
Moving data to directory file:/Users/ndv/Downloads/work/hivestuff/warehouse/abc/.hive-staging_hive_2023-02-03_18-33-37_374_1488321338071048426-1/-ext-10000
Loading data to table default.abc
MapReduce Jobs Launched:
Stage-Stage-1: HDFS Read: 0 HDFS Write: 0 SUCCESS
Total MapReduce CPU Time Spent: 0 msec
second same query which failed
Query ID = ndv_20230203183352_2fb0fdba-3e66-4e7e-8624-43a93cbdfc9b
Total jobs = 3
Launching Job 1 out of 3
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
set hive.exec.reducers.bytes.per.reducer=\<number\>
In order to limit the maximum number of reducers:
set hive.exec.reducers.max=\<number\>
In order to set a constant number of reducers:
set mapreduce.job.reduces=\<number\>
Job running in-process (local Hadoop)
2023-02-03 18:33:54,841 Stage-1 map = 0%, reduce = 0%
Ended Job = job_local2047992482_0002 with errors
Error during job, obtaining debugging information...
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
MapReduce Jobs Launched:
Stage-Stage-1: HDFS Read: 0 HDFS Write: 0 FAIL
Total MapReduce CPU Time Spent: 0 msec
in hiveserver web ui it is showing it failed in stage 1 only
Stage-1:MAPRED Failure, ReturnVal 2
Stage 1 statistics: Status: Failure, ReturnVal 2
Error FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
MapReduce job progress:
0% map0% reduce
"Map Progress (%)": 0
"Reduce Progress (%)": 0
"Cleanup Progress (%)": 100
"Setup Progress (%)": 100
"Complete": true
"Successful": false