Revert "HDFS-11280. Allow WebHDFS to reuse HTTP connections to NN. Contributed by Zheng Shao."
This reverts commit b811a1c14d
.
This commit is contained in:
parent
6938b67711
commit
b31e1951e0
|
@ -659,9 +659,7 @@ public class WebHdfsFileSystem extends FileSystem
|
|||
url = new URL(conn.getHeaderField("Location"));
|
||||
redirectHost = url.getHost() + ":" + url.getPort();
|
||||
} finally {
|
||||
// Don't call conn.disconnect() to allow connection reuse
|
||||
// See http://tinyurl.com/java7-http-keepalive
|
||||
conn.getInputStream().close();
|
||||
conn.disconnect();
|
||||
}
|
||||
}
|
||||
try {
|
||||
|
@ -893,9 +891,7 @@ public class WebHdfsFileSystem extends FileSystem
|
|||
LOG.debug("Response decoding failure.", e);
|
||||
throw ioe;
|
||||
} finally {
|
||||
// Don't call conn.disconnect() to allow connection reuse
|
||||
// See http://tinyurl.com/java7-http-keepalive
|
||||
conn.getInputStream().close();
|
||||
conn.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -942,9 +938,6 @@ public class WebHdfsFileSystem extends FileSystem
|
|||
try {
|
||||
validateResponse(op, conn, true);
|
||||
} finally {
|
||||
// This is a connection to DataNode. Let's disconnect since
|
||||
// there is little chance that the connection will be reused
|
||||
// any time soonl
|
||||
conn.disconnect();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue