HDFS-16274. Improve error msg for FSNamesystem#startFileInt (#3554)
* HDFS-16274. Improve log for FSNamesystem#startFileInt * fix failed unit test
This commit is contained in:
parent
cb2b7970ee
commit
d72e2cb786
|
@ -2722,11 +2722,10 @@ public class FSNamesystem implements Namesystem, FSNamesystemMBean,
|
|||
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) {
|
||||
|
|
|
@ -210,8 +210,9 @@ public class TestFileLimit {
|
|||
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();
|
||||
|
|
Loading…
Reference in New Issue