This is an automated email from the ASF dual-hosted git repository.
yuanzhou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 4ad257f0e3 [CH] Add a comment to explain why the endpoint uses a
single thread (#9257)
4ad257f0e3 is described below
commit 4ad257f0e3f52455329acf31ab360b6ee8e298de
Author: Qian Sun <[email protected]>
AuthorDate: Thu Apr 10 23:58:39 2025 +0800
[CH] Add a comment to explain why the endpoint uses a single thread (#9257)
This PR aims to add a comment to explain why the endpoint uses a single
thread. We don't need to set thread count from SparkContext[1].
[1]
https://github.com/apache/spark/blob/master/core/src/main/scala/org/apache/spark/rpc/RpcEndpoint.scala#L166-L177
---
.../src/main/scala/org/apache/spark/rpc/GlutenDriverEndpoint.scala | 3 ++-
.../src/main/scala/org/apache/spark/rpc/GlutenExecutorEndpoint.scala | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git
a/backends-clickhouse/src/main/scala/org/apache/spark/rpc/GlutenDriverEndpoint.scala
b/backends-clickhouse/src/main/scala/org/apache/spark/rpc/GlutenDriverEndpoint.scala
index be0701ea59..97a6175bdb 100644
---
a/backends-clickhouse/src/main/scala/org/apache/spark/rpc/GlutenDriverEndpoint.scala
+++
b/backends-clickhouse/src/main/scala/org/apache/spark/rpc/GlutenDriverEndpoint.scala
@@ -40,7 +40,8 @@ class GlutenDriverEndpoint extends IsolatedRpcEndpoint with
Logging {
private val driverEndpoint: RpcEndpointRef =
rpcEnv.setupEndpoint(GlutenRpcConstants.GLUTEN_DRIVER_ENDPOINT_NAME, this)
- // TODO(yuan): get thread cnt from spark context
+ // With Apache Spark, endpoint uses a dedicated thread pool for delivering
messages and
+ // ensured to be thread-safe by default.
override def threadCount(): Int = 1
override def receive: PartialFunction[Any, Unit] = {
case GlutenOnExecutionStart(executionId) =>
diff --git
a/backends-clickhouse/src/main/scala/org/apache/spark/rpc/GlutenExecutorEndpoint.scala
b/backends-clickhouse/src/main/scala/org/apache/spark/rpc/GlutenExecutorEndpoint.scala
index b9ae9ff363..47a1fcb884 100644
---
a/backends-clickhouse/src/main/scala/org/apache/spark/rpc/GlutenExecutorEndpoint.scala
+++
b/backends-clickhouse/src/main/scala/org/apache/spark/rpc/GlutenExecutorEndpoint.scala
@@ -40,7 +40,8 @@ class GlutenExecutorEndpoint(val executorId: String, val
conf: SparkConf)
@volatile var driverEndpointRef: RpcEndpointRef = null
rpcEnv.setupEndpoint(GlutenRpcConstants.GLUTEN_EXECUTOR_ENDPOINT_NAME, this)
- // TODO(yuan): get thread cnt from spark context
+ // With Apache Spark, endpoint uses a dedicated thread pool for delivering
messages and
+ // ensured to be thread-safe by default.
override def threadCount(): Int = 1
override def onStart(): Unit = {
rpcEnv
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]