HDFS-3476. Correct the default used in TestDFSClientRetries.busyTest() after HDFS-3462. (harsh)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1344394 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7a4c33ae86
commit
f2c3d3ac52
|
@ -82,6 +82,9 @@ Trunk (unreleased changes)
|
|||
HDFS-2391. Newly set BalancerBandwidth value is not displayed anywhere.
|
||||
(harsh)
|
||||
|
||||
HDFS-3476. Correct the default used in TestDFSClientRetries.busyTest()
|
||||
after HDFS-3462 (harsh)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-2834. Add a ByteBuffer-based read API to DFSInputStream.
|
||||
|
|
|
@ -519,17 +519,20 @@ public class TestDFSClientRetries extends TestCase {
|
|||
LOG.info("Test 4 succeeded! Time spent: " + (timestamp2-timestamp)/1000.0 + " sec.");
|
||||
}
|
||||
|
||||
private boolean busyTest(int xcievers, int threads, int fileLen, int timeWin, int retries)
|
||||
private boolean busyTest(int xcievers, int threads, int fileLen, int timeWin, int retries)
|
||||
throws IOException {
|
||||
|
||||
boolean ret = true;
|
||||
short replicationFactor = 1;
|
||||
long blockSize = 128*1024*1024; // DFS block size
|
||||
int bufferSize = 4096;
|
||||
int originalXcievers = conf.getInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY,0);
|
||||
conf.setInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY, xcievers);
|
||||
conf.setInt(DFSConfigKeys.DFS_CLIENT_MAX_BLOCK_ACQUIRE_FAILURES_KEY,
|
||||
retries);
|
||||
int originalXcievers = conf.getInt(
|
||||
DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY,
|
||||
DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_DEFAULT);
|
||||
conf.setInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY,
|
||||
xcievers);
|
||||
conf.setInt(DFSConfigKeys.DFS_CLIENT_MAX_BLOCK_ACQUIRE_FAILURES_KEY,
|
||||
retries);
|
||||
conf.setInt(DFSConfigKeys.DFS_CLIENT_RETRY_WINDOW_BASE, timeWin);
|
||||
// Disable keepalive
|
||||
conf.setInt(DFSConfigKeys.DFS_DATANODE_SOCKET_REUSE_KEEPALIVE_KEY, 0);
|
||||
|
@ -605,7 +608,8 @@ public class TestDFSClientRetries extends TestCase {
|
|||
e.printStackTrace();
|
||||
ret = false;
|
||||
} finally {
|
||||
conf.setInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY,originalXcievers);
|
||||
conf.setInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY,
|
||||
originalXcievers);
|
||||
fs.delete(file1, false);
|
||||
cluster.shutdown();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue