-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-26689][CORE]Support blacklisting bad disk directory and retry in DiskBlockManager #23614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
c8cdde5
713c6da
5a51be5
f6a71b5
25b1361
da9b442
53270be
c8d3304
31b0b9c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -91,4 +91,24 @@ class DiskBlockManagerSuite extends SparkFunSuite with BeforeAndAfterEach with B | |
| for (i <- 0 until numBytes) writer.write(i) | ||
| writer.close() | ||
| } | ||
|
|
||
| test("test blacklisting bad disk directory") { | ||
| val blockId = new TestBlockId("1") | ||
| val hash = Utils.nonNegativeHash(blockId.name) | ||
| val (badDiskDir, goodDiskDir) = if (hash % 2 == 0) { | ||
|
||
| (rootDir0, rootDir1) | ||
| } else { | ||
| (rootDir1, rootDir0) | ||
| } | ||
|
|
||
| // Delete dirs to simulate disk error | ||
| Utils.deleteRecursively(badDiskDir) | ||
| try { | ||
| val file = diskBlockManager.getFile(blockId) | ||
| val fileRootDir = file.getParentFile.getParentFile.getParentFile | ||
| assert(file != null && file.getParentFile.exists() && fileRootDir === goodDiskDir) | ||
| } finally { | ||
| badDiskDir.mkdirs() | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.