MaxGekk commented on code in PR #41387:
URL: https://github.com/apache/spark/pull/41387#discussion_r1210754400


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/HDFSMetadataLogSuite.scala:
##########
@@ -17,14 +17,13 @@
 
 package org.apache.spark.sql.execution.streaming
 
+import org.apache.spark.SparkFileNotFoundException
+
 import java.io.File
 import java.util.ConcurrentModificationException
-

Review Comment:
   Is this `./dev/scalastyle` happy with the changes?



##########
sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/HDFSMetadataLogSuite.scala:
##########
@@ -205,4 +204,12 @@ class HDFSMetadataLogSuite extends SharedSparkSession {
     intercept[AssertionError](verifyBatchIds(Seq(1), Some(2L), Some(1L)))
     intercept[AssertionError](verifyBatchIds(Seq(0), Some(2L), Some(1L)))
   }
+
+  test("HDFSMetadataLog: batchMetadataFileNotFoundError") {
+    withTempDir { temp =>
+      val dir = new File(temp, "dir")
+      val metadataLog = new HDFSMetadataLog[String](spark, dir.getAbsolutePath)
+      intercept[SparkFileNotFoundException](metadataLog.get(0))

Review Comment:
   1. Please, use `checkError`
   2. Can you trigger the error by not using internal API?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to