Skip to content

Commit

Permalink
HDFS-8034. Fix TestDFSClientRetries#testDFSClientConfigurationLocateF…
Browse files Browse the repository at this point in the history
…ollowingBlockInitialDelay for Windows. Contributed by Xiaoyu Yao.
  • Loading branch information
cnauroth committed Apr 3, 2015
1 parent 228ae9a commit dc5596c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
4 changes: 4 additions & 0 deletions hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
Expand Up @@ -1366,6 +1366,10 @@ Release 2.7.0 - UNRELEASED
HDFS-7954. TestBalancer#testBalancerWithPinnedBlocks should not be executed
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

HDFS-7720. Quota by Storage Type API, tools and ClientNameNode
Expand Down
Expand Up @@ -1136,20 +1136,23 @@ public void testDFSClientConfigurationLocateFollowingBlockInitialDelay()
throws Exception {
// test if DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_INITIAL_DELAY_KEY
// is not configured, verify DFSClient uses the default value 400.
Configuration dfsConf = new HdfsConfiguration();
MiniDFSCluster cluster = new MiniDFSCluster.Builder(dfsConf).build();
cluster.waitActive();
NamenodeProtocols nn = cluster.getNameNodeRpc();
DFSClient client = new DFSClient(null, nn, dfsConf, null);
assertEquals(client.getConf().
getBlockWriteLocateFollowingInitialDelayMs(), 400);

// change DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_INITIAL_DELAY_KEY,
// verify DFSClient uses the configured value 1000.
dfsConf.setInt(DFSConfigKeys.
DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_INITIAL_DELAY_KEY, 1000);
client = new DFSClient(null, nn, dfsConf, null);
assertEquals(client.getConf().
getBlockWriteLocateFollowingInitialDelayMs(), 1000);
MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).build();
try {
cluster.waitActive();
NamenodeProtocols nn = cluster.getNameNodeRpc();
DFSClient client = new DFSClient(null, nn, conf, null);
assertEquals(client.getConf().
getBlockWriteLocateFollowingInitialDelayMs(), 400);

// change DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_INITIAL_DELAY_KEY,
// verify DFSClient uses the configured value 1000.
conf.setInt(DFSConfigKeys.
DFS_CLIENT_BLOCK_WRITE_LOCATEFOLLOWINGBLOCK_INITIAL_DELAY_KEY, 1000);
client = new DFSClient(null, nn, conf, null);
assertEquals(client.getConf().
getBlockWriteLocateFollowingInitialDelayMs(), 1000);
} finally {
cluster.shutdown();
}
}
}

0 comments on commit dc5596c

Please sign in to comment.