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_r248621438
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/ExchangeSuite.scala
##########
@@ -132,4 +136,29 @@ 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 sparkConf = new SparkConf()
+ .set(StaticSQLConf.MAX_BROADCAST_EXCHANGE_THREADNUMBER.key, "1")
+ .set("spark.driver.allowMultipleContexts", "true")
+ val tss = new TestSparkSession(sparkConf)
+ SparkSession.setActiveSession(tss)
+
assert(SQLConf.get.getConf(StaticSQLConf.MAX_BROADCAST_EXCHANGE_THREADNUMBER)
=== 1)
+
+ Future {
+ Thread.sleep(5*1000)
+ }(BroadcastExchangeExec.executionContext)
Review comment:
For style, please take a look for
https://github.com/databricks/scala-style-guide
----------------------------------------------------------------
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]