You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by tgravescs <gi...@git.apache.org> on 2016/02/24 23:40:02 UTC
[GitHub] spark pull request: [SPARK-12646] support _HOST tag in kerberos pr...
Github user tgravescs commented on a diff in the pull request:
https://github.com/apache/spark/pull/10647#discussion_r54019754
--- Diff: core/src/main/scala/org/apache/spark/deploy/SparkHadoopUtil.scala ---
@@ -126,7 +127,15 @@ class SparkHadoopUtil extends Logging {
def getSecretKeyFromUserCredentials(key: String): Array[Byte] = { null }
def loginUserFromKeytab(principalName: String, keytabFilename: String) {
- UserGroupInformation.loginUserFromKeytab(principalName, keytabFilename)
+ var principal = SecurityUtil.getServerPrincipal(principalName, InetAddress.getLocalHost)
+ UserGroupInformation.loginUserFromKeytab(principal, keytabFilename)
+ }
+
+ def loginUserFromKeytabAndReturnUGI(
+ principalName: String,
+ keytabFilename: String): UserGroupInformation = {
+ var principal = SecurityUtil.getServerPrincipal(principalName, InetAddress.getLocalHost)
--- End diff --
you can't do this for normal operation. A user principal is not the same as a server principal and normally users principals don't have HOSTS. I don't see how this doesn't break the current functionality.
As I believe @vanzin stated in the jira _HOST is meant for servers, not for applications running on yarn.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org