Skip to content

Commit 11cc088

Browse files
committed
retryTimer -> registrationRetryTimer
1 parent 69c348c commit 11cc088

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private[spark] class AppClient(
6060
var master: ActorSelection = null
6161
var alreadyDisconnected = false // To avoid calling listener.disconnected() multiple times
6262
var alreadyDead = false // To avoid calling listener.dead() multiple times
63-
var retryTimer: Option[Cancellable] = None
63+
var registrationRetryTimer: Option[Cancellable] = None
6464

6565
override def preStart() {
6666
context.system.eventStream.subscribe(self, classOf[RemotingLifecycleEvent])
@@ -86,11 +86,11 @@ private[spark] class AppClient(
8686
tryRegisterAllMasters()
8787
import context.dispatcher
8888
var retries = 0
89-
retryTimer = Some {
89+
registrationRetryTimer = Some {
9090
context.system.scheduler.schedule(REGISTRATION_TIMEOUT, REGISTRATION_TIMEOUT) {
9191
retries += 1
9292
if (registered) {
93-
retryTimer.foreach(_.cancel())
93+
registrationRetryTimer.foreach(_.cancel())
9494
} else if (retries >= REGISTRATION_RETRIES) {
9595
logError("All masters are unresponsive! Giving up.")
9696
markDead()
@@ -181,7 +181,7 @@ private[spark] class AppClient(
181181
}
182182

183183
override def postStop() {
184-
retryTimer.foreach(_.cancel())
184+
registrationRetryTimer.foreach(_.cancel())
185185
}
186186

187187
}

core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private[spark] class Worker(
102102
val metricsSystem = MetricsSystem.createMetricsSystem("worker", conf, securityMgr)
103103
val workerSource = new WorkerSource(this)
104104

105-
var retryTimer: Option[Cancellable] = None
105+
var registrationRetryTimer: Option[Cancellable] = None
106106

107107
def coresFree: Int = cores - coresUsed
108108
def memoryFree: Int = memory - memoryUsed
@@ -166,11 +166,11 @@ private[spark] class Worker(
166166
def registerWithMaster() {
167167
tryRegisterAllMasters()
168168
var retries = 0
169-
retryTimer = Some {
169+
registrationRetryTimer = Some {
170170
context.system.scheduler.schedule(REGISTRATION_TIMEOUT, REGISTRATION_TIMEOUT) {
171171
retries += 1
172172
if (registered) {
173-
retryTimer.foreach(_.cancel())
173+
registrationRetryTimer.foreach(_.cancel())
174174
} else if (retries >= REGISTRATION_RETRIES) {
175175
logError("All masters are unresponsive! Giving up.")
176176
System.exit(1)
@@ -347,7 +347,7 @@ private[spark] class Worker(
347347
}
348348

349349
override def postStop() {
350-
retryTimer.foreach(_.cancel())
350+
registrationRetryTimer.foreach(_.cancel())
351351
executors.values.foreach(_.kill())
352352
drivers.values.foreach(_.kill())
353353
webUi.stop()

0 commit comments

Comments
 (0)