@@ -83,12 +83,12 @@ private[spark] class ExecutorPodsAllocator(
83
83
newlyCreatedExecutors.foreach { case (execId, timeCreated) =>
84
84
val currentTime = clock.getTimeMillis()
85
85
if (currentTime - timeCreated > podCreationTimeout) {
86
- safeLogWarning(" Executor with id {execId} was not detected in the Kubernetes" +
87
- " cluster after {podCreationTimeout} milliseconds despite the fact that a" +
86
+ safeLogWarning(" Executor was not detected in the Kubernetes" +
87
+ " cluster after timeout despite the fact that a" +
88
88
" previous allocation attempt tried to create it. The executor may have been" +
89
89
" deleted but the application missed the deletion event." ,
90
- SafeArg .of(" execId " , execId),
91
- SafeArg .of(" podCreationTimeout " , podCreationTimeout))
90
+ SafeArg .of(" executorId " , execId),
91
+ SafeArg .of(" podCreationTimeoutMs " , podCreationTimeout))
92
92
Utils .tryLogNonFatalError {
93
93
kubernetesClient
94
94
.pods()
@@ -97,10 +97,10 @@ private[spark] class ExecutorPodsAllocator(
97
97
}
98
98
newlyCreatedExecutors -= execId
99
99
} else {
100
- safeLogDebug(" Executor with id {execId} was not found in the Kubernetes cluster since it" +
101
- " was created {timeSinceCreation} milliseconds ago." ,
102
- SafeArg .of(" execId " , execId),
103
- SafeArg .of(" timeSinceCreation " , currentTime - timeCreated))
100
+ safeLogDebug(" Executor was not found in the Kubernetes cluster since it" +
101
+ " was created some time ago." ,
102
+ SafeArg .of(" executorId " , execId),
103
+ SafeArg .of(" timeSinceCreationMs " , currentTime - timeCreated))
104
104
}
105
105
}
106
106
@@ -117,18 +117,18 @@ private[spark] class ExecutorPodsAllocator(
117
117
case _ => false
118
118
}
119
119
val currentTotalExpectedExecutors = totalExpectedExecutors.get
120
- safeLogDebug(" Currently have {currentRunningExecutors} running executors and" +
121
- " {currentPendingExecutors} pending executors. {newlyCreatedExecutors} executors" +
120
+ safeLogDebug(" Currently have running executors and" +
121
+ " pending executors. Newly created executors executors" +
122
122
" have been requested but are pending appearance in the cluster." ,
123
- SafeArg .of(" currentRunningExecutors " , currentRunningExecutors),
124
- SafeArg .of(" currentPendingExecutors " , currentPendingExecutors),
123
+ SafeArg .of(" numCurrentRunningExecutors " , currentRunningExecutors),
124
+ SafeArg .of(" numCurrentPendingExecutors " , currentPendingExecutors),
125
125
SafeArg .of(" newlyCreatedExecutors" , newlyCreatedExecutors))
126
126
if (newlyCreatedExecutors.isEmpty
127
127
&& currentPendingExecutors == 0
128
128
&& currentRunningExecutors < currentTotalExpectedExecutors) {
129
129
val numExecutorsToAllocate = math.min(
130
130
currentTotalExpectedExecutors - currentRunningExecutors, podAllocationSize)
131
- safeLogInfo(" Going to request {numExecutorsToAllocate} executors from Kubernetes." ,
131
+ safeLogInfo(" Going to request executors from Kubernetes." ,
132
132
SafeArg .of(" numExecutorsToAllocate" , numExecutorsToAllocate))
133
133
for ( _ <- 0 until numExecutorsToAllocate) {
134
134
val newExecutorId = EXECUTOR_ID_COUNTER .incrementAndGet()
@@ -145,23 +145,22 @@ private[spark] class ExecutorPodsAllocator(
145
145
.build()
146
146
kubernetesClient.pods().create(podWithAttachedContainer)
147
147
newlyCreatedExecutors(newExecutorId) = clock.getTimeMillis()
148
- safeLogDebug(" Requested executor with id {newExecutorId} from Kubernetes." ,
148
+ safeLogDebug(" Requested executor from Kubernetes." ,
149
149
SafeArg .of(" newExecutorId" , newExecutorId))
150
150
}
151
151
} else if (currentRunningExecutors >= currentTotalExpectedExecutors) {
152
152
// TODO handle edge cases if we end up with more running executors than expected.
153
153
safeLogDebug(" Current number of running executors is equal to the number of requested" +
154
154
" executors. Not scaling up further." )
155
155
} else if (newlyCreatedExecutors.nonEmpty || currentPendingExecutors != 0 ) {
156
- safeLogDebug(" Still waiting for {currentWaitingExecutors}" +
157
- " executors to begin running before requesting for more executors. # of executors in" +
158
- " pending status in the cluster: {currentPendingExecutors}. # of executors that we have" +
159
- " created but we have not observed as being present in the cluster yet:" +
160
- " {newlyCreatedExecutors}." ,
161
- SafeArg .of(" currentWaitingExecutors" ,
156
+ safeLogDebug(" Still waiting for" +
157
+ " executors to begin running before requesting for more executors, including executors" +
158
+ " in pending status in the cluster, and executors that we have" +
159
+ " created but we have not observed as being present in the cluster yet." ,
160
+ SafeArg .of(" numCurrentWaitingExecutors" ,
162
161
newlyCreatedExecutors.size + currentPendingExecutors),
163
- SafeArg .of(" currentPendingExecutors " , currentPendingExecutors),
164
- SafeArg .of(" newlyCreatedExecutors " , newlyCreatedExecutors.size))
162
+ SafeArg .of(" numCurrentPendingExecutors " , currentPendingExecutors),
163
+ SafeArg .of(" numNewlyCreatedExecutors " , newlyCreatedExecutors.size))
165
164
}
166
165
}
167
166
}
0 commit comments