Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change order of configuration setting so that everything works
  • Loading branch information
Ian Hummel committed Apr 4, 2017
commit 917b077ca1e05a9bb44bcb91c33ed64a1d1c364c
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,6 @@ private[spark] class StandaloneSchedulerBackend(


override def start() {
super.start()
launcherBackend.connect()



//////////////////////////////////////////////////////
//////////////////////////////////////////////////////

setupCredentials()

Expand All @@ -104,6 +97,7 @@ private[spark] class StandaloneSchedulerBackend(
// If we use principal and keytab to login, also credentials can be renewed some time
// after current time, we should pass the next renewal and updating time to credential
// renewer and updater.

if (loginFromKeytab && nearestTimeOfNextRenewal > System.currentTimeMillis() &&
nearestTimeOfNextRenewal != Long.MaxValue) {

Expand All @@ -114,6 +108,9 @@ private[spark] class StandaloneSchedulerBackend(
val renewalTime = (nearestTimeOfNextRenewal - currTime) * 0.75 + currTime
val updateTime = (nearestTimeOfNextRenewal - currTime) * 0.8 + currTime

logInfo(s"Setting credential renewal time: ${renewalTime.toLong} ms,"
+ s" update time ${updateTime.toLong} ms")

conf.set(CREDENTIALS_RENEWAL_TIME, renewalTime.toLong)
conf.set(CREDENTIALS_UPDATE_TIME, updateTime.toLong)
}
Expand All @@ -123,18 +120,13 @@ private[spark] class StandaloneSchedulerBackend(
if (conf.contains(CREDENTIALS_FILE_PATH.key)) {
// If a principal and keytab have been set, use that to create new credentials for executors
// periodically
val hconf = SparkHadoopUtil.get.newConfiguration(conf)
credentialRenewer = credentialManager.credentialRenewer()
credentialRenewer.scheduleLoginFromKeytab()
}
// NOTE we don't need an updater since the above accomplishes it already


//////////////////////////////////////////////////////
//////////////////////////////////////////////////////



super.start()
launcherBackend.connect()

// The endpoint for executors to talk to us
val driverUrl = RpcEndpointAddress(
Expand Down