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/07/27 08:42:20 UTC

[GitHub] [spark] dgd-contributor opened a new pull request #33534: [SPARK-36099][CORE] Grouping exception in core/util

dgd-contributor opened a new pull request #33534:
URL: https://github.com/apache/spark/pull/33534


   ### What changes were proposed in this pull request?
   This PR group exception messages in core/src/main/scala/org/apache/spark/util
   
   ### Why are the changes needed?
   It will largely help with standardization of error messages and its maintenance.
   
   ### Does this PR introduce _any_ user-facing change?
   No. Error messages remain unchanged.
   
   ### How was this patch tested?
   No new tests - pass all original tests to make sure it doesn't break any existing behavior.


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


[GitHub] [spark] AmplabJenkins commented on pull request #33534: [SPARK-36099][CORE] Grouping exception in core/util

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #33534:
URL: https://github.com/apache/spark/pull/33534#issuecomment-887354962


   Can one of the admins verify this patch?


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


[GitHub] [spark] dgd-contributor commented on pull request #33534: [SPARK-36099][CORE] Grouping exception in core/util

Posted by GitBox <gi...@apache.org>.
dgd-contributor commented on pull request #33534:
URL: https://github.com/apache/spark/pull/33534#issuecomment-935231208


   As we and @HyukjinKwon discussed contributing by sharing accounts, we will close this PR, Please take a look at this PR https://github.com/apache/spark/pull/34188


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


[GitHub] [spark] Shockang edited a comment on pull request #33534: [SPARK-36099][CORE] Grouping exception in core/util

Posted by GitBox <gi...@apache.org>.
Shockang edited a comment on pull request #33534:
URL: https://github.com/apache/spark/pull/33534#issuecomment-887598380


   @dgd-contributor https://github.com/Shockang/spark/blob/SPARK-36099/core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala


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


[GitHub] [spark] allisonwang-db commented on a change in pull request #33534: [SPARK-36099][CORE] Grouping exception in core/util

Posted by GitBox <gi...@apache.org>.
allisonwang-db commented on a change in pull request #33534:
URL: https://github.com/apache/spark/pull/33534#discussion_r691652797



##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -141,4 +139,161 @@ object SparkCoreErrors {
   def mustSpecifyCheckpointDirError(): Throwable = {
     new SparkException("Checkpoint dir must be specified.")
   }
