HDFS-4669. TestBlockPoolManager fails using IBM java. Contributed by Tian Hong Wang.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1466176 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suresh Srinivas 2013-04-09 19:04:28 +00:00
parent e73db45185
commit d9593621b5
4 changed files with 8 additions and 5 deletions

View File

@ -495,6 +495,9 @@ Release 2.0.5-beta - UNRELEASED
HDFS-4676. TestHDFSFileSystemContract should set MiniDFSCluster variable
to null to free up memory. (suresh)
HDFS-4669. TestBlockPoolManager fails using IBM java. (Tian Hong Wang via
suresh)
Release 2.0.4-alpha - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -460,7 +460,7 @@ public class DFSUtil {
// Look for configurations of the form <key>[.<nameserviceId>][.<namenodeId>]
// across all of the configured nameservices and namenodes.
Map<String, Map<String, InetSocketAddress>> ret = Maps.newHashMap();
Map<String, Map<String, InetSocketAddress>> ret = Maps.newLinkedHashMap();
for (String nsId : emptyAsSingletonNull(nameserviceIds)) {
Map<String, InetSocketAddress> isas =
getAddressesForNameserviceId(conf, nsId, defaultAddress, keys);

View File

@ -160,8 +160,8 @@ class BlockPoolManager {
Map<String, Map<String, InetSocketAddress>> addrMap) throws IOException {
assert Thread.holdsLock(refreshNamenodesLock);
Set<String> toRefresh = Sets.newHashSet();
Set<String> toAdd = Sets.newHashSet();
Set<String> toRefresh = Sets.newLinkedHashSet();
Set<String> toAdd = Sets.newLinkedHashSet();
Set<String> toRemove;
synchronized (this) {
@ -239,4 +239,4 @@ class BlockPoolManager {
protected BPOfferService createBPOS(List<InetSocketAddress> nnAddrs) {
return new BPOfferService(nnAddrs, dn);
}
}
}

View File

@ -113,7 +113,7 @@ public class TestBlockPoolManager {
// Remove the first NS
conf.set(DFSConfigKeys.DFS_NAMESERVICES,
"ns1");
"ns2");
bpm.refreshNamenodes(conf);
assertEquals(
"stop #1\n" +