HDFS-4722. Merge r1476597 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1486176 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2013-05-24 19:16:58 +00:00
parent c0fbc823f0
commit f05a2e5b69
2 changed files with 14 additions and 0 deletions

View File

@ -394,6 +394,9 @@ Release 2.0.5-beta - UNRELEASED
HDFS-4740. Fixes for a few test failures on Windows. HDFS-4740. Fixes for a few test failures on Windows.
(Arpit Agarwal via suresh) (Arpit Agarwal via suresh)
HDFS-4722. TestGetConf#testFederation times out on Windows.
(Ivan Mitic via suresh)
Release 2.0.4-alpha - 2013-04-25 Release 2.0.4-alpha - 2013-04-25
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -87,6 +87,16 @@ public class TestGetConf {
return values; return values;
} }
/**
* Add namenodes to the static resolution list to avoid going
* through DNS which can be really slow in some configurations.
*/
private void setupStaticHostResolution(int nameServiceIdCount) {
for (int i = 0; i < nameServiceIdCount; i++) {
NetUtils.addStaticResolution("nn" + i, "localhost");
}
}
/* /*
* Convert the map returned from DFSUtil functions to an array of * Convert the map returned from DFSUtil functions to an array of
* addresses represented as "host:port" * addresses represented as "host:port"
@ -306,6 +316,7 @@ public class TestGetConf {
String[] nnAddresses = setupAddress(conf, String[] nnAddresses = setupAddress(conf,
DFS_NAMENODE_SERVICE_RPC_ADDRESS_KEY, nsCount, 1000); DFS_NAMENODE_SERVICE_RPC_ADDRESS_KEY, nsCount, 1000);
setupAddress(conf, DFS_NAMENODE_RPC_ADDRESS_KEY, nsCount, 1500); setupAddress(conf, DFS_NAMENODE_RPC_ADDRESS_KEY, nsCount, 1500);
setupStaticHostResolution(nsCount);
String[] backupAddresses = setupAddress(conf, String[] backupAddresses = setupAddress(conf,
DFS_NAMENODE_BACKUP_ADDRESS_KEY, nsCount, 2000); DFS_NAMENODE_BACKUP_ADDRESS_KEY, nsCount, 2000);
String[] secondaryAddresses = setupAddress(conf, String[] secondaryAddresses = setupAddress(conf,