warrenzhu25 commented on a change in pull request #30175:
URL: https://github.com/apache/spark/pull/30175#discussion_r565566452
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/streaming/continuous/ContinuousSuite.scala
##########
@@ -37,7 +37,9 @@ class ContinuousSuiteBase extends StreamTest {
new SparkContext(
"local[10]",
"continuous-stream-test-sql-context",
- sparkConf.set("spark.sql.testkey", "true")))
+ sparkConf.set("spark.sql.testkey", "true")
+ .set("spark.executor.cores", "10")
+ ))
Review comment:
Added test case
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/continuous/EpochCoordinator.scala
##########
@@ -267,4 +275,16 @@ private[continuous] class EpochCoordinator(
queryWritesStopped = true
context.reply(())
}
+
+ private def checkTotalCores(): Unit = {
+ val numExecutors = session.conf.get("spark.executor.instances", "1").toInt
+ val coresPerExecutor = session.conf.get("spark.executor.cores", "1").toInt
+ val totalCores = numExecutors * coresPerExecutor
+ logDebug(s"Check total cores $totalCores and kafka partition number
$numReaderPartitions")
Review comment:
Updated.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]