ulysses-you commented on a change in pull request #25333: [SPARK-28597][SS] Add 
config to retry spark streaming's meta log when it met error
URL: https://github.com/apache/spark/pull/25333#discussion_r311023555
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/HDFSMetadataLog.scala
 ##########
 @@ -133,7 +140,12 @@ class HDFSMetadataLog[T <: AnyRef : 
ClassTag](sparkSession: SparkSession, path:
           s"Multiple streaming queries are concurrently using $path", e)
       case e: Throwable =>
         output.cancel()
-        throw e
+        if (retryCount > metaDataNumRetries) {
+          throw new IOException(
+            s"Failed to write meta data log after retry $metaDataNumRetries 
count", e)
+        } else {
+          writeBatchToFileWithRetries(metadata, path, retryCount + 1)
 
 Review comment:
   Oh, I got it too.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to