Skip to content

Commit 7cdd95e

Browse files
committed
Add docs for RpcEnv
1 parent 51e6667 commit 7cdd95e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/src/main/scala/org/apache/spark/rpc/RpcEnv.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,11 @@ import org.apache.spark.{SparkException, SecurityManager, SparkConf}
2727
import org.apache.spark.util.Utils
2828

2929
/**
30-
* An RPC environment.
30+
* An RPC environment. [[RpcEndpoint]]s need to register itself with a name to [[RpcEnv]] to
31+
* receives messages. Then [[RpcEnv]] will process messages sent from [[RpcEndpointRef]] or remote
32+
* nodes, and deliver them to corresponding [[RpcEndpoint]]s.
33+
*
34+
* [[RpcEnv]] also provides some methods to retrieve [[RpcEndpointRef]]s given name or uri.
3135
*/
3236
private[spark] trait RpcEnv {
3337

@@ -189,7 +193,7 @@ private[spark] trait RpcEndpoint {
189193
}
190194

191195
/**
192-
* Process messages from [[RpcEndpointRef.sendWithReply]] or [[RpcCallContext.replyWithSender)]]
196+
* Process messages from [[RpcEndpointRef.sendWithReply]]
193197
*/
194198
def receiveAndReply(context: RpcCallContext): PartialFunction[Any, Unit] = {
195199
case _ => context.sendFailure(new SparkException(self + " won't reply anything"))

0 commit comments

Comments
 (0)