yaooqinn commented on a change in pull request #25962: [SPARK-29285][Shuffle] Temporary shuffle files should be able to handle disk failures URL: https://github.com/apache/spark/pull/25962#discussion_r340961818
########## File path: core/src/test/scala/org/apache/spark/storage/DiskBlockManagerSuite.scala ########## @@ -91,4 +90,45 @@ class DiskBlockManagerSuite extends SparkFunSuite with BeforeAndAfterEach with B for (i <- 0 until numBytes) writer.write(i) writer.close() } + + test("temporary shuffle/local file should be able to handle disk failures") { + try { + // the following two lines pre-create subdirectories under each root dir of block manager + diskBlockManager.getFile("1") + diskBlockManager.getFile("2") + + val tempShuffleFile1 = diskBlockManager.createTempShuffleBlock()._2 + val tempLocalFile1 = diskBlockManager.createTempLocalBlock()._2 + assert(tempShuffleFile1.exists(), "There are no bad disks, so temp shuffle file exists") + assert(tempLocalFile1.exists(), "There are no bad disks, so temp local file exists") + + // partial disks damaged + rootDir0.setExecutable(false) + val tempShuffleFile2 = diskBlockManager.createTempShuffleBlock()._2 + val tempLocalFile2 = diskBlockManager.createTempLocalBlock()._2 + // It's possible that after 10 retries we still not able to find the healthy disk. we need to Review comment: @cloud-fan please check whether this is ok or not ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org