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.
|
HDFS-2391. Newly set BalancerBandwidth value is not displayed anywhere.
|
||||||
(harsh)
|
(harsh)
|
||||||
|
|
||||||
|
HDFS-3476. Correct the default used in TestDFSClientRetries.busyTest()
|
||||||
|
after HDFS-3462 (harsh)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
HDFS-2834. Add a ByteBuffer-based read API to DFSInputStream.
|
HDFS-2834. Add a ByteBuffer-based read API to DFSInputStream.
|
||||||
|
@ -519,17 +519,20 @@ public void testDFSClientRetriesOnBusyBlocks() throws IOException {
|
|||||||
LOG.info("Test 4 succeeded! Time spent: " + (timestamp2-timestamp)/1000.0 + " sec.");
|
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 {
|
throws IOException {
|
||||||
|
|
||||||
boolean ret = true;
|
boolean ret = true;
|
||||||
short replicationFactor = 1;
|
short replicationFactor = 1;
|
||||||
long blockSize = 128*1024*1024; // DFS block size
|
long blockSize = 128*1024*1024; // DFS block size
|
||||||
int bufferSize = 4096;
|
int bufferSize = 4096;
|
||||||
int originalXcievers = conf.getInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY,0);
|
int originalXcievers = conf.getInt(
|
||||||
conf.setInt(DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY, xcievers);
|
DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_KEY,
|
||||||
conf.setInt(DFSConfigKeys.DFS_CLIENT_MAX_BLOCK_ACQUIRE_FAILURES_KEY,
|
DFSConfigKeys.DFS_DATANODE_MAX_RECEIVER_THREADS_DEFAULT);
|
||||||
retries);
|
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);
|
conf.setInt(DFSConfigKeys.DFS_CLIENT_RETRY_WINDOW_BASE, timeWin);
|
||||||
// Disable keepalive
|
// Disable keepalive
|
||||||
conf.setInt(DFSConfigKeys.DFS_DATANODE_SOCKET_REUSE_KEEPALIVE_KEY, 0);
|
conf.setInt(DFSConfigKeys.DFS_DATANODE_SOCKET_REUSE_KEEPALIVE_KEY, 0);
|
||||||
@ -605,7 +608,8 @@ private boolean busyTest(int xcievers, int threads, int fileLen, int timeWin, in
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
ret = false;
|
ret = false;
|
||||||
} finally {
|
} 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);
|
fs.delete(file1, false);
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user