HDFS-5892. TestDeleteBlockPool fails in branch-2. Contributed by Ted Yu.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1576035 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Haohui Mai 2014-03-10 18:16:57 +00:00
parent 7da07461ff
commit a06b21cf67
3 changed files with 19 additions and 1 deletions

View File

@ -732,6 +732,8 @@ Release 2.4.0 - UNRELEASED
HDFS-6071. BlockReaderLocal doesn't return -1 on EOF when doing a
zero-length read on a short file (cmccabe)
HDFS-5892. TestDeleteBlockPool fails in branch-2. (Ted Yu via wheat9)
BREAKDOWN OF HDFS-5698 SUBTASKS AND RELATED JIRAS
HDFS-5717. Save FSImage header in protobuf. (Haohui Mai via jing9)

View File

@ -77,6 +77,21 @@ public class MiniDFSNNTopology {
return topology;
}
/**
* Set up federated cluster with the given nameservices, each
* of which has only a single NameNode.
*/
public static MiniDFSNNTopology simpleFederatedTopology(String nameservicesIds) {
MiniDFSNNTopology topology = new MiniDFSNNTopology();
String nsIds[] = nameservicesIds.split(",");
for (String nsId : nsIds) {
topology.addNameservice(new MiniDFSNNTopology.NSConf(nsId)
.addNN(new MiniDFSNNTopology.NNConf(null)));
}
topology.setFederation(true);
return topology;
}
/**
* Set up federated cluster with the given number of nameservices, each
* of which has two NameNodes.

View File

@ -50,7 +50,8 @@ public class TestDeleteBlockPool {
conf.set(DFSConfigKeys.DFS_NAMESERVICES,
"namesServerId1,namesServerId2");
cluster = new MiniDFSCluster.Builder(conf)
.nnTopology(MiniDFSNNTopology.simpleFederatedTopology(2))
.nnTopology(MiniDFSNNTopology.simpleFederatedTopology
(conf.get(DFSConfigKeys.DFS_NAMESERVICES)))
.numDataNodes(2).build();
cluster.waitActive();