Skip to content

Commit 7a6265a

Browse files
committed
HDFS-14811. RBF: TestRouterRpc#testErasureCoding is flaky. Contributed by Chen Zhang.
1 parent 95dfc87 commit 7a6265a

File tree

1 file changed

+7
-0
lines changed
  • hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router

1 file changed

+7
-0
lines changed

hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterRpc.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
*/
1818
package org.apache.hadoop.hdfs.server.federation.router;
1919

20+
import static org.apache.hadoop.hdfs.DFSConfigKeys.DFS_NAMENODE_REDUNDANCY_CONSIDERLOAD_KEY;
2021
import static org.apache.hadoop.hdfs.server.federation.FederationTestUtils.addDirectory;
2122
import static org.apache.hadoop.hdfs.server.federation.FederationTestUtils.countContents;
2223
import static org.apache.hadoop.hdfs.server.federation.FederationTestUtils.createFile;
@@ -196,8 +197,14 @@ public int compare(
196197

197198
@BeforeClass
198199
public static void globalSetUp() throws Exception {
200+
Configuration namenodeConf = new Configuration();
201+
// It's very easy to become overloaded for some specific dn in this small
202+
// cluster, which will cause the EC file block allocation failure. To avoid
203+
// this issue, we disable considerLoad option.
204+
namenodeConf.setBoolean(DFS_NAMENODE_REDUNDANCY_CONSIDERLOAD_KEY, false);
199205
cluster = new MiniRouterDFSCluster(false, NUM_SUBCLUSTERS);
200206
cluster.setNumDatanodesPerNameservice(NUM_DNS);
207+
cluster.addNamenodeOverrides(namenodeConf);
201208
cluster.setIndependentDNs();
202209

203210
Configuration conf = new Configuration();

0 commit comments

Comments
 (0)