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 [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to