Github user cmirash commented on a diff in the pull request:
https://github.com/apache/spark/pull/15594#discussion_r89238376
--- Diff:
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIService.scala
---
@@ -57,7 +59,24 @@ private[hive] class SparkSQLCLIService(hiveServer:
HiveServer2, sqlContext: SQLC
case e @ (_: IOException | _: LoginException) =>
throw new ServiceException("Unable to login to kerberos with
given principal/keytab", e)
}
- }
+
+ // Also try creating a UGI object for the SPNego principal
+ val principal =
hiveConf.getVar(ConfVars.HIVE_SERVER2_SPNEGO_PRINCIPAL)
+ val keyTabFile = hiveConf.getVar(ConfVars.HIVE_SERVER2_SPNEGO_KEYTAB)
+ if (principal.isEmpty() || keyTabFile.isEmpty()) {
+ getAncestorField[Log](this, 3, "LOG").info(
--- End diff --
Thanks @vanzin. The log message was added to replicate same behavior as the
Hive Thriftserver code block. @steveloughran added the kerberos code and he
added his comments above.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]