-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-6602][Core] Replace direct use of Akka with Spark RPC interface - part 1 #5268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… to use RpcEndpoint
|
Test build #29406 has finished for PR 5268 at commit
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to send some reply here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh ic it is done in doAsync. Is this ok with the RPC contract that we are replying from a different thread?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. RpcCallContext should be thread-safe and can be called in another thread. It's a very common usage. I will add docs about it.
|
I took a very quick look at this. @zsxwing If there are any tricky parts, can you point them out on this pull request to make it easier to review? |
|
Test build #29481 has finished for PR 5268 at commit
|
|
There are two things that's worth to review carefully: Calling One possible improvement is using a special trait, such as If a message is passed to |
I updated the contract of |
|
I like the idea of ThreadSafeRpcEndpoint. I need to think a little bit more about send/sendWithReply. I do find it error prone as is. |
|
The changes mostly lgtm. Let's add the ThreadSafeRpcEndpoint interface for differentiation. |
Conflicts: core/src/main/scala/org/apache/spark/HeartbeatReceiver.scala core/src/main/scala/org/apache/spark/SparkContext.scala core/src/main/scala/org/apache/spark/util/Utils.scala yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
|
Test FAILed. |
|
Merging this in master. Thanks. |
This PR replaced the following
Actors toRpcEndpoint:This is the first PR. I will split the work of SPARK-6602 to several PRs for code review.