-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-16769. LocalDirAllocator to provide diagnostics when file creation fails #1768
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
base: trunk
Are you sure you want to change the base?
Changes from all commits
05a0e93
23d8353
6ae80b0
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 |
---|---|---|
|
@@ -532,4 +532,23 @@ public void testGetLocalPathForWriteForInvalidPaths() throws Exception { | |
} | ||
} | ||
|
||
/** | ||
* Test to check the LocalDirAllocation for the less space HADOOP-16769 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add trailing "." for javadocs |
||
* | ||
* @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); | ||
try { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use LambaTestUtils.intercept, which will do the catch, reporting on failure and error message checks |
||
dirAllocator.getLocalPathForWrite("p1/x", 3_000_000_000_000L, conf); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's going to happen on a disk with >3TB of capacity? Should we go for a bigger number? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I missed updating the pull request. I have a new code change that uses Long.MAX_VALUE, instead of this hardcoded number and then use a regex to match the error message. I will create a new pull request |
||
fail("not throwing the exception"); | ||
} catch (IOException e) { | ||
assertTrue(e.getMessage().matches("Could not find any valid local directory for p1/x with requested " + | ||
"size 3000000000000 as the max capacity in any directory is [0-9]*")); | ||
} | ||
} | ||
|
||
} |
Uh oh!
There was an error while loading. Please reload this page.