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

ClassCastException during VectorMapJoinCommonOperator initialization

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1, 2.2.0, 3.0.0, 2.3.2, 3.1.0
    • Fix Version/s: 2.4.0, 4.0.0
    • Component/s: None
    • Labels:
      None

      Description

      I see the following exceptions when I a mapjoin operator is being initialized on Hive-on-Spark and when vectorization is turned on.

      This happens when the hashTable is empty. The code in MapJoinTableContainerSerDe#getDefaultEmptyContainer method returns a HashMapWrapper while the VectorMapJoinOperator expects a MapJoinBytesTableContainer when hive.mapjoin.optimized.hashtable is set to true.

      Caused by: java.lang.ClassCastException: org.apache.hadoop.hive.ql.exec.persistence.HashMapWrapper cannot be cast to org.apache.hadoop.hive.ql.exec.persistence.MapJoinTableContainerDirectAccess
       at org.apache.hadoop.hive.ql.exec.vector.mapjoin.optimized.VectorMapJoinOptimizedHashTable.<init>(VectorMapJoinOptimizedHashTable.java:92) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       at org.apache.hadoop.hive.ql.exec.vector.mapjoin.optimized.VectorMapJoinOptimizedHashMap.<init>(VectorMapJoinOptimizedHashMap.java:127) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       at org.apache.hadoop.hive.ql.exec.vector.mapjoin.optimized.VectorMapJoinOptimizedStringHashMap.<init>(VectorMapJoinOptimizedStringHashMap.java:60) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       at org.apache.hadoop.hive.ql.exec.vector.mapjoin.optimized.VectorMapJoinOptimizedCreateHashTable.createHashTable(VectorMapJoinOptimizedCreateHashTable.java:80) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       at org.apache.hadoop.hive.ql.exec.vector.mapjoin.VectorMapJoinCommonOperator.setUpHashTable(VectorMapJoinCommonOperator.java:485) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       at org.apache.hadoop.hive.ql.exec.vector.mapjoin.VectorMapJoinCommonOperator.completeInitializationOp(VectorMapJoinCommonOperator.java:461) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       at org.apache.hadoop.hive.ql.exec.Operator.completeInitialization(Operator.java:471) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:401) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:574) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       at org.apache.hadoop.hive.ql.exec.Operator.initializeChildren(Operator.java:526) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       at org.apache.hadoop.hive.ql.exec.Operator.initialize(Operator.java:387) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       at org.apache.hadoop.hive.ql.exec.spark.SparkMapRecordHandler.init(SparkMapRecordHandler.java:109) ~[hive-exec-3.1.0-SNAPSHOT.jar:3.1.0-SNAPSHOT]
       ... 16 more
      
      

        Attachments

        1. HIVE-19388.02.patch
          2 kB
          Vihang Karajgaonkar
        2. HIVE-19388.01.patch
          2 kB
          Vihang Karajgaonkar

          Activity

            People

            • Assignee:
              vihangk1 Vihang Karajgaonkar
              Reporter:
              vihangk1 Vihang Karajgaonkar
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: