HDFS-8034. Fix TestDFSClientRetries#testDFSClientConfigurationLocateFollowingBlockInitialDelay for Windows. Contributed by Xiaoyu Yao.

(cherry picked from commit dc5596c36a)
This commit is contained in:
cnauroth 2015-04-03 10:10:11 -07:00
parent 5ea64e6722
commit 0dde8c079d
2 changed files with 21 additions and 14 deletions

View File

@ -1065,6 +1065,10 @@ Release 2.7.0 - UNRELEASED
HDFS-7954. TestBalancer#testBalancerWithPinnedBlocks should not be executed HDFS-7954. TestBalancer#testBalancerWithPinnedBlocks should not be executed
on Windows. (Xiaoyu Yao via szetszwo) on Windows. (Xiaoyu Yao via szetszwo)
HDFS-8034. Fix
TestDFSClientRetries#testDFSClientConfigurationLocateFollowingBlockInitialDelay
for Windows. (Xiaoyu Yao via cnauroth)
BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS BREAKDOWN OF HDFS-7584 SUBTASKS AND RELATED JIRAS
HDFS-7720. Quota by Storage Type API, tools and ClientNameNode HDFS-7720. Quota by Storage Type API, tools and ClientNameNode

View File

@ -1131,20 +1131,23 @@ public void testDFSClientConfigurationLocateFollowingBlockInitialDelay()
throws Exception { throws Exception {
// test if DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_INITIAL_DELAY_KEY // test if DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_INITIAL_DELAY_KEY
// is not configured, verify DFSClient uses the default value 400. // is not configured, verify DFSClient uses the default value 400.
Configuration dfsConf = new HdfsConfiguration(); MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
MiniDFSCluster cluster = new MiniDFSCluster.Builder(dfsConf).build(); try {
cluster.waitActive(); cluster.waitActive();
NamenodeProtocols nn = cluster.getNameNodeRpc(); NamenodeProtocols nn = cluster.getNameNodeRpc();
DFSClient client = new DFSClient(null, nn, dfsConf, null); DFSClient client = new DFSClient(null, nn, conf, null);
assertEquals(client.getConf(). assertEquals(client.getConf().
getBlockWriteLocateFollowingInitialDelayMs(), 400); getBlockWriteLocateFollowingInitialDelayMs(), 400);
// change DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_INITIAL_DELAY_KEY, // change DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_INITIAL_DELAY_KEY,
// verify DFSClient uses the configured value 1000. // verify DFSClient uses the configured value 1000.
dfsConf.setInt(DFSConfigKeys. conf.setInt(DFSConfigKeys.
DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_INITIAL_DELAY_KEY, 1000); DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_INITIAL_DELAY_KEY, 1000);
client = new DFSClient(null, nn, dfsConf, null); client = new DFSClient(null, nn, conf, null);
assertEquals(client.getConf(). assertEquals(client.getConf().
getBlockWriteLocateFollowingInitialDelayMs(), 1000); getBlockWriteLocateFollowingInitialDelayMs(), 1000);
} finally {
cluster.shutdown();
}
} }
} }