HIVE-11966 JDBC Driver parsing error when reading principal from ZooKeeper (Vaibhav Gumashta via Alan Gates)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/de1fe68b Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/de1fe68b Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/de1fe68b Branch: refs/heads/master-fixed Commit: de1fe68b90ff9e29a21095035c7ed02dbbf35f26 Parents: 1357f63 Author: Alan Gates <[email protected]> Authored: Mon Nov 2 16:01:03 2015 -0800 Committer: Alan Gates <[email protected]> Committed: Mon Nov 2 16:01:03 2015 -0800 ---------------------------------------------------------------------- jdbc/src/java/org/apache/hive/jdbc/ZooKeeperHiveClientHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/de1fe68b/jdbc/src/java/org/apache/hive/jdbc/ZooKeeperHiveClientHelper.java ---------------------------------------------------------------------- diff --git a/jdbc/src/java/org/apache/hive/jdbc/ZooKeeperHiveClientHelper.java b/jdbc/src/java/org/apache/hive/jdbc/ZooKeeperHiveClientHelper.java index 7195515..1ca77a1 100644 --- a/jdbc/src/java/org/apache/hive/jdbc/ZooKeeperHiveClientHelper.java +++ b/jdbc/src/java/org/apache/hive/jdbc/ZooKeeperHiveClientHelper.java @@ -159,7 +159,7 @@ class ZooKeeperHiveClientHelper { } // KERBEROS // If delegation token is passed from the client side, do not set the principal - if (matcher.group(2).equalsIgnoreCase("hive.server2.authentication.kerberos.principal") + if (matcher.group(1).equalsIgnoreCase("hive.server2.authentication.kerberos.principal") && !(connParams.getSessionVars().containsKey(JdbcConnectionParams.AUTH_TYPE) && connParams .getSessionVars().get(JdbcConnectionParams.AUTH_TYPE) .equalsIgnoreCase(JdbcConnectionParams.AUTH_TOKEN))
