Skip to content

Commit 5677557

Browse files
zsxwingrxin
authored andcommitted
[SPARK-5124][Core] Move StopCoordinator to the receive method since it does not require a reply
Hotfix for #4588 cc rxin Author: zsxwing <[email protected]> Closes #5283 from zsxwing/hotfix and squashes the following commits: cf3e5a7 [zsxwing] Move StopCoordinator to the receive method since it does not require a reply
1 parent b8ff2bc commit 5677557

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

core/src/main/scala/org/apache/spark/scheduler/OutputCommitCoordinator.scala

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,16 @@ private[spark] object OutputCommitCoordinator {
156156
override val rpcEnv: RpcEnv, outputCommitCoordinator: OutputCommitCoordinator)
157157
extends RpcEndpoint with Logging {
158158

159+
override def receive: PartialFunction[Any, Unit] = {
160+
case StopCoordinator =>
161+
logInfo("OutputCommitCoordinator stopped!")
162+
stop()
163+
}
164+
159165
override def receiveAndReply(context: RpcCallContext): PartialFunction[Any, Unit] = {
160166
case AskPermissionToCommitOutput(stage, partition, taskAttempt) =>
161167
context.reply(
162168
outputCommitCoordinator.handleAskPermissionToCommit(stage, partition, taskAttempt))
163-
case StopCoordinator =>
164-
logInfo("OutputCommitCoordinator stopped!")
165-
context.reply(true)
166-
stop()
167169
}
168170
}
169171
}

0 commit comments

Comments
 (0)