Per Ullberg created HIVE-14772:
----------------------------------

             Summary: NPE when MSCK REPAIR
                 Key: HIVE-14772
                 URL: https://issues.apache.org/jira/browse/HIVE-14772
             Project: Hive
          Issue Type: Bug
          Components: Hive
    Affects Versions: 2.1.0
         Environment: HiveRunner on OSX Yosemite
            Reporter: Per Ullberg


HiveMetaStoreChecker throws NullPointerException when doing a MSCK REPAIR TABLE.

The bug is here:

{code}
...
18      package org.apache.hadoop.hive.ql.metadata;
...
58      public class HiveMetaStoreChecker {
...
408        if (!directoryFound) {
409         allDirs.put(path, null);
410        }
...
{code}

allDirs is a ConcurrentHashMap and those does not allow either key or value to 
be null.

I found the bug while trying to port https://github.com/klarna/HiveRunner to 
Hive 2.1.0

Implemented explicit test case that exposes the bug here: 
https://github.com/klarna/HiveRunner/blob/hive-2.1.0-NPE-at-msck-repair/src/test/java/com/klarna/hiverunner/MSCKRepairNPE.java

Reproduce by cloning branch 
https://github.com/klarna/HiveRunner/tree/hive-2.1.0-NPE-at-msck-repair
and run 
{code} mvn -Dtest=MSCKRepairNPE clean test{code}

( Does not work on windows :( )

Looks like this email thread talks about the same issue: 
http://user.hive.apache.narkive.com/ETOpbKk5/msck-repair-table-and-hive-v2-1-0




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to