[ https://issues.apache.org/jira/browse/HIVE-21507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16801656#comment-16801656 ]
Hive QA commented on HIVE-21507: -------------------------------- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 9m 13s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 20s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 11s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 0m 32s{color} | {color:blue} jdbc in master has 16 extant Findbugs warnings. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 13s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 0m 47s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 0m 19s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 0m 19s{color} | {color:green} the patch passed {color} | | {color:red}-1{color} | {color:red} checkstyle {color} | {color:red} 0m 11s{color} | {color:red} jdbc: The patch generated 27 new + 34 unchanged - 0 fixed = 61 total (was 34) {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:green}+1{color} | {color:green} findbugs {color} | {color:green} 0m 40s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 13s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} asflicense {color} | {color:red} 0m 14s{color} | {color:red} The patch generated 1 ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 13m 21s{color} | {color:black} {color} | \\ \\ || Subsystem || Report/Notes || | Optional Tests | asflicense javac javadoc findbugs checkstyle compile | | uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux | | Build tool | maven | | Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-16686/dev-support/hive-personality.sh | | git revision | master / 80998ad | | Default Java | 1.8.0_111 | | findbugs | v3.0.0 | | checkstyle | http://104.198.109.242/logs//PreCommit-HIVE-Build-16686/yetus/diff-checkstyle-jdbc.txt | | asflicense | http://104.198.109.242/logs//PreCommit-HIVE-Build-16686/yetus/patch-asflicense-problems.txt | | modules | C: jdbc U: jdbc | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-16686/yetus.txt | | Powered by | Apache Yetus http://yetus.apache.org | This message was automatically generated. > Hive swallows NPE if no delegation token found > ---------------------------------------------- > > Key: HIVE-21507 > URL: https://issues.apache.org/jira/browse/HIVE-21507 > Project: Hive > Issue Type: Bug > Components: JDBC > Affects Versions: 3.1.1 > Reporter: Denes Bodo > Assignee: Denes Bodo > Priority: Critical > Labels: usability > Attachments: HIVE-21507.001.patch > > > In case if there is no delegation token put into token file, this > [line|https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java#L777] > will cause a NullPointerException which is not handled and the user is not > notified in any way. > To cause NPE the use case is to have an Oozie Sqoop import to Hive in a > kerberized cluster. Oozie puts the delegation token into the token file with > id: *HIVE_DELEGATION_TOKEN_hiveserver2ClientToken*. So with id *hive* it is > not working. However, fallback code uses the key which Oozie provides > [this|https://github.com/apache/hive/blob/master/jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java#L784] > way. > I suggest to have warning message to user that key with id *hive* cannot be > used and falling back to get delegation token from the session. > I am creating the patch. -- This message was sent by Atlassian JIRA (v7.6.3#76005)