Sergio Peña created HIVE-9266:
---------------------------------

             Summary: Hive fails when LOCATION does not beging with hdfs:// due 
to encryption changes
                 Key: HIVE-9266
                 URL: https://issues.apache.org/jira/browse/HIVE-9266
             Project: Hive
          Issue Type: Sub-task
    Affects Versions: 0.14.0
            Reporter: Sergio Peña
            Assignee: Sergio Peña


The following error shows in Hiveserver2 logs: 

2014-12-31 13:22:01,920 ERROR org.apache.hadoop.hive.ql.Driver: FAILED: 
NullPointerException null 
java.lang.NullPointerException 
at 
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getStagingDirectoryPathname(SemanticAnalyzer.java:1640)
 

When looking at "show create table" the LOCATION does not have a preceding 
"hdfs://" 

We should change the following:

// Only HDFS paths can be checked for encryption 
if (tablePath.toUri().getScheme().equals("hdfs")) { 

to:

"hdfs".equals(tablePath.toUri().getScheme()) 
( Also on line 1605, in getStrongestEncryptedTablePath )

This will avoid the NPE, and allow it to be more resilient to bad locations.




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

Reply via email to