HDFS-5948. TestBackupNode flakes with port in use error. (Contributed by Haohui Mai)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1568532 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arpit Agarwal 2014-02-14 21:57:26 +00:00
parent 04888258b7
commit a57550914f
2 changed files with 4 additions and 0 deletions

View File

@ -453,6 +453,9 @@ Release 2.4.0 - UNRELEASED
HDFS-3128. Unit tests should not use a test root in /tmp. (wang) HDFS-3128. Unit tests should not use a test root in /tmp. (wang)
HDFS-5948. TestBackupNode flakes with port in use error. (Haohui Mai
via Arpit Agarwal)
Release 2.3.1 - UNRELEASED Release 2.3.1 - UNRELEASED
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -282,6 +282,7 @@ public class TestBackupNode {
HAUtil.setAllowStandbyReads(conf, true); HAUtil.setAllowStandbyReads(conf, true);
short replication = (short)conf.getInt("dfs.replication", 3); short replication = (short)conf.getInt("dfs.replication", 3);
int numDatanodes = Math.max(3, replication); int numDatanodes = Math.max(3, replication);
conf.set(DFSConfigKeys.DFS_NAMENODE_BACKUP_HTTP_ADDRESS_KEY, "localhost:0");
conf.set(DFSConfigKeys.DFS_BLOCKREPORT_INITIAL_DELAY_KEY, "0"); conf.set(DFSConfigKeys.DFS_BLOCKREPORT_INITIAL_DELAY_KEY, "0");
conf.setInt(DFSConfigKeys.DFS_DATANODE_SCAN_PERIOD_HOURS_KEY, -1); // disable block scanner conf.setInt(DFSConfigKeys.DFS_DATANODE_SCAN_PERIOD_HOURS_KEY, -1); // disable block scanner
conf.setInt(DFSConfigKeys.DFS_NAMENODE_CHECKPOINT_TXNS_KEY, 1); conf.setInt(DFSConfigKeys.DFS_NAMENODE_CHECKPOINT_TXNS_KEY, 1);