Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21130

Mappers stuck after initializing MapOperator



    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: Operators
    • Labels:


      Hive queries are stuck after initializing MapOperator. These hive queries are simple CTAS reading from a Hive table backed by rcfile format. This table has 7500 partitions and 110 columns with column data types restricted to string and int. This is being on run on a EMR cluster with 100 data nodes with enough memory/cores.


      After the query is submitted, YARN allocates the necessary containers. All the mapper tasks are in RUNNING state and all the map tasks reach the stage of initializing MapOperator and get stuck. Here is log message from the map tasks.

      2019-01-17 15:02:06,262 INFO [main] org.apache.hadoop.hive.ql.exec.MapOperator: Initializing operator MAP[0]

      2019-01-17 15:08:22,093 INFO [main] org.apache.hadoop.hive.ql.exec.mr.ExecMapper:


      You can see that task is stuck for 6 minutes. This even gets to 20 minutes depending upon the number of parallel queries on the cluster. After the ExceMapper starts, the query completes in a minute. 

      I also noticed tread dumps in the logs that lead to a finding where it is spending all the time in this menthod setReadNestedColumnPathConf().

      "main" #1 prio=5 os_prio=0 tid=0x00007f4cd805e800 nid=0x18074 runnable [0x00007f4cded7f000]
      java.lang.Thread.State: RUNNABLE
      at java.lang.String.toLowerCase(String.java:2670)
      at org.apache.hadoop.hive.serde2.ColumnProjectionUtils.setReadNestedColumnPathConf(ColumnProjectionUtils.java:223)
      at org.apache.hadoop.hive.serde2.ColumnProjectionUtils.appendNestedColumnPaths(ColumnProjectionUtils.java:145)
      at org.apache.hadoop.hive.ql.exec.MapOperator.cloneConfsForNestedColPruning(MapOperator.java:365)
      at org.apache.hadoop.hive.ql.exec.MapOperator.setChildren(MapOperator.java:419)
      at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.configure(ExecMapper.java:106)


      Based on the error, I tried running the same query with 1 to 5  columns in the select clause and it runs quickly as expected. If I include more columns in the select clause, it falls in to the same issue with long pause times between MapOperator initialization and ExecMapper.


      The error is very similar to the one in this Jira 









            • Assignee:
              manickmuthu Muthu Manickam
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: