vanzin commented on a change in pull request #26059: [SPARK-29398][core]
Support dedicated thread pools for RPC endpoints.
URL: https://github.com/apache/spark/pull/26059#discussion_r336083143
##########
File path: core/src/main/scala/org/apache/spark/rpc/RpcEndpoint.scala
##########
@@ -146,3 +146,13 @@ private[spark] trait RpcEndpoint {
* [[ThreadSafeRpcEndpoint]] for different messages.
*/
private[spark] trait ThreadSafeRpcEndpoint extends RpcEndpoint
+
+/**
+ * An endpoint that uses a dedicated thread pool for delivering messages.
+ */
+private[spark] trait IsolatedRpcEndpoint extends RpcEndpoint {
+
+ /** How many threads to use for delivering messages. By default, use a
single thread. */
+ def threadCount(): Int = 1
Review comment:
I already updated the comment. `ThreadSafeRpcEndpoint` is irrelevant here.
You may even extend both if you want; but if you do that, either it does
nothing (because the thread pool has a single thread), or you're doing it wrong
(because the thread pool has multiple thread but you just want one).
So it's pointless to mix in both traits.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]