gaborgsomogyi commented on a change in pull request #25477:
[SPARK-28760][SS][TESTS] Add Kafka delegation token end-to-end test with mini
KDC
URL: https://github.com/apache/spark/pull/25477#discussion_r318102162
##########
File path:
external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaTestUtils.scala
##########
@@ -96,6 +115,84 @@ class KafkaTestUtils(withBrokerProps: Map[String, Object]
= Map.empty) extends L
throw new IllegalStateException("Zookeeper client is not yet
initialized"))
}
+ def clientPrincipal: String = {
+ assert(kdcReady, "KDC should be set up beforehand")
+ clientUser + "@" + kdc.getRealm()
+ }
+
+ def clientKeytab: String = {
+ assert(kdcReady, "KDC should be set up beforehand")
+ clientKeytabFile.getAbsolutePath()
+ }
+
+ private def setUpMiniKdc(): Unit = {
+ val kdcDir = Utils.createTempDir()
+ val kdcConf = MiniKdc.createConf
+ kdc = new MiniKdc(kdcConf, kdcDir)
+ kdc.start()
+ kdcReady = true
+ }
+
+ private def createJaasConfigFile(): String = {
Review comment:
Renamed.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]