HDFS-4391. TestDataTransferKeepalive fails when tests are executed in a certain order. Contributed by Andrew Wang.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1455343 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5865ec1c37
commit
9d62cdd680
@ -306,6 +306,9 @@ Trunk (Unreleased)
|
||||
HDFS-4502. JsonUtil.toFileStatus(..) should check if the fileId property
|
||||
exists. (Brandon Li via suresh)
|
||||
|
||||
HDFS-4391. TestDataTransferKeepalive fails when tests are executed in a
|
||||
certain order. (Andrew Wang via atm)
|
||||
|
||||
BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS
|
||||
|
||||
HDFS-4145. Merge hdfs cmd line scripts from branch-1-win. (David Lao,
|
||||
|
@ -27,6 +27,7 @@
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import java.io.IOException;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.LinkedListMultimap;
|
||||
import org.apache.commons.logging.Log;
|
||||
@ -253,7 +254,8 @@ private void run() throws InterruptedException {
|
||||
/**
|
||||
* Empty the cache, and close all sockets.
|
||||
*/
|
||||
private synchronized void clear() {
|
||||
@VisibleForTesting
|
||||
protected synchronized void clear() {
|
||||
for (SocketAndStreams sockAndStream : multimap.values()) {
|
||||
sockAndStream.close();
|
||||
}
|
||||
|
@ -70,6 +70,7 @@ public void setup() throws Exception {
|
||||
.numDataNodes(1).build();
|
||||
fs = cluster.getFileSystem();
|
||||
dfsClient = ((DistributedFileSystem)fs).dfs;
|
||||
dfsClient.socketCache.clear();
|
||||
|
||||
String poolId = cluster.getNamesystem().getBlockPoolId();
|
||||
dn = cluster.getDataNodes().get(0);
|
||||
|
Loading…
Reference in New Issue
Block a user