-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HADOOP-16769. LocalDirAllocator to provide diagnostics when file creation fails #4842
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 1 commit
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 |
|---|---|---|
|
|
@@ -26,6 +26,7 @@ | |
| import java.util.NoSuchElementException; | ||
|
|
||
| import org.apache.hadoop.conf.Configuration; | ||
| import org.apache.hadoop.test.LambdaTestUtils; | ||
| import org.apache.hadoop.util.DiskChecker.DiskErrorException; | ||
| import org.apache.hadoop.util.Shell; | ||
|
|
||
|
|
@@ -532,4 +533,19 @@ public void testGetLocalPathForWriteForInvalidPaths() throws Exception { | |
| } | ||
| } | ||
|
|
||
| } | ||
| /** | ||
| * Test to check the LocalDirAllocation for the less space HADOOP-16769. | ||
|
||
| * | ||
| * @throws Exception | ||
| */ | ||
| @Test(timeout = 30000) | ||
| public void testGetLocalPathForWriteForLessSpace() throws Exception { | ||
| String dir0 = buildBufferDir(ROOT, 0); | ||
| String dir1 = buildBufferDir(ROOT, 1); | ||
| conf.set(CONTEXT, dir0 + "," + dir1); | ||
| LambdaTestUtils.intercept(DiskErrorException.class, | ||
| String.format("Could not find any valid local directory for %s with requested size %s", | ||
| "p1/x", Long.MAX_VALUE - 1), "Expect a DiskErrorException.", | ||
| () -> dirAllocator.getLocalPathForWrite("p1/x", Long.MAX_VALUE - 1, conf)); | ||
| } | ||
| } | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment for a better description of this variable, like "Max capacity in any directory"...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will add comment for this variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed