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/09/10 17:15:57 UTC

[GitHub] [spark] mridulm commented on a change in pull request #33536: [SPARK-36101][CORE] Grouping exception in core/api

mridulm commented on a change in pull request #33536:
URL: https://github.com/apache/spark/pull/33536#discussion_r706339325



##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -198,12 +213,12 @@ object SparkCoreErrors {
     new SparkException(s"Unrecognized $schedulerModeProperty: $schedulingModeConf")
   }
 
-  def failResourceOffersForBarrierStageError(errorMsg: String): Throwable = {
+  def sparkError(errorMsg: String): Throwable = {
     new SparkException(errorMsg)
   }
 
-  def markExecutorAsFailedError(errorMsg: String): Throwable = {
-    new SparkException(errorMsg)
+  def markExecutorAsFailedError(): Throwable = {
+    new SparkException("taskIdToTaskSetManager.contains(tid) <=> taskIdToExecutorId.contains(tid)")
   }

Review comment:
       Can we remove this method ? It is very specific to that codepath.

##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -31,6 +31,25 @@ import org.apache.spark.storage.{BlockId, BlockManagerId, BlockNotFoundException
  * Object for grouping error messages from (most) exceptions thrown during query execution.
  */
 object SparkCoreErrors {
+  def unexpectedPy4JServerError(other: Object): Throwable = {
+    new RuntimeException(s"Unexpected Py4J server ${other.getClass}")
+  }
+
+  def eofExceptionWhileReadPortNumberError(
+      daemonModule: String,
+      daemonExitValue: Option[Int] = null): Throwable = {
+    var msg = s"EOFException occurred while reading the port number from $daemonModule's" +
+      s" stdout"
+    if (daemonExitValue != null) {

Review comment:
       Should be `daemonExitValue.isDefined`. Could be reformulated as
   `val msg = s" ... stdout" + daemonExitValue.map(v => s" and terminated with code: $v.").getOrElse("")`
   




-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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