HDFS-5251. Merge 1525787 from trunk.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1525792 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
360a4e5f03
commit
3227545fe7
|
@ -89,6 +89,9 @@ Release 2.2.0 - UNRELEASED
|
|||
|
||||
HDFS-5139. Remove redundant -R option from setrep.
|
||||
|
||||
HDFS-5251. Race between the initialization of NameNode and the http
|
||||
server. (Haohui Mai via suresh)
|
||||
|
||||
Release 2.1.1-beta - 2013-09-23
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -101,6 +101,10 @@ class NamenodeJspHelper {
|
|||
}
|
||||
|
||||
static String getRollingUpgradeText(FSNamesystem fsn) {
|
||||
if (fsn == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
DatanodeManager dm = fsn.getBlockManager().getDatanodeManager();
|
||||
Map<String, Integer> list = dm.getDatanodesSoftwareVersions();
|
||||
if(list.size() > 1) {
|
||||
|
|
|
@ -18,8 +18,13 @@
|
|||
package org.apache.hadoop.hdfs.server.namenode;
|
||||
|
||||
|
||||
import static org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase.LOADING_EDITS;
|
||||
import static org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase.LOADING_FSIMAGE;
|
||||
import static org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase.SAFEMODE;
|
||||
import static org.apache.hadoop.hdfs.server.namenode.startupprogress.Phase.SAVING_CHECKPOINT;
|
||||
import static org.mockito.Mockito.atLeastOnce;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
@ -107,6 +112,11 @@ public class TestNameNodeJspHelper {
|
|||
Assert.assertTrue(containsMatch(contents, SAFEMODE.getDescription()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetRollingUpgradeText() {
|
||||
Assert.assertEquals("", NamenodeJspHelper.getRollingUpgradeText(null));
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the list contains any string that partially matches the regex.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue