svn merge -c 1330506 from trunk for HDFS-3321. Fix safe mode turn off tip message.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1330508 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Tsz-wo Sze 2012-04-25 19:35:47 +00:00
parent 376c6918b9
commit f65f193d78
3 changed files with 4 additions and 2 deletions

View File

@ -779,6 +779,8 @@ Release 0.23.3 - UNRELEASED
HDFS-3318. Use BoundedInputStream in ByteRangeInputStream, otherwise, it
hangs on transfers >2 GB. (Daryn Sharp via szetszwo)
HDFS-3321. Fix safe mode turn off tip message. (Ravi Prakash via szetszwo)
Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -3723,7 +3723,7 @@ String getTurnOffTip() {
msg += String.format(
"The number of live datanodes %d needs an additional %d live "
+ "datanodes to reach the minimum number %d.",
numLive, (datanodeThreshold - numLive) + 1 , datanodeThreshold);
numLive, (datanodeThreshold - numLive), datanodeThreshold);
}
msg += " " + leaveMsg;
} else {

View File

@ -342,7 +342,7 @@ public void testDatanodeThreshold() throws IOException {
String tipMsg = cluster.getNamesystem().getSafemode();
assertTrue("Safemode tip message looks right: " + tipMsg,
tipMsg.contains("The number of live datanodes 0 needs an additional " +
"2 live datanodes to reach the minimum number 1. " +
"1 live datanodes to reach the minimum number 1. " +
"Safe mode will be turned off automatically."));
// Start a datanode