HyukjinKwon commented on a change in pull request #23519: [SPARK-26601][SQL]
Make broadcast-exchange thread pool configurable
URL: https://github.com/apache/spark/pull/23519#discussion_r249317752
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/ExchangeSuite.scala
##########
@@ -132,4 +135,33 @@ class ExchangeSuite extends SparkPlanTest with
SharedSQLContext {
val projection2 = cached.select("_1", "_3").queryExecution.executedPlan
assert(!projection1.sameResult(projection2))
}
+
+ test("SPARK-26601: Make broadcast-exchange thread pool configurable") {
+ val previousNumber = SparkSession.getActiveSession.get.sparkContext.conf
+ .get(StaticSQLConf.MAX_BROADCAST_EXCHANGE_THREADNUMBER)
+
+ SparkSession.getActiveSession.get.sparkContext.conf.
+ set(StaticSQLConf.MAX_BROADCAST_EXCHANGE_THREADNUMBER, 1)
+
assert(SQLConf.get.getConf(StaticSQLConf.MAX_BROADCAST_EXCHANGE_THREADNUMBER)
=== 1)
+
+ Future {
+ Thread.sleep(5*1000)
+ } (BroadcastExchangeExec.executionContext)
+
+ val f = Future {} (BroadcastExchangeExec.executionContext)
Review comment:
You don't have to test Java's thread executors. Can you just check if
`BroadcastExchangeExec.executionContext .getMaximumPoolSize` is as configured?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]