You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/02/25 00:53:56 UTC

[GitHub] [spark] warrenzhu25 commented on a change in pull request #30175: [SPARK-33274][SS] Stop query in cp mode when total cores less than total kafka partition

warrenzhu25 commented on a change in pull request #30175:
URL: https://github.com/apache/spark/pull/30175#discussion_r582412333



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/continuous/EpochCoordinator.scala
##########
@@ -267,4 +268,23 @@ private[continuous] class EpochCoordinator(
       queryWritesStopped = true
       context.reply(())
   }
+
+  private def checkTotalCores(): Unit = {
+    val INSTRUCTION_FOR_FEWER_CORES =
+      """
+        |Total %s (kafka partitions) * %s (cpus per task) = %s needed,
+        |but only have %s (executors) * %s (cores per executor) = %s (total cores).
+        |Please increase total number of executor cores to at least %s.
+    """.stripMargin
+    val numExecutors = session.conf.get("spark.executor.instances", "1").toInt

Review comment:
       Thanks for suggestions. Any idea how to get BlockManagerMaster instance here?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org