Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4688#discussion_r25476204
  
    --- Diff: 
yarn/src/main/scala/org/apache/spark/deploy/yarn/YarnSparkHadoopUtil.scala ---
    @@ -82,6 +93,102 @@ class YarnSparkHadoopUtil extends SparkHadoopUtil {
         if (credentials != null) credentials.getSecretKey(new Text(key)) else 
null
       }
     
    +  override def setPrincipalAndKeytabForLogin(principal: String, keytab: 
String): Unit = {
    +    loginPrincipal = Option(principal)
    +    keytabFile = Option(keytab)
    +  }
    +
    +  private[spark] override def scheduleLoginFromKeytab(
    +    callback: (SerializableBuffer)  => Unit): Unit = {
    +
    +    loginPrincipal match {
    +      case Some(principal) =>
    +        val keytab = keytabFile.get
    +        val remoteFs = FileSystem.get(conf)
    +        val remoteKeytabPath = new Path(
    +          remoteFs.getHomeDirectory, System.getenv("SPARK_STAGING_DIR") + 
Path.SEPARATOR + keytab)
    --- End diff --
    
    Where is SPARK_STAGING_DIR set? I don't see it in the current code, nor in 
your patch.
    
    I'm partial to making the remote location of the keytab file an explicit 
argument to this method. The caller knows where the keytab is, right?


---
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