+
+  def noSuchElementError(): Throwable = {
+    new NoSuchElementException()
+  }
+
+  def endOfIteratorError(): Throwable = {
+    new NoSuchElementException("End of iterator")
+  }
+
+  def medianHeapIsEmptyError(): Throwable = {
+    new NoSuchElementException("MedianHeap is empty.")
+  }
+
+  def indexOutOfBoundsError(): Throwable = {
+    new IndexOutOfBoundsException
+  }
+
+  def unsupportedOperationError(message: String): Throwable = {
+    new UnsupportedOperationException(message)
+  }
+
+  def bufferMoreThanArrayMaxElementsError(arrayMax: Int): Throwable = {
+    new UnsupportedOperationException(s"Can't grow buffer past $arrayMax elements")
+  }
+
+  def shouldNotReachHereError(): Throwable = {
+    new RuntimeException("Should never reach here.")
+  }
+
+  def bufferSizeExceedsMaximumArraySizeError(size: Long): Throwable = {
+    new UnsupportedOperationException(
+      s"cannot call toArray because buffer size ($size bytes) exceeds maximum array size")
+  }
+
+  def rootDirDoesNotExistError(rootDir: String): Throwable = {
+    new RuntimeException(s"${rootDir} does not exist." +
+      s" Please create this dir in order to persist driver logs")
+  }
+
+  def cloneFunctionIsNotImplementedError(): Throwable = {
+    new UnsupportedOperationException("clone() is not implemented.")
+  }
+
+  def accumulatorNotRegisteredError(): Throwable = {
+    new UnsupportedOperationException("Accumulator must be registered before send to executor")
+  }
+
+  def cannotMergeError(left: String, right: String): Throwable = {
+    new UnsupportedOperationException(s"Cannot merge $left with $right")
+  }
+
+  def taskNotSerializableError(ex: Exception): Throwable = {
+    new SparkException("Task not serializable", ex)
+  }
+
+  def returnStatementInClosureError(): Throwable = {
+    new ReturnStatementInClosureException
+  }
+
+  def cannotResolvesAmbiguouslyBaseError(base: String, resolved: String): Throwable = {
+    new SparkException(s"$base resolves ambiguously to multiple files: $resolved")
+  }
+
+  def keyMustNotBeNullError(): Throwable = {
+    new NullPointerException("key must not be null")
+  }
+
+  def interruptedError(): Throwable = {
+    new InterruptedException()
+  }
+
+  def endOfStreamError(): Throwable = {
+    new NoSuchElementException("End of stream")
+  }
+
+  def endOfFileError(): Throwable = {
+    new EOFException("End of file before fully reading buffer")
+  }
+
+  def couldNotWriteBufferToOutputSteamError(): Throwable = {

Review comment:
       cannotWriteBufferToOutputSteamError

##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -141,4 +139,161 @@ object SparkCoreErrors {
   def mustSpecifyCheckpointDirError(): Throwable = {
     new SparkException("Checkpoint dir must be specified.")
   }
+
+  def noSuchElementError(): Throwable = {
+    new NoSuchElementException()
+  }
+
+  def endOfIteratorError(): Throwable = {
+    new NoSuchElementException("End of iterator")
+  }
+
+  def medianHeapIsEmptyError(): Throwable = {
+    new NoSuchElementException("MedianHeap is empty.")
+  }
+
+  def indexOutOfBoundsError(): Throwable = {
+    new IndexOutOfBoundsException
+  }
+
+  def unsupportedOperationError(message: String): Throwable = {
+    new UnsupportedOperationException(message)
+  }
+
+  def bufferMoreThanArrayMaxElementsError(arrayMax: Int): Throwable = {
+    new UnsupportedOperationException(s"Can't grow buffer past $arrayMax elements")
+  }
+
+  def shouldNotReachHereError(): Throwable = {
+    new RuntimeException("Should never reach here.")
+  }
+
+  def bufferSizeExceedsMaximumArraySizeError(size: Long): Throwable = {
+    new UnsupportedOperationException(
+      s"cannot call toArray because buffer size ($size bytes) exceeds maximum array size")
+  }
+
+  def rootDirDoesNotExistError(rootDir: String): Throwable = {
+    new RuntimeException(s"${rootDir} does not exist." +
+      s" Please create this dir in order to persist driver logs")
+  }
+
+  def cloneFunctionIsNotImplementedError(): Throwable = {
+    new UnsupportedOperationException("clone() is not implemented.")
+  }
+
+  def accumulatorNotRegisteredError(): Throwable = {
+    new UnsupportedOperationException("Accumulator must be registered before send to executor")
+  }
+
+  def cannotMergeError(left: String, right: String): Throwable = {
+    new UnsupportedOperationException(s"Cannot merge $left with $right")
+  }
+
+  def taskNotSerializableError(ex: Exception): Throwable = {
+    new SparkException("Task not serializable", ex)
+  }
+
+  def returnStatementInClosureError(): Throwable = {
+    new ReturnStatementInClosureException
+  }
+
+  def cannotResolvesAmbiguouslyBaseError(base: String, resolved: String): Throwable = {

Review comment:
       cannotResolveToMultipleFilesError

##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -141,4 +139,161 @@ object SparkCoreErrors {
   def mustSpecifyCheckpointDirError(): Throwable = {
     new SparkException("Checkpoint dir must be specified.")
   }
+
+  def noSuchElementError(): Throwable = {
+    new NoSuchElementException()
+  }
+
+  def endOfIteratorError(): Throwable = {
+    new NoSuchElementException("End of iterator")
+  }
+
+  def medianHeapIsEmptyError(): Throwable = {
+    new NoSuchElementException("MedianHeap is empty.")
+  }
+
+  def indexOutOfBoundsError(): Throwable = {
+    new IndexOutOfBoundsException
+  }
+
+  def unsupportedOperationError(message: String): Throwable = {
+    new UnsupportedOperationException(message)
+  }
+
+  def bufferMoreThanArrayMaxElementsError(arrayMax: Int): Throwable = {
+    new UnsupportedOperationException(s"Can't grow buffer past $arrayMax elements")
+  }
+
+  def shouldNotReachHereError(): Throwable = {
+    new RuntimeException("Should never reach here.")
+  }
+
+  def bufferSizeExceedsMaximumArraySizeError(size: Long): Throwable = {
+    new UnsupportedOperationException(
+      s"cannot call toArray because buffer size ($size bytes) exceeds maximum array size")
+  }
+
+  def rootDirDoesNotExistError(rootDir: String): Throwable = {
+    new RuntimeException(s"${rootDir} does not exist." +
+      s" Please create this dir in order to persist driver logs")
+  }
+
+  def cloneFunctionIsNotImplementedError(): Throwable = {
+    new UnsupportedOperationException("clone() is not implemented.")
+  }
+
+  def accumulatorNotRegisteredError(): Throwable = {
+    new UnsupportedOperationException("Accumulator must be registered before send to executor")
+  }
+
+  def cannotMergeError(left: String, right: String): Throwable = {
+    new UnsupportedOperationException(s"Cannot merge $left with $right")
+  }
+
+  def taskNotSerializableError(ex: Exception): Throwable = {
+    new SparkException("Task not serializable", ex)
+  }
+
+  def returnStatementInClosureError(): Throwable = {
+    new ReturnStatementInClosureException
+  }
+
+  def cannotResolvesAmbiguouslyBaseError(base: String, resolved: String): Throwable = {
+    new SparkException(s"$base resolves ambiguously to multiple files: $resolved")
+  }
+
+  def keyMustNotBeNullError(): Throwable = {
+    new NullPointerException("key must not be null")
+  }
+
+  def interruptedError(): Throwable = {
+    new InterruptedException()
+  }
+
+  def endOfStreamError(): Throwable = {
+    new NoSuchElementException("End of stream")
+  }
+
+  def endOfFileError(): Throwable = {
+    new EOFException("End of file before fully reading buffer")
+  }
+
+  def couldNotWriteBufferToOutputSteamError(): Throwable = {
+    new IOException("Could not fully write buffer to output stream")
+  }
+
+  def executorAlreadyShutdownError(): Throwable = {
+    new RejectedExecutionException("Executor already shutdown")
+  }
+
+  def exceptionThrownInAwaitResultError(t: Throwable): Throwable = {
+    new SparkException("Exception thrown in awaitResult: ", t)
+  }
+
+  def failedToCreateTempDirectoryError(root: String, maxAttempts: Int): Throwable = {

Review comment:
       failToCreateTempDirectoryError

##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -141,4 +139,161 @@ object SparkCoreErrors {
   def mustSpecifyCheckpointDirError(): Throwable = {
     new SparkException("Checkpoint dir must be specified.")
   }
+
+  def noSuchElementError(): Throwable = {
+    new NoSuchElementException()
+  }
+
+  def endOfIteratorError(): Throwable = {
+    new NoSuchElementException("End of iterator")
+  }
+
+  def medianHeapIsEmptyError(): Throwable = {
+    new NoSuchElementException("MedianHeap is empty.")
+  }
+
+  def indexOutOfBoundsError(): Throwable = {
+    new IndexOutOfBoundsException
+  }
+
+  def unsupportedOperationError(message: String): Throwable = {
+    new UnsupportedOperationException(message)
+  }
+
+  def bufferMoreThanArrayMaxElementsError(arrayMax: Int): Throwable = {
+    new UnsupportedOperationException(s"Can't grow buffer past $arrayMax elements")
+  }
+
+  def shouldNotReachHereError(): Throwable = {
+    new RuntimeException("Should never reach here.")
+  }
+
+  def bufferSizeExceedsMaximumArraySizeError(size: Long): Throwable = {
+    new UnsupportedOperationException(
+      s"cannot call toArray because buffer size ($size bytes) exceeds maximum array size")
+  }
+
+  def rootDirDoesNotExistError(rootDir: String): Throwable = {
+    new RuntimeException(s"${rootDir} does not exist." +
+      s" Please create this dir in order to persist driver logs")
+  }
+
+  def cloneFunctionIsNotImplementedError(): Throwable = {
+    new UnsupportedOperationException("clone() is not implemented.")
+  }
+
+  def accumulatorNotRegisteredError(): Throwable = {
+    new UnsupportedOperationException("Accumulator must be registered before send to executor")
+  }
+
+  def cannotMergeError(left: String, right: String): Throwable = {
+    new UnsupportedOperationException(s"Cannot merge $left with $right")
+  }
+
+  def taskNotSerializableError(ex: Exception): Throwable = {
+    new SparkException("Task not serializable", ex)
+  }
+
+  def returnStatementInClosureError(): Throwable = {
+    new ReturnStatementInClosureException
+  }
+
+  def cannotResolvesAmbiguouslyBaseError(base: String, resolved: String): Throwable = {
+    new SparkException(s"$base resolves ambiguously to multiple files: $resolved")
+  }
+
+  def keyMustNotBeNullError(): Throwable = {
+    new NullPointerException("key must not be null")
+  }
+
+  def interruptedError(): Throwable = {
+    new InterruptedException()
+  }
+
+  def endOfStreamError(): Throwable = {
+    new NoSuchElementException("End of stream")
+  }
+
+  def endOfFileError(): Throwable = {
+    new EOFException("End of file before fully reading buffer")
+  }
+
+  def couldNotWriteBufferToOutputSteamError(): Throwable = {
+    new IOException("Could not fully write buffer to output stream")
+  }
+
+  def executorAlreadyShutdownError(): Throwable = {
+    new RejectedExecutionException("Executor already shutdown")
+  }
+
+  def exceptionThrownInAwaitResultError(t: Throwable): Throwable = {
+    new SparkException("Exception thrown in awaitResult: ", t)
+  }
+
+  def failedToCreateTempDirectoryError(root: String, maxAttempts: Int): Throwable = {
+    new IOException("Failed to create a temp directory (under " + root + ") after " +
+      maxAttempts + " attempts!")
+  }
+
+  def failedToDeleteFileError(
+      destFilePath: String,
+      sourceFilePath: String): Throwable = {
+    new SparkException(s"Failed to delete $destFilePath while attempting to " +
+      s"overwrite it with $sourceFilePath")
+  }
+
+  def fileExistAndNotMatchContentsError(destFile: File, url: String): Throwable = {
+    new SparkException(s"File $destFile exists and does not match contents of $url")
+  }
+
+  def failToCreateDirectoryError(dest: String): Throwable = {
+    new IOException(s"Failed to create directory $dest")
+  }
+
+  def failToGetTempDirectoryError(dir: String): Throwable = {
+    new IOException(s"Failed to get a temp directory under [$dir].")
+  }
+
+  def yarnLocalDirsCannotBeEmptyError(): Throwable = {
+    new Exception("Yarn Local dirs can't be empty")
+  }
+
+  def processExistedError(command: Seq[String], exitCode: Int): Throwable = {

Review comment:
       processExitedError

##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -141,4 +139,161 @@ object SparkCoreErrors {
   def mustSpecifyCheckpointDirError(): Throwable = {
     new SparkException("Checkpoint dir must be specified.")
   }
+
+  def noSuchElementError(): Throwable = {
+    new NoSuchElementException()
+  }
+
+  def endOfIteratorError(): Throwable = {
+    new NoSuchElementException("End of iterator")
+  }
+
+  def medianHeapIsEmptyError(): Throwable = {
+    new NoSuchElementException("MedianHeap is empty.")
+  }
+
+  def indexOutOfBoundsError(): Throwable = {
+    new IndexOutOfBoundsException
+  }
+
+  def unsupportedOperationError(message: String): Throwable = {
+    new UnsupportedOperationException(message)
+  }
+
+  def bufferMoreThanArrayMaxElementsError(arrayMax: Int): Throwable = {
+    new UnsupportedOperationException(s"Can't grow buffer past $arrayMax elements")
+  }
+
+  def shouldNotReachHereError(): Throwable = {
+    new RuntimeException("Should never reach here.")
+  }
+
+  def bufferSizeExceedsMaximumArraySizeError(size: Long): Throwable = {
+    new UnsupportedOperationException(
+      s"cannot call toArray because buffer size ($size bytes) exceeds maximum array size")
+  }
+
+  def rootDirDoesNotExistError(rootDir: String): Throwable = {
+    new RuntimeException(s"${rootDir} does not exist." +
+      s" Please create this dir in order to persist driver logs")
+  }
+
+  def cloneFunctionIsNotImplementedError(): Throwable = {
+    new UnsupportedOperationException("clone() is not implemented.")
+  }
+
+  def accumulatorNotRegisteredError(): Throwable = {
+    new UnsupportedOperationException("Accumulator must be registered before send to executor")
+  }
+
+  def cannotMergeError(left: String, right: String): Throwable = {
+    new UnsupportedOperationException(s"Cannot merge $left with $right")
+  }
+
+  def taskNotSerializableError(ex: Exception): Throwable = {
+    new SparkException("Task not serializable", ex)
+  }
+
+  def returnStatementInClosureError(): Throwable = {
+    new ReturnStatementInClosureException
+  }
+
+  def cannotResolvesAmbiguouslyBaseError(base: String, resolved: String): Throwable = {
+    new SparkException(s"$base resolves ambiguously to multiple files: $resolved")
+  }
+
+  def keyMustNotBeNullError(): Throwable = {
+    new NullPointerException("key must not be null")
+  }
+
+  def interruptedError(): Throwable = {
+    new InterruptedException()
+  }
+
+  def endOfStreamError(): Throwable = {
+    new NoSuchElementException("End of stream")
+  }
+
+  def endOfFileError(): Throwable = {
+    new EOFException("End of file before fully reading buffer")
+  }
+
+  def couldNotWriteBufferToOutputSteamError(): Throwable = {
+    new IOException("Could not fully write buffer to output stream")
+  }
+
+  def executorAlreadyShutdownError(): Throwable = {
+    new RejectedExecutionException("Executor already shutdown")
+  }
+
+  def exceptionThrownInAwaitResultError(t: Throwable): Throwable = {
+    new SparkException("Exception thrown in awaitResult: ", t)
+  }
+
+  def failedToCreateTempDirectoryError(root: String, maxAttempts: Int): Throwable = {
+    new IOException("Failed to create a temp directory (under " + root + ") after " +
+      maxAttempts + " attempts!")
+  }
+
+  def failedToDeleteFileError(

Review comment:
       failToDeleteFileError

##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -141,4 +139,161 @@ object SparkCoreErrors {
   def mustSpecifyCheckpointDirError(): Throwable = {
     new SparkException("Checkpoint dir must be specified.")
   }
+
+  def noSuchElementError(): Throwable = {
+    new NoSuchElementException()
+  }
+
+  def endOfIteratorError(): Throwable = {
+    new NoSuchElementException("End of iterator")
+  }
+
+  def medianHeapIsEmptyError(): Throwable = {
+    new NoSuchElementException("MedianHeap is empty.")
+  }
+
+  def indexOutOfBoundsError(): Throwable = {
+    new IndexOutOfBoundsException
+  }
+
+  def unsupportedOperationError(message: String): Throwable = {
+    new UnsupportedOperationException(message)
+  }
+
+  def bufferMoreThanArrayMaxElementsError(arrayMax: Int): Throwable = {
+    new UnsupportedOperationException(s"Can't grow buffer past $arrayMax elements")
+  }
+
+  def shouldNotReachHereError(): Throwable = {
+    new RuntimeException("Should never reach here.")
+  }
+
+  def bufferSizeExceedsMaximumArraySizeError(size: Long): Throwable = {
+    new UnsupportedOperationException(
+      s"cannot call toArray because buffer size ($size bytes) exceeds maximum array size")
+  }
+
+  def rootDirDoesNotExistError(rootDir: String): Throwable = {
+    new RuntimeException(s"${rootDir} does not exist." +
+      s" Please create this dir in order to persist driver logs")
+  }
+
+  def cloneFunctionIsNotImplementedError(): Throwable = {
+    new UnsupportedOperationException("clone() is not implemented.")
+  }
+
+  def accumulatorNotRegisteredError(): Throwable = {
+    new UnsupportedOperationException("Accumulator must be registered before send to executor")
+  }
+
+  def cannotMergeError(left: String, right: String): Throwable = {
+    new UnsupportedOperationException(s"Cannot merge $left with $right")
+  }
+
+  def taskNotSerializableError(ex: Exception): Throwable = {
+    new SparkException("Task not serializable", ex)
+  }
+
+  def returnStatementInClosureError(): Throwable = {
+    new ReturnStatementInClosureException
+  }
+
+  def cannotResolvesAmbiguouslyBaseError(base: String, resolved: String): Throwable = {
+    new SparkException(s"$base resolves ambiguously to multiple files: $resolved")
+  }
+
+  def keyMustNotBeNullError(): Throwable = {

Review comment:
       keyIsNullError

##########
File path: core/src/main/scala/org/apache/spark/errors/SparkCoreErrors.scala
##########
@@ -141,4 +139,161 @@ object SparkCoreErrors {
   def mustSpecifyCheckpointDirError(): Throwable = {
     new SparkException("Checkpoint dir must be specified.")
   }
+
+  def noSuchElementError(): Throwable = {
+    new NoSuchElementException()
+  }
+
+  def endOfIteratorError(): Throwable = {
+    new NoSuchElementException("End of iterator")
+  }
+
+  def medianHeapIsEmptyError(): Throwable = {
+    new NoSuchElementException("MedianHeap is empty.")
+  }
+
+  def indexOutOfBoundsError(): Throwable = {
+    new IndexOutOfBoundsException
+  }
+
+  def unsupportedOperationError(message: String): Throwable = {
+    new UnsupportedOperationException(message)
+  }
+
+  def bufferMoreThanArrayMaxElementsError(arrayMax: Int): Throwable = {
+    new UnsupportedOperationException(s"Can't grow buffer past $arrayMax elements")
+  }
+
+  def shouldNotReachHereError(): Throwable = {
+    new RuntimeException("Should never reach here.")
+  }
+
+  def bufferSizeExceedsMaximumArraySizeError(size: Long): Throwable = {
+    new UnsupportedOperationException(
+      s"cannot call toArray because buffer size ($size bytes) exceeds maximum array size")
+  }
+
+  def rootDirDoesNotExistError(rootDir: String): Throwable = {
+    new RuntimeException(s"${rootDir} does not exist." +
+      s" Please create this dir in order to persist driver logs")
+  }
+
+  def cloneFunctionIsNotImplementedError(): Throwable = {
+    new UnsupportedOperationException("clone() is not implemented.")
+  }
+
+  def accumulatorNotRegisteredError(): Throwable = {
+    new UnsupportedOperationException("Accumulator must be registered before send to executor")
+  }
+
+  def cannotMergeError(left: String, right: String): Throwable = {
+    new UnsupportedOperationException(s"Cannot merge $left with $right")
+  }
+
+  def taskNotSerializableError(ex: Exception): Throwable = {
+    new SparkException("Task not serializable", ex)
+  }
+
+  def returnStatementInClosureError(): Throwable = {
+    new ReturnStatementInClosureException
+  }
+
+  def cannotResolvesAmbiguouslyBaseError(base: String, resolved: String): Throwable = {
+    new SparkException(s"$base resolves ambiguously to multiple files: $resolved")
+  }
+
+  def keyMustNotBeNullError(): Throwable = {
+    new NullPointerException("key must not be null")
+  }
+
+  def interruptedError(): Throwable = {
+    new InterruptedException()
+  }
+
+  def endOfStreamError(): Throwable = {
+    new NoSuchElementException("End of stream")
+  }
+
+  def endOfFileError(): Throwable = {
+    new EOFException("End of file before fully reading buffer")
+  }
+
+  def couldNotWriteBufferToOutputSteamError(): Throwable = {
+    new IOException("Could not fully write buffer to output stream")
+  }
+
+  def executorAlreadyShutdownError(): Throwable = {
+    new RejectedExecutionException("Executor already shutdown")
+  }
+
+  def exceptionThrownInAwaitResultError(t: Throwable): Throwable = {
+    new SparkException("Exception thrown in awaitResult: ", t)
+  }
+
+  def failedToCreateTempDirectoryError(root: String, maxAttempts: Int): Throwable = {
+    new IOException("Failed to create a temp directory (under " + root + ") after " +
+      maxAttempts + " attempts!")
+  }
+
+  def failedToDeleteFileError(
+      destFilePath: String,
+      sourceFilePath: String): Throwable = {
+    new SparkException(s"Failed to delete $destFilePath while attempting to " +
+      s"overwrite it with $sourceFilePath")
+  }
+
+  def fileExistAndNotMatchContentsError(destFile: File, url: String): Throwable = {
+    new SparkException(s"File $destFile exists and does not match contents of $url")
+  }
+
+  def failToCreateDirectoryError(dest: String): Throwable = {
+    new IOException(s"Failed to create directory $dest")
+  }
+
+  def failToGetTempDirectoryError(dir: String): Throwable = {
+    new IOException(s"Failed to get a temp directory under [$dir].")
+  }
+
+  def yarnLocalDirsCannotBeEmptyError(): Throwable = {
+    new Exception("Yarn Local dirs can't be empty")
+  }
+
+  def processExistedError(command: Seq[String], exitCode: Int): Throwable = {
+    new SparkException(s"Process $command exited with code $exitCode")
+  }
+
+  def ioError(e: Throwable): Throwable = {
+    new IOException(e)
+  }
+
+  def sourceMustBeAbsoluteError(): Throwable = {
+    new IOException("Source must be absolute")
+  }
+
+  def destinationMustBeRelativeError(): Throwable = {
+    new IOException("Destination must be relative")
+  }
+
+  def failToLoadSparkPropertiesError(filename: String, e: Throwable): Throwable = {
+    new SparkException(s"Failed when loading Spark properties from $filename", e)
+  }
+
+  def failedToStartServiceOnPortError(serviceString: String, startPort: Int): Throwable = {

Review comment:
       failToStartServiceOnPortError




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


[GitHub] [spark] Shockang commented on pull request #33534: [SPARK-36099][CORE] Grouping exception in core/util

Posted by GitBox <gi...@apache.org>.
Shockang commented on pull request #33534:
URL: https://github.com/apache/spark/pull/33534#issuecomment-887598380


   @dgd-contributor https://github.com/Shockang/spark/tree/SPARK-36099


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


[GitHub] [spark] dgd-contributor closed pull request #33534: [SPARK-36099][CORE] Grouping exception in core/util

Posted by GitBox <gi...@apache.org>.
dgd-contributor closed pull request #33534:
URL: https://github.com/apache/spark/pull/33534


   


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