title: Hive error: return code 2 from org.apache.hadoop.hive.ql.exec.mr.mapredtask
body: <p>I ran the following code in hive in windows-</p>
  <pre><code> create database zomato comment ‘zomato database’ with dbproperties(‘Creator’=’Joe’, ‘date’=’2020- 11-02’);
      create external table zomato_details(restaurant_Id int comment ‘Restaurant id’, name string comment 
      ‘Restaurant name’, city string comment ‘Restaurant city’, location
      map&lt;string,string&gt; comment ‘Latitude and longitude of the restaurant’ ,cuisine array&lt;string&gt; comment 
      ‘cuisines available’ ,currency string comment ’currency accepted’, has_table_booking string comment
      ’yes or no field’, has_online_delivery string  comment
      ‘yes or no field’,price_range int  comment ‘range
      from 1-5’,rating_text string comment ‘good,very good excellent’,votes int coment ‘total votes’,) ;
      load data local inpath ‘C:\Users\Desktop\hive photo\zomato.csv’ into table zomato_details;
      create table partcity(restaurant_id int, price_range int) partitioned by(city String) row format delimited 
      fields terminated by ‘,’;
      insert overwrite table partcity partition(city) select restaurant_id, price_range, city from zomato_details; 
  </code></pre>
  <p>Am getting an error in last command--</p>
  <pre><code>hive&gt; insert overwrite table partcity partition(city) select restaurant_id, price_range, city from zomato_details;
  WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
  Query ID = L C Kumar_20201203191112_af4c5fc9-4e0d-4629-b78e-22f80d704ff7
  Total jobs = 3
  Launching Job 1 out of 3
  Number of reduce tasks is set to 0 since there's no reduce operator
  Starting Job = job_1607001298283_0003, Tracking URL = http://dnm-lt-lckumar:8088/proxy/application_1607001298283_0003/
  Kill Command = H:\hadoop\bin\hadoop.cmd job  -kill job_1607001298283_0003
  WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. spark, tez) or using Hive 1.X releases.
  Hadoop job information for Stage-1: number of mappers: 0; number of reducers: 0
  2020-12-03 19:11:28,806 Stage-1 map = 0%,  reduce = 0%
  Ended Job = job_1607001298283_0003 with errors
  19:11:28.820 [HiveServer2-Background-Pool: Thread-87] ERROR org.apache.hadoop.hive.ql.exec.Task - Ended Job = job_1607001298283_0003 with errors
  Error during job, obtaining debugging information...
  19:11:28.823 [Thread-80] ERROR org.apache.hadoop.hive.ql.exec.Task - Error during job, obtaining debugging information...
  FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
  19:11:29.006 [HiveServer2-Background-Pool: Thread-87] ERROR org.apache.hadoop.hive.ql.Driver - 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
  19:11:29.066 [HiveServer2-Background-Pool: Thread-87] ERROR org.apache.hive.service.cli.operation.Operation - Error running hive query:
  org.apache.hive.service.cli.HiveSQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
          at org.apache.hive.service.cli.operation.Operation.toSQLException(Operation.java:387) ~[hive-service-2.1.0.jar:2.1.0]
          at org.apache.hive.service.cli.operation.SQLOperation.runQuery(SQLOperation.java:237) ~[hive-service-2.1.0.jar:2.1.0]
          at org.apache.hive.service.cli.operation.SQLOperation.access$300(SQLOperation.java:90) ~[hive-service-2.1.0.jar:2.1.0]
          at org.apache.hive.service.cli.operation.SQLOperation$2$1.run(SQLOperation.java:299) [hive-service-2.1.0.jar:2.1.0]
          at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_271]
          at javax.security.auth.Subject.doAs(Subject.java:422) [?:1.8.0_271]
          at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1807) [hadoop-common-2.8.0.jar:?]
          at org.apache.hive.service.cli.operation.SQLOperation$2.run(SQLOperation.java:312) [hive-service-2.1.0.jar:2.1.0]
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_271]
          at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_271]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_271]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_271]
          at java.lang.Thread.run(Thread.java:748) [?:1.8.0_271]
  19:11:28.820 [HiveServer2-Background-Pool: Thread-87] ERROR org.apache.hadoop.hive.ql.exec.Task - Ended Job = job_1607001298283_0003 with errors
  19:11:29.006 [HiveServer2-Background-Pool: Thread-87] ERROR org.apache.hadoop.hive.ql.Driver - FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
  Error: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask (state=08S01,code=2)
  </code></pre>
  <p><strong>I checked a lot but the logs are empty in the web application dashboard and even tried yarn logs and still couldn't find anything.</strong>
  I also tried various commands like--</p>
  <pre><code>**set hive.auto.convert.join=false;     
  SET hive.exec.dynamic.partition = true;        
  SET hive.exec.dynamic.partition.mode = nonstrict;    
  set hive.exec.max.dynamic.partitions=10000;    
  set hive.exec.max.dynamic.partitions.pernode=1000;**    
  </code></pre>
  <p>but nothing worked for me
  Can anyone please help me fix this error</p>