Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2722,11 +2722,10 @@ private HdfsFileStatus startFileInt(String src,
iip = FSDirWriteFileOp.resolvePathForStartFile(
dir, pc, src, flag, createParent);


if (blockSize < minBlockSize) {
throw new IOException("Specified block size is less than configured" +
" minimum value (" + DFSConfigKeys.DFS_NAMENODE_MIN_BLOCK_SIZE_KEY
+ "): " + blockSize + " < " + minBlockSize);
throw new IOException("Specified block size " + blockSize +
" is less than configured minimum value " +
DFSConfigKeys.DFS_NAMENODE_MIN_BLOCK_SIZE_KEY + "=" + minBlockSize);
}

if (shouldReplicate) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,9 @@ public void testMinBlockSizeLimit() throws Exception {
assert false : "Expected IOException after creating a file with small" +
" blocks ";
} catch (IOException e) {
GenericTestUtils.assertExceptionContains("Specified block size is less",
e);
GenericTestUtils.assertExceptionContains(
"is less than configured minimum value " +
"dfs.namenode.fs-limits.min-block-size=", e);
}
} finally {
cluster.shutdown();
Expand Down