jerryshao commented on a change in pull request #278: [LIVY-748] Add support 
for running Livy Integration tests against secure external clusters
URL: https://github.com/apache/incubator-livy/pull/278#discussion_r376837995
 
 

 ##########
 File path: 
integration-test/src/main/scala/org/apache/livy/test/framework/Cluster.scala
 ##########
 @@ -45,20 +47,46 @@ trait Cluster {
   def jdbcEndpoint: Option[String]
   def hdfsScratchDir(): Path
 
+  def authScheme: String
+  def user: String
+  def password: String
+  def sslCertPath: String
+
   def doAsClusterUser[T](task: => T): T
 
-  lazy val hadoopConf = {
+  def initKubeConf(): Configuration = {
     val conf = new Configuration(false)
     configDir().listFiles().foreach { f =>
       if (f.getName().endsWith(".xml")) {
         conf.addResource(new Path(f.toURI()))
       }
     }
+    UserGroupInformation.setConfiguration(conf);
+    UserGroupInformation.loginUserFromKeytab(s"${user}@AZDATA.LOCAL",
+      s"/tests/kerberos_setup/${user}.keytab");
 
 Review comment:
   Is it correct to hardcode principal and keytab here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to