caneGuy 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_r251292265
########## 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: Actually, i have thought about this method. But i can not call `getMaximumPoolSize` api, then i change the solution. I will search more about this idea ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